wined3d: Parse SM5 precise instruction modifier.
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
a1c2cd0154
commit
0322fb69a1
|
@ -1917,6 +1917,23 @@ static void shader_dump_sync_flags(struct wined3d_string_buffer *buffer, DWORD s
|
|||
shader_addline(buffer, "_unknown_flags(%#x)", sync_flags);
|
||||
}
|
||||
|
||||
static void shader_dump_precise_flags(struct wined3d_string_buffer *buffer, DWORD precise_flags)
|
||||
{
|
||||
if (!precise_flags)
|
||||
return;
|
||||
|
||||
shader_addline(buffer, " [precise");
|
||||
if (precise_flags != WINED3DSI_PRECISE_XYZW)
|
||||
{
|
||||
shader_addline(buffer, "(%s%s%s%s)",
|
||||
precise_flags & WINED3DSI_PRECISE_X ? "x" : "",
|
||||
precise_flags & WINED3DSI_PRECISE_Y ? "y" : "",
|
||||
precise_flags & WINED3DSI_PRECISE_Z ? "z" : "",
|
||||
precise_flags & WINED3DSI_PRECISE_W ? "w" : "");
|
||||
}
|
||||
shader_addline(buffer, "]");
|
||||
}
|
||||
|
||||
static void shader_dump_uav_flags(struct wined3d_string_buffer *buffer, DWORD uav_flags)
|
||||
{
|
||||
if (uav_flags & WINED3DSUF_GLOBALLY_COHERENT)
|
||||
|
@ -3080,6 +3097,10 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
|
|||
{
|
||||
shader_dump_sync_flags(&buffer, ins.flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
shader_dump_precise_flags(&buffer, ins.flags);
|
||||
}
|
||||
|
||||
if (wined3d_shader_instruction_has_texel_offset(&ins))
|
||||
shader_addline(&buffer, "(%d,%d,%d)", ins.texel_offset.u, ins.texel_offset.v, ins.texel_offset.w);
|
||||
|
|
|
@ -61,6 +61,9 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_bytecode);
|
|||
#define WINED3D_SM4_GLOBAL_FLAGS_SHIFT 11
|
||||
#define WINED3D_SM4_GLOBAL_FLAGS_MASK (0xffu << WINED3D_SM4_GLOBAL_FLAGS_SHIFT)
|
||||
|
||||
#define WINED3D_SM5_PRECISE_SHIFT 19
|
||||
#define WINED3D_SM5_PRECISE_MASK (0xfu << WINED3D_SM5_PRECISE_SHIFT)
|
||||
|
||||
#define WINED3D_SM5_CONTROL_POINT_COUNT_SHIFT 11
|
||||
#define WINED3D_SM5_CONTROL_POINT_COUNT_MASK (0xffu << WINED3D_SM5_CONTROL_POINT_COUNT_SHIFT)
|
||||
|
||||
|
@ -1643,6 +1646,7 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
|
|||
unsigned int i, len;
|
||||
SIZE_T remaining;
|
||||
const DWORD *p;
|
||||
DWORD precise;
|
||||
|
||||
list_move_head(&priv->src_free, &priv->src);
|
||||
|
||||
|
@ -1717,12 +1721,13 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
|
|||
shader_sm4_read_instruction_modifier(previous_token = *p++, ins);
|
||||
|
||||
ins->flags = (opcode_token & WINED3D_SM4_INSTRUCTION_FLAGS_MASK) >> WINED3D_SM4_INSTRUCTION_FLAGS_SHIFT;
|
||||
|
||||
if (ins->flags & WINED3D_SM4_INSTRUCTION_FLAG_SATURATE)
|
||||
{
|
||||
ins->flags &= ~WINED3D_SM4_INSTRUCTION_FLAG_SATURATE;
|
||||
instruction_dst_modifier = WINED3DSPDM_SATURATE;
|
||||
}
|
||||
precise = (opcode_token & WINED3D_SM5_PRECISE_MASK) >> WINED3D_SM5_PRECISE_SHIFT;
|
||||
ins->flags |= precise << WINED3DSI_PRECISE_SHIFT;
|
||||
|
||||
for (i = 0; i < ins->dst_count; ++i)
|
||||
{
|
||||
|
|
|
@ -618,6 +618,14 @@ enum wined3d_tessellator_partitioning
|
|||
#define WINED3DSI_SAMPLE_INFO_UINT 0x1
|
||||
#define WINED3DSI_SAMPLER_COMPARISON_MODE 0x1
|
||||
|
||||
#define WINED3DSI_PRECISE_X 0x100
|
||||
#define WINED3DSI_PRECISE_Y 0x200
|
||||
#define WINED3DSI_PRECISE_Z 0x400
|
||||
#define WINED3DSI_PRECISE_W 0x800
|
||||
#define WINED3DSI_PRECISE_XYZW (WINED3DSI_PRECISE_X | WINED3DSI_PRECISE_Y \
|
||||
| WINED3DSI_PRECISE_Z | WINED3DSI_PRECISE_W)
|
||||
#define WINED3DSI_PRECISE_SHIFT 8
|
||||
|
||||
enum wined3d_shader_rel_op
|
||||
{
|
||||
WINED3D_SHADER_REL_OP_GT = 1,
|
||||
|
|
Loading…
Reference in New Issue