The modifier if present is ignored and a warning emitted.
Signed-off-by: Conor McCarthy cmccarthy@codeweavers.com --- libs/vkd3d-shader/dxbc.c | 7 ++++++- libs/vkd3d-shader/sm4.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index c188a2b6..156b81a3 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -1206,6 +1206,8 @@ static bool shader_sm4_read_param(struct vkd3d_sm4_data *priv, const DWORD **ptr { unsigned int min_precis = (m & VKD3D_SM4_REGISTER_MIN_PRECIS_MASK) >> VKD3D_SM4_REGISTER_MIN_PRECIS_SHIFT; unsigned int op_modifier = (m & VKD3D_SM4_REGISTER_MODIFIER_MASK) >> VKD3D_SM4_REGISTER_MODIFIER_SHIFT; + unsigned int non_uniform = + (m & VKD3D_SM4_REGISTER_NON_UNIFORM_MASK) >> VKD3D_SM4_REGISTER_NON_UNIFORM_SHIFT;
switch (op_modifier & VKD3D_SM4_REGISTER_MODIFIER_ABS_NEGATE) { @@ -1230,13 +1232,16 @@ static bool shader_sm4_read_param(struct vkd3d_sm4_data *priv, const DWORD **ptr
if (min_precis) WARN("Ignoring minimum precision %#x.\n", min_precis); + + if (non_uniform) + FIXME("Ignoring extended modifier NON_UNIFORM.\n"); } else if (type) { FIXME("Unhandled extended operand type %#x.\n", type); }
- m &= ~0u << VKD3D_SM4_REGISTER_NON_UNIFORM_SHIFT; + m &= ~VKD3D_SM4_REGISTER_NON_UNIFORM_MASK & (~0u << VKD3D_SM4_REGISTER_NON_UNIFORM_SHIFT); if (m) FIXME("Skipping modifier 0x%08x.\n", m); } diff --git a/libs/vkd3d-shader/sm4.h b/libs/vkd3d-shader/sm4.h index 2e2eea75..6a4b1a8d 100644 --- a/libs/vkd3d-shader/sm4.h +++ b/libs/vkd3d-shader/sm4.h @@ -105,6 +105,7 @@ #define VKD3D_SM4_REGISTER_MIN_PRECIS_MASK (0x7u << VKD3D_SM4_REGISTER_MIN_PRECIS_SHIFT)
#define VKD3D_SM4_REGISTER_NON_UNIFORM_SHIFT 17 +#define VKD3D_SM4_REGISTER_NON_UNIFORM_MASK (0x1u << VKD3D_SM4_REGISTER_NON_UNIFORM_SHIFT)
#define VKD3D_SM4_ADDRESSING_SHIFT2 28 #define VKD3D_SM4_ADDRESSING_MASK2 (0x3u << VKD3D_SM4_ADDRESSING_SHIFT2)