wined3d: Recognize SM5 dcl_uav_raw 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
df7512c5e9
commit
17c7cbeb88
|
@ -5248,6 +5248,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
|
||||||
/* WINED3DSIH_DCL_TGSM_RAW */ NULL,
|
/* WINED3DSIH_DCL_TGSM_RAW */ NULL,
|
||||||
/* WINED3DSIH_DCL_TGSM_STRUCTURED */ NULL,
|
/* WINED3DSIH_DCL_TGSM_STRUCTURED */ NULL,
|
||||||
/* WINED3DSIH_DCL_THREAD_GROUP */ NULL,
|
/* WINED3DSIH_DCL_THREAD_GROUP */ NULL,
|
||||||
|
/* WINED3DSIH_DCL_UAV_RAW */ NULL,
|
||||||
/* WINED3DSIH_DCL_UAV_TYPED */ NULL,
|
/* WINED3DSIH_DCL_UAV_TYPED */ NULL,
|
||||||
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_hw_nop,
|
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_hw_nop,
|
||||||
/* WINED3DSIH_DEF */ shader_hw_nop,
|
/* WINED3DSIH_DEF */ shader_hw_nop,
|
||||||
|
|
|
@ -8911,6 +8911,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
|
||||||
/* WINED3DSIH_DCL_TGSM_RAW */ NULL,
|
/* WINED3DSIH_DCL_TGSM_RAW */ NULL,
|
||||||
/* WINED3DSIH_DCL_TGSM_STRUCTURED */ NULL,
|
/* WINED3DSIH_DCL_TGSM_STRUCTURED */ NULL,
|
||||||
/* WINED3DSIH_DCL_THREAD_GROUP */ NULL,
|
/* WINED3DSIH_DCL_THREAD_GROUP */ NULL,
|
||||||
|
/* WINED3DSIH_DCL_UAV_RAW */ NULL,
|
||||||
/* WINED3DSIH_DCL_UAV_TYPED */ shader_glsl_nop,
|
/* WINED3DSIH_DCL_UAV_TYPED */ shader_glsl_nop,
|
||||||
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_glsl_nop,
|
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_glsl_nop,
|
||||||
/* WINED3DSIH_DEF */ shader_glsl_nop,
|
/* WINED3DSIH_DEF */ shader_glsl_nop,
|
||||||
|
|
|
@ -89,6 +89,7 @@ static const char * const shader_opcode_names[] =
|
||||||
/* WINED3DSIH_DCL_TGSM_RAW */ "dcl_tgsm_raw",
|
/* WINED3DSIH_DCL_TGSM_RAW */ "dcl_tgsm_raw",
|
||||||
/* WINED3DSIH_DCL_TGSM_STRUCTURED */ "dcl_tgsm_structured",
|
/* WINED3DSIH_DCL_TGSM_STRUCTURED */ "dcl_tgsm_structured",
|
||||||
/* WINED3DSIH_DCL_THREAD_GROUP */ "dcl_thread_group",
|
/* WINED3DSIH_DCL_THREAD_GROUP */ "dcl_thread_group",
|
||||||
|
/* WINED3DSIH_DCL_UAV_RAW */ "dcl_uav_raw",
|
||||||
/* WINED3DSIH_DCL_UAV_TYPED */ "dcl_uav_typed",
|
/* WINED3DSIH_DCL_UAV_TYPED */ "dcl_uav_typed",
|
||||||
/* WINED3DSIH_DCL_VERTICES_OUT */ "dcl_maxOutputVertexCount",
|
/* WINED3DSIH_DCL_VERTICES_OUT */ "dcl_maxOutputVertexCount",
|
||||||
/* WINED3DSIH_DEF */ "def",
|
/* WINED3DSIH_DEF */ "def",
|
||||||
|
@ -1457,6 +1458,18 @@ static void shader_dump_sync_flags(struct wined3d_string_buffer *buffer, DWORD s
|
||||||
shader_addline(buffer, "_unknown_flags(%#x)", sync_flags);
|
shader_addline(buffer, "_unknown_flags(%#x)", sync_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void shader_dump_uav_flags(struct wined3d_string_buffer *buffer, DWORD uav_flags)
|
||||||
|
{
|
||||||
|
if (uav_flags & WINED3DSUF_GLOBALLY_COHERENT)
|
||||||
|
{
|
||||||
|
shader_addline(buffer, "_glc");
|
||||||
|
uav_flags &= ~WINED3DSUF_GLOBALLY_COHERENT;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (uav_flags)
|
||||||
|
shader_addline(buffer, "_unknown_flags(%#x)", uav_flags);
|
||||||
|
}
|
||||||
|
|
||||||
static void shader_dump_tessellator_domain(struct wined3d_string_buffer *buffer,
|
static void shader_dump_tessellator_domain(struct wined3d_string_buffer *buffer,
|
||||||
enum wined3d_tessellator_domain domain)
|
enum wined3d_tessellator_domain domain)
|
||||||
{
|
{
|
||||||
|
@ -2417,6 +2430,13 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
|
||||||
ins.declaration.thread_group_size.y,
|
ins.declaration.thread_group_size.y,
|
||||||
ins.declaration.thread_group_size.z);
|
ins.declaration.thread_group_size.z);
|
||||||
}
|
}
|
||||||
|
else if (ins.handler_idx == WINED3DSIH_DCL_UAV_RAW)
|
||||||
|
{
|
||||||
|
shader_addline(&buffer, "%s", shader_opcode_names[ins.handler_idx]);
|
||||||
|
shader_dump_uav_flags(&buffer, ins.flags);
|
||||||
|
shader_addline(&buffer, " ");
|
||||||
|
shader_dump_dst_param(&buffer, &ins.declaration.dst, &shader_version);
|
||||||
|
}
|
||||||
else if (ins.handler_idx == WINED3DSIH_DEF)
|
else if (ins.handler_idx == WINED3DSIH_DEF)
|
||||||
{
|
{
|
||||||
shader_addline(&buffer, "def c%u = %.8e, %.8e, %.8e, %.8e", shader_get_float_offset(ins.dst[0].reg.type,
|
shader_addline(&buffer, "def c%u = %.8e, %.8e, %.8e, %.8e", shader_get_float_offset(ins.dst[0].reg.type,
|
||||||
|
|
|
@ -64,6 +64,9 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_bytecode);
|
||||||
#define WINED3D_SM5_CONTROL_POINT_COUNT_SHIFT 11
|
#define WINED3D_SM5_CONTROL_POINT_COUNT_SHIFT 11
|
||||||
#define WINED3D_SM5_CONTROL_POINT_COUNT_MASK (0xffu << WINED3D_SM5_CONTROL_POINT_COUNT_SHIFT)
|
#define WINED3D_SM5_CONTROL_POINT_COUNT_MASK (0xffu << WINED3D_SM5_CONTROL_POINT_COUNT_SHIFT)
|
||||||
|
|
||||||
|
#define WINED3D_SM5_UAV_FLAGS_SHIFT 11
|
||||||
|
#define WINED3D_SM5_UAV_FLAGS_MASK (0xffu << WINED3D_SM5_UAV_FLAGS_SHIFT)
|
||||||
|
|
||||||
#define WINED3D_SM5_SYNC_FLAGS_SHIFT 11
|
#define WINED3D_SM5_SYNC_FLAGS_SHIFT 11
|
||||||
#define WINED3D_SM5_SYNC_FLAGS_MASK (0xffu << WINED3D_SM5_SYNC_FLAGS_SHIFT)
|
#define WINED3D_SM5_SYNC_FLAGS_MASK (0xffu << WINED3D_SM5_SYNC_FLAGS_SHIFT)
|
||||||
|
|
||||||
|
@ -237,6 +240,7 @@ enum wined3d_sm4_opcode
|
||||||
WINED3D_SM5_OP_DCL_HS_FORK_PHASE_INSTANCE_COUNT = 0x99,
|
WINED3D_SM5_OP_DCL_HS_FORK_PHASE_INSTANCE_COUNT = 0x99,
|
||||||
WINED3D_SM5_OP_DCL_THREAD_GROUP = 0x9b,
|
WINED3D_SM5_OP_DCL_THREAD_GROUP = 0x9b,
|
||||||
WINED3D_SM5_OP_DCL_UAV_TYPED = 0x9c,
|
WINED3D_SM5_OP_DCL_UAV_TYPED = 0x9c,
|
||||||
|
WINED3D_SM5_OP_DCL_UAV_RAW = 0x9d,
|
||||||
WINED3D_SM5_OP_DCL_TGSM_RAW = 0x9f,
|
WINED3D_SM5_OP_DCL_TGSM_RAW = 0x9f,
|
||||||
WINED3D_SM5_OP_DCL_TGSM_STRUCTURED = 0xa0,
|
WINED3D_SM5_OP_DCL_TGSM_STRUCTURED = 0xa0,
|
||||||
WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED = 0xa2,
|
WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED = 0xa2,
|
||||||
|
@ -660,6 +664,14 @@ static void shader_sm5_read_dcl_thread_group(struct wined3d_shader_instruction *
|
||||||
ins->declaration.thread_group_size.z = *tokens++;
|
ins->declaration.thread_group_size.z = *tokens++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void shader_sm5_read_dcl_uav_raw(struct wined3d_shader_instruction *ins,
|
||||||
|
DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
|
||||||
|
struct wined3d_sm4_data *priv)
|
||||||
|
{
|
||||||
|
shader_sm4_read_dst_param(priv, &tokens, WINED3D_DATA_UAV, &ins->declaration.dst);
|
||||||
|
ins->flags = (opcode_token & WINED3D_SM5_UAV_FLAGS_MASK) >> WINED3D_SM5_UAV_FLAGS_SHIFT;
|
||||||
|
}
|
||||||
|
|
||||||
static void shader_sm5_read_dcl_tgsm_raw(struct wined3d_shader_instruction *ins,
|
static void shader_sm5_read_dcl_tgsm_raw(struct wined3d_shader_instruction *ins,
|
||||||
DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
|
DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
|
||||||
struct wined3d_sm4_data *priv)
|
struct wined3d_sm4_data *priv)
|
||||||
|
@ -858,6 +870,8 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
|
||||||
shader_sm5_read_dcl_thread_group},
|
shader_sm5_read_dcl_thread_group},
|
||||||
{WINED3D_SM5_OP_DCL_UAV_TYPED, WINED3DSIH_DCL_UAV_TYPED, "", "",
|
{WINED3D_SM5_OP_DCL_UAV_TYPED, WINED3DSIH_DCL_UAV_TYPED, "", "",
|
||||||
shader_sm4_read_dcl_resource},
|
shader_sm4_read_dcl_resource},
|
||||||
|
{WINED3D_SM5_OP_DCL_UAV_RAW, WINED3DSIH_DCL_UAV_RAW, "", "",
|
||||||
|
shader_sm5_read_dcl_uav_raw},
|
||||||
{WINED3D_SM5_OP_DCL_TGSM_RAW, WINED3DSIH_DCL_TGSM_RAW, "", "",
|
{WINED3D_SM5_OP_DCL_TGSM_RAW, WINED3DSIH_DCL_TGSM_RAW, "", "",
|
||||||
shader_sm5_read_dcl_tgsm_raw},
|
shader_sm5_read_dcl_tgsm_raw},
|
||||||
{WINED3D_SM5_OP_DCL_TGSM_STRUCTURED, WINED3DSIH_DCL_TGSM_STRUCTURED, "", "",
|
{WINED3D_SM5_OP_DCL_TGSM_STRUCTURED, WINED3DSIH_DCL_TGSM_STRUCTURED, "", "",
|
||||||
|
|
|
@ -469,6 +469,11 @@ enum wined3d_shader_sync_flags
|
||||||
WINED3DSSF_GROUP_SHARED_MEMORY = 0x2,
|
WINED3DSSF_GROUP_SHARED_MEMORY = 0x2,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum wined3d_shader_uav_flags
|
||||||
|
{
|
||||||
|
WINED3DSUF_GLOBALLY_COHERENT = 0x20,
|
||||||
|
};
|
||||||
|
|
||||||
enum wined3d_tessellator_domain
|
enum wined3d_tessellator_domain
|
||||||
{
|
{
|
||||||
WINED3D_TESSELLATOR_DOMAIN_LINE = 1,
|
WINED3D_TESSELLATOR_DOMAIN_LINE = 1,
|
||||||
|
@ -609,6 +614,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
|
||||||
WINED3DSIH_DCL_TGSM_RAW,
|
WINED3DSIH_DCL_TGSM_RAW,
|
||||||
WINED3DSIH_DCL_TGSM_STRUCTURED,
|
WINED3DSIH_DCL_TGSM_STRUCTURED,
|
||||||
WINED3DSIH_DCL_THREAD_GROUP,
|
WINED3DSIH_DCL_THREAD_GROUP,
|
||||||
|
WINED3DSIH_DCL_UAV_RAW,
|
||||||
WINED3DSIH_DCL_UAV_TYPED,
|
WINED3DSIH_DCL_UAV_TYPED,
|
||||||
WINED3DSIH_DCL_VERTICES_OUT,
|
WINED3DSIH_DCL_VERTICES_OUT,
|
||||||
WINED3DSIH_DEF,
|
WINED3DSIH_DEF,
|
||||||
|
|
Loading…
Reference in New Issue