Module: vkd3d Branch: master Commit: 562f647c2a4db68937b4c1bb9502c1c8da74c5eb URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/562f647c2a4db68937b4c1bb9502c1...
Author: Francisco Casas fcasas@codeweavers.com Date: Wed Apr 27 18:01:45 2022 -0400
vkd3d-shader/hlsl: Use proper dimensions on gather methods offset parameter.
---
libs/vkd3d-shader/hlsl.y | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 7e92f1ac..217b4359 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -2634,6 +2634,7 @@ static bool add_method_call(struct hlsl_ctx *ctx, struct list *instrs, struct hl || object_type->sampler_dim == HLSL_SAMPLER_DIM_CUBEARRAY)) { const unsigned int sampler_dim = hlsl_sampler_dim_count(object_type->sampler_dim); + const unsigned int offset_dim = hlsl_offset_dim_count(object_type->sampler_dim); enum hlsl_resource_load_type load_type; const struct hlsl_type *sampler_type; struct hlsl_ir_resource_load *load; @@ -2690,7 +2691,7 @@ static bool add_method_call(struct hlsl_ctx *ctx, struct list *instrs, struct hl if (params->args_count == 3 || params->args_count == 4) { if (!(offset = add_implicit_conversion(ctx, instrs, params->args[2], - hlsl_get_vector_type(ctx, HLSL_TYPE_INT, sampler_dim), loc))) + hlsl_get_vector_type(ctx, HLSL_TYPE_INT, offset_dim), loc))) return false; }