These bits are used in all register tokens, not just immediate constants.
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- libs/vkd3d-shader/dxbc.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index 81c1f48..89e3c0e 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -96,8 +96,8 @@ #define VKD3D_SM4_SWIZZLE_TYPE_SHIFT 2 #define VKD3D_SM4_SWIZZLE_TYPE_MASK (0x3u << VKD3D_SM4_SWIZZLE_TYPE_SHIFT)
-#define VKD3D_SM4_IMMCONST_TYPE_SHIFT 0 -#define VKD3D_SM4_IMMCONST_TYPE_MASK (0x3u << VKD3D_SM4_IMMCONST_TYPE_SHIFT) +#define VKD3D_SM4_DIMENSION_SHIFT 0 +#define VKD3D_SM4_DIMENSION_MASK (0x3u << VKD3D_SM4_DIMENSION_SHIFT)
#define VKD3D_SM4_WRITEMASK_SHIFT 4 #define VKD3D_SM4_WRITEMASK_MASK (0xfu << VKD3D_SM4_WRITEMASK_SHIFT) @@ -396,10 +396,11 @@ enum vkd3d_sm4_swizzle_type VKD3D_SM4_SWIZZLE_SCALAR = 0x2, };
-enum vkd3d_sm4_immconst_type +enum vkd3d_sm4_dimension { - VKD3D_SM4_IMMCONST_SCALAR = 0x1, - VKD3D_SM4_IMMCONST_VEC4 = 0x2, + VKD3D_SM4_DIMENSION_NONE = 0x0, + VKD3D_SM4_DIMENSION_SCALAR = 0x1, + VKD3D_SM4_DIMENSION_VEC4 = 0x2, };
enum vkd3d_sm4_resource_type @@ -1573,12 +1574,11 @@ static bool shader_sm4_read_param(struct vkd3d_sm4_data *priv, const DWORD **ptr
if (register_type == VKD3D_SM4_RT_IMMCONST) { - enum vkd3d_sm4_immconst_type immconst_type = - (token & VKD3D_SM4_IMMCONST_TYPE_MASK) >> VKD3D_SM4_IMMCONST_TYPE_SHIFT; + enum vkd3d_sm4_dimension dimension = (token & VKD3D_SM4_DIMENSION_MASK) >> VKD3D_SM4_DIMENSION_SHIFT;
- switch (immconst_type) + switch (dimension) { - case VKD3D_SM4_IMMCONST_SCALAR: + case VKD3D_SM4_DIMENSION_SCALAR: param->immconst_type = VKD3D_IMMCONST_SCALAR; if (end - *ptr < 1) { @@ -1589,7 +1589,7 @@ static bool shader_sm4_read_param(struct vkd3d_sm4_data *priv, const DWORD **ptr *ptr += 1; break;
- case VKD3D_SM4_IMMCONST_VEC4: + case VKD3D_SM4_DIMENSION_VEC4: param->immconst_type = VKD3D_IMMCONST_VEC4; if (end - *ptr < VKD3D_VEC4_SIZE) { @@ -1601,7 +1601,7 @@ static bool shader_sm4_read_param(struct vkd3d_sm4_data *priv, const DWORD **ptr break;
default: - FIXME("Unhandled immediate constant type %#x.\n", immconst_type); + FIXME("Unhandled dimension %#x.\n", dimension); break; } }