[PATCH 2/2] wined3d: Print opcode names instead of enum values.

Henri Verbeet hverbeet at gmail.com
Thu Dec 3 09:48:16 CST 2015


On 3 December 2015 at 11:04, Józef Kucia <jkucia at codeweavers.com> wrote:
> +const char *debug_d3dshaderinstructionhandler(enum WINED3D_SHADER_INSTRUCTION_HANDLER handler_idx)
> +{
> +    if (handler_idx >= sizeof(shader_opcode_names) / sizeof(*shader_opcode_names))
> +    {
> +        FIXME("Unrecognized shader instruction handler %#x.\n", handler_idx);
> +        return "UNRECOGNIZED";
You can do something like "wine_dbg_sprintf("UNRECOGNIZED(%#x)",
handler_idx);" and have it print the handler_idx. (See also e.g.
debug_d3dstate().) Note that we could also move this to utils.c, not
sure if that's worth it.



More information about the wine-devel mailing list