From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d-shader/dxil.c | 8 ++++---- libs/vkd3d-shader/spirv.c | 4 ++-- libs/vkd3d-shader/vkd3d_shader_private.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c index 679f72121..b414121b0 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -1886,9 +1886,9 @@ static unsigned int register_get_uint_value(const struct vkd3d_shader_register *
if (reg->type == VKD3DSPR_IMMCONST64) { - if (reg->u.immconst_uint64[0] > UINT_MAX) + if (reg->u.immconst_u64[0] > UINT_MAX) FIXME("Truncating 64-bit value.\n"); - return reg->u.immconst_uint64[0]; + return reg->u.immconst_u64[0]; }
return reg->u.immconst_u32[0]; @@ -1902,7 +1902,7 @@ static uint64_t register_get_uint64_value(const struct vkd3d_shader_register *re if (reg->dimension == VSIR_DIMENSION_VEC4) WARN("Returning vec4.x.\n");
- return (reg->type == VKD3DSPR_IMMCONST64) ? reg->u.immconst_uint64[0] : reg->u.immconst_u32[0]; + return (reg->type == VKD3DSPR_IMMCONST64) ? reg->u.immconst_u64[0] : reg->u.immconst_u32[0]; }
static inline bool sm6_value_is_function_dcl(const struct sm6_value *value) @@ -2579,7 +2579,7 @@ static enum vkd3d_result sm6_parser_constants_init(struct sm6_parser *sm6, const if (type->u.width <= 32) dst->u.reg.u.immconst_u32[0] = value & ((1ull << type->u.width) - 1); else - dst->u.reg.u.immconst_uint64[0] = value; + dst->u.reg.u.immconst_u64[0] = value;
break;
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 0afc103e3..7a33a5701 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -3724,14 +3724,14 @@ static uint32_t spirv_compiler_emit_load_constant64(struct spirv_compiler *compi if (reg->dimension == VSIR_DIMENSION_SCALAR) { for (i = 0; i < component_count; ++i) - values[i] = *reg->u.immconst_uint64; + values[i] = *reg->u.immconst_u64; } else { for (i = 0, j = 0; i < VKD3D_DVEC2_SIZE; ++i) { if (write_mask & (VKD3DSP_WRITEMASK_0 << i)) - values[j++] = reg->u.immconst_uint64[vsir_swizzle_get_component64(swizzle, i)]; + values[j++] = reg->u.immconst_u64[vsir_swizzle_get_component64(swizzle, i)]; } }
diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index 21be361ec..a80683865 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -843,7 +843,7 @@ struct vkd3d_shader_register { uint32_t immconst_u32[VKD3D_VEC4_SIZE]; float immconst_f32[VKD3D_VEC4_SIZE]; - uint64_t immconst_uint64[VKD3D_DVEC2_SIZE]; + uint64_t immconst_u64[VKD3D_DVEC2_SIZE]; double immconst_double[VKD3D_DVEC2_SIZE]; unsigned fp_body_idx; } u;