Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/wined3d/shader.c | 21 +++++++++++++++++++++ dlls/wined3d/shader_sm4.c | 7 ++++++- dlls/wined3d/wined3d_private.h | 8 ++++++++ 3 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index c8939459d0eb..4986f3ca213b 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -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); diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c index f11af7630253..b56f16a64e1d 100644 --- a/dlls/wined3d/shader_sm4.c +++ b/dlls/wined3d/shader_sm4.c @@ -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) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 10bb607292fa..ab13a29530a2 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -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,