diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index 87b2d718..c8e5b080 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -56,6 +56,9 @@ #define VKD3D_SM4_GLOBAL_FLAGS_SHIFT 11 #define VKD3D_SM4_GLOBAL_FLAGS_MASK (0xffu << VKD3D_SM4_GLOBAL_FLAGS_SHIFT) +#define VKD3D_SM5_PRECISE_SHIFT 19 +#define VKD3D_SM5_PRECISE_MASK (0xfu << VKD3D_SM5_PRECISE_SHIFT) + #define VKD3D_SM5_CONTROL_POINT_COUNT_SHIFT 11 #define VKD3D_SM5_CONTROL_POINT_COUNT_MASK (0xffu << VKD3D_SM5_CONTROL_POINT_COUNT_SHIFT) @@ -1641,6 +1644,7 @@ void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct vkd3d_sha unsigned int i, len; SIZE_T remaining; const DWORD *p; + DWORD precise; list_move_head(&priv->src_free, &priv->src); @@ -1703,12 +1707,13 @@ void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct vkd3d_sha shader_sm4_read_instruction_modifier(previous_token = *p++, ins); ins->flags = (opcode_token & VKD3D_SM4_INSTRUCTION_FLAGS_MASK) >> VKD3D_SM4_INSTRUCTION_FLAGS_SHIFT; - if (ins->flags & VKD3D_SM4_INSTRUCTION_FLAG_SATURATE) { ins->flags &= ~VKD3D_SM4_INSTRUCTION_FLAG_SATURATE; instruction_dst_modifier = VKD3DSPDM_SATURATE; } + precise = (opcode_token & VKD3D_SM5_PRECISE_MASK) >> VKD3D_SM5_PRECISE_SHIFT; + ins->flags |= precise << VKD3DSI_PRECISE_SHIFT; for (i = 0; i < ins->dst_count; ++i) { diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index 4aeeb50e..17219775 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -480,6 +480,14 @@ enum vkd3d_tessellator_partitioning #define VKD3DSI_SAMPLE_INFO_UINT 0x1 #define VKD3DSI_SAMPLER_COMPARISON_MODE 0x1 +#define VKD3DSI_PRECISE_X 0x100 +#define VKD3DSI_PRECISE_Y 0x200 +#define VKD3DSI_PRECISE_Z 0x400 +#define VKD3DSI_PRECISE_W 0x800 +#define VKD3DSI_PRECISE_XYZW (VKD3DSI_PRECISE_X | VKD3DSI_PRECISE_Y \ + | VKD3DSI_PRECISE_Z | VKD3DSI_PRECISE_W) +#define VKD3DSI_PRECISE_SHIFT 8 + enum vkd3d_shader_rel_op { VKD3D_SHADER_REL_OP_GT = 1,