[PATCH 3/8] wined3d: Implement SM5 deriv_rtx_coarse instruction.

Henri Verbeet hverbeet at gmail.com
Mon Jul 25 05:48:54 CDT 2016


On 22 July 2016 at 12:28, Józef Kucia <jkucia at codeweavers.com> wrote:
> +static void shader_glsl_derivative(const struct wined3d_shader_instruction *ins)
> +{
> +    const struct wined3d_gl_info *gl_info = ins->ctx->gl_info;
> +    struct wined3d_string_buffer *buffer = ins->ctx->buffer;
> +    struct glsl_src_param src_param;
> +    const char *instruction;
> +    DWORD write_mask;
> +
> +    if (!gl_info->supported[ARB_DERIVATIVE_CONTROL])
> +    {
> +        FIXME("OpenGL implementation does not support ARB_derivative_control.\n");
> +        return;
> +    }
> +
> +    switch (ins->handler_idx)
> +    {
> +        case WINED3DSIH_DSX_COARSE: instruction = "dFdxCoarse"; break;
> +        default: ERR("Unhandled opcode %#x.\n", ins->handler_idx); return;
> +    }
> +
> +    write_mask = shader_glsl_append_dst(buffer, ins);
> +    shader_glsl_add_src_param(ins, &ins->src[0], write_mask, &src_param);
> +    shader_addline(buffer, "%s(%s));\n", instruction, src_param.param_str);
> +}
It doesn't matter that much, but is there any reason
shader_glsl_map2gl() can't handle these?



More information about the wine-devel mailing list