wined3d: Recognize SM5 dcl_uav_typed opcode.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d519299522
commit
1bc6a15183
|
@ -5242,6 +5242,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
|
|||
/* WINED3DSIH_DCL_RESOURCE_STRUCTURED */ NULL,
|
||||
/* WINED3DSIH_DCL_SAMPLER */ NULL,
|
||||
/* WINED3DSIH_DCL_TEMPS */ NULL,
|
||||
/* WINED3DSIH_DCL_UAV_TYPED */ NULL,
|
||||
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_hw_nop,
|
||||
/* WINED3DSIH_DEF */ shader_hw_nop,
|
||||
/* WINED3DSIH_DEFB */ shader_hw_nop,
|
||||
|
|
|
@ -8128,6 +8128,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
|
|||
/* WINED3DSIH_DCL_RESOURCE_STRUCTURED */ NULL,
|
||||
/* WINED3DSIH_DCL_SAMPLER */ shader_glsl_nop,
|
||||
/* WINED3DSIH_DCL_TEMPS */ shader_glsl_nop,
|
||||
/* WINED3DSIH_DCL_UAV_TYPED */ NULL,
|
||||
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_glsl_nop,
|
||||
/* WINED3DSIH_DEF */ shader_glsl_nop,
|
||||
/* WINED3DSIH_DEFB */ shader_glsl_nop,
|
||||
|
|
|
@ -70,6 +70,7 @@ static const char * const shader_opcode_names[] =
|
|||
/* WINED3DSIH_DCL_RESOURCE_STRUCTURED */ "dcl_resource_structured",
|
||||
/* WINED3DSIH_DCL_SAMPLER */ "dcl_sampler",
|
||||
/* WINED3DSIH_DCL_TEMPS */ "dcl_temps",
|
||||
/* WINED3DSIH_DCL_UAV_TYPED */ "dcl_uav_typed",
|
||||
/* WINED3DSIH_DCL_VERTICES_OUT */ "dcl_maxOutputVertexCount",
|
||||
/* WINED3DSIH_DEF */ "def",
|
||||
/* WINED3DSIH_DEFB */ "defb",
|
||||
|
@ -1310,9 +1311,12 @@ static void shader_dump_decl_usage(struct wined3d_string_buffer *buffer,
|
|||
break;
|
||||
}
|
||||
}
|
||||
else if (semantic->reg.reg.type == WINED3DSPR_RESOURCE)
|
||||
else if (semantic->reg.reg.type == WINED3DSPR_RESOURCE || semantic->reg.reg.type == WINED3DSPR_UAV)
|
||||
{
|
||||
shader_addline(buffer, "_resource_");
|
||||
if (semantic->reg.reg.type == WINED3DSPR_RESOURCE)
|
||||
shader_addline(buffer, "_resource_");
|
||||
else
|
||||
shader_addline(buffer, "_uav_");
|
||||
switch (semantic->resource_type)
|
||||
{
|
||||
case WINED3D_SHADER_RESOURCE_BUFFER:
|
||||
|
@ -1572,6 +1576,10 @@ static void shader_dump_register(struct wined3d_string_buffer *buffer,
|
|||
shader_addline(buffer, "t");
|
||||
break;
|
||||
|
||||
case WINED3DSPR_UAV:
|
||||
shader_addline(buffer, "u");
|
||||
break;
|
||||
|
||||
default:
|
||||
shader_addline(buffer, "<unhandled_rtype(%#x)>", reg->type);
|
||||
break;
|
||||
|
@ -1953,7 +1961,7 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
|
|||
continue;
|
||||
}
|
||||
|
||||
if (ins.handler_idx == WINED3DSIH_DCL)
|
||||
if (ins.handler_idx == WINED3DSIH_DCL || ins.handler_idx == WINED3DSIH_DCL_UAV_TYPED)
|
||||
{
|
||||
shader_dump_decl_usage(&buffer, &ins.declaration.semantic, &shader_version);
|
||||
shader_dump_ins_modifiers(&buffer, &ins.declaration.semantic.reg);
|
||||
|
|
|
@ -188,6 +188,7 @@ enum wined3d_sm4_opcode
|
|||
WINED3D_SM5_OP_DERIV_RTX_FINE = 0x7b,
|
||||
WINED3D_SM5_OP_DERIV_RTY_COARSE = 0x7c,
|
||||
WINED3D_SM5_OP_DERIV_RTY_FINE = 0x7d,
|
||||
WINED3D_SM5_OP_DCL_UAV_TYPED = 0x9c,
|
||||
WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED = 0xa2,
|
||||
WINED3D_SM5_OP_LD_STRUCTURED = 0xa7,
|
||||
};
|
||||
|
@ -205,6 +206,7 @@ enum wined3d_sm4_register_type
|
|||
WINED3D_SM4_RT_PRIMID = 0xb,
|
||||
WINED3D_SM4_RT_DEPTHOUT = 0xc,
|
||||
WINED3D_SM4_RT_NULL = 0xd,
|
||||
WINED3D_SM5_RT_UAV = 0xe,
|
||||
};
|
||||
|
||||
enum wined3d_sm4_output_primitive_type
|
||||
|
@ -304,6 +306,7 @@ struct wined3d_sm4_opcode_info
|
|||
* u -> WINED3D_DATA_UINT
|
||||
* R -> WINED3D_DATA_RESOURCE
|
||||
* S -> WINED3D_DATA_SAMPLER
|
||||
* U -> WINED3D_DATA_UAV
|
||||
*/
|
||||
static const struct wined3d_sm4_opcode_info opcode_table[] =
|
||||
{
|
||||
|
@ -396,6 +399,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
|
|||
{WINED3D_SM5_OP_DERIV_RTX_FINE, WINED3DSIH_DSX_FINE, "f", "f"},
|
||||
{WINED3D_SM5_OP_DERIV_RTY_COARSE, WINED3DSIH_DSY_COARSE, "f", "f"},
|
||||
{WINED3D_SM5_OP_DERIV_RTY_FINE, WINED3DSIH_DSY_FINE, "f", "f"},
|
||||
{WINED3D_SM5_OP_DCL_UAV_TYPED, WINED3DSIH_DCL_UAV_TYPED, "", ""},
|
||||
{WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED, WINED3DSIH_DCL_RESOURCE_STRUCTURED, "", ""},
|
||||
{WINED3D_SM5_OP_LD_STRUCTURED, WINED3DSIH_LD_STRUCTURED, "u", "uuR"},
|
||||
};
|
||||
|
@ -416,6 +420,7 @@ static const enum wined3d_shader_register_type register_type_table[] =
|
|||
/* WINED3D_SM4_RT_PRIMID */ WINED3DSPR_PRIMID,
|
||||
/* WINED3D_SM4_RT_DEPTHOUT */ WINED3DSPR_DEPTHOUT,
|
||||
/* WINED3D_SM4_RT_NULL */ WINED3DSPR_NULL,
|
||||
/* WINED3D_SM5_RT_UAV */ WINED3DSPR_UAV,
|
||||
};
|
||||
|
||||
static const enum wined3d_primitive_type output_primitive_type_table[] =
|
||||
|
@ -518,6 +523,8 @@ static enum wined3d_data_type map_data_type(char t)
|
|||
return WINED3D_DATA_RESOURCE;
|
||||
case 'S':
|
||||
return WINED3D_DATA_SAMPLER;
|
||||
case 'U':
|
||||
return WINED3D_DATA_UAV;
|
||||
default:
|
||||
ERR("Invalid data type '%c'.\n", t);
|
||||
return WINED3D_DATA_FLOAT;
|
||||
|
@ -937,10 +944,11 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
|
|||
memcpy(priv->icb.data, p, sizeof(*p) * icb_size);
|
||||
ins->declaration.icb = &priv->icb;
|
||||
}
|
||||
else if (opcode == WINED3D_SM4_OP_DCL_RESOURCE)
|
||||
else if (opcode == WINED3D_SM4_OP_DCL_RESOURCE || opcode == WINED3D_SM5_OP_DCL_UAV_TYPED)
|
||||
{
|
||||
enum wined3d_sm4_resource_type resource_type;
|
||||
enum wined3d_sm4_data_type data_type;
|
||||
enum wined3d_data_type reg_data_type;
|
||||
DWORD components;
|
||||
|
||||
resource_type = (opcode_token & WINED3D_SM4_RESOURCE_TYPE_MASK) >> WINED3D_SM4_RESOURCE_TYPE_SHIFT;
|
||||
|
@ -953,7 +961,8 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
|
|||
{
|
||||
ins->declaration.semantic.resource_type = resource_type_table[resource_type];
|
||||
}
|
||||
shader_sm4_read_dst_param(priv, &p, WINED3D_DATA_RESOURCE, &ins->declaration.semantic.reg);
|
||||
reg_data_type = opcode == WINED3D_SM4_OP_DCL_RESOURCE ? WINED3D_DATA_RESOURCE : WINED3D_DATA_UAV;
|
||||
shader_sm4_read_dst_param(priv, &p, reg_data_type, &ins->declaration.semantic.reg);
|
||||
|
||||
components = *p++;
|
||||
if ((components & 0xfff0) != (components & 0xf) * 0x1110)
|
||||
|
|
|
@ -365,6 +365,7 @@ enum wined3d_shader_register_type
|
|||
WINED3DSPR_PRIMID,
|
||||
WINED3DSPR_NULL,
|
||||
WINED3DSPR_RESOURCE,
|
||||
WINED3DSPR_UAV,
|
||||
};
|
||||
|
||||
enum wined3d_data_type
|
||||
|
@ -373,6 +374,7 @@ enum wined3d_data_type
|
|||
WINED3D_DATA_INT,
|
||||
WINED3D_DATA_RESOURCE,
|
||||
WINED3D_DATA_SAMPLER,
|
||||
WINED3D_DATA_UAV,
|
||||
WINED3D_DATA_UINT,
|
||||
WINED3D_DATA_UNORM,
|
||||
WINED3D_DATA_SNORM,
|
||||
|
@ -522,6 +524,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
|
|||
WINED3DSIH_DCL_RESOURCE_STRUCTURED,
|
||||
WINED3DSIH_DCL_SAMPLER,
|
||||
WINED3DSIH_DCL_TEMPS,
|
||||
WINED3DSIH_DCL_UAV_TYPED,
|
||||
WINED3DSIH_DCL_VERTICES_OUT,
|
||||
WINED3DSIH_DEF,
|
||||
WINED3DSIH_DEFB,
|
||||
|
|
Loading…
Reference in New Issue