Module: vkd3d Branch: master Commit: 15b19b15c08f0c6819446923b6e801f4371d0eaa URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/15b19b15c08f0c6819446923b6e801...
Author: Francisco Casas fcasas@codeweavers.com Date: Wed Apr 27 15:44:09 2022 -0400
vkd3d-shader/hlsl: Use proper dimensions on SampleLevel method 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 1e39f5e7..65600b7a 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -2741,6 +2741,7 @@ static bool add_method_call(struct hlsl_ctx *ctx, struct list *instrs, struct hl && object_type->sampler_dim != HLSL_SAMPLER_DIM_2DMSARRAY) { 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); const struct hlsl_type *sampler_type; struct hlsl_ir_resource_load *load; struct hlsl_ir_node *offset = NULL; @@ -2781,7 +2782,7 @@ static bool add_method_call(struct hlsl_ctx *ctx, struct list *instrs, struct hl if (params->args_count == 4) { if (!(offset = add_implicit_conversion(ctx, instrs, params->args[3], - hlsl_get_vector_type(ctx, HLSL_TYPE_INT, sampler_dim), loc))) + hlsl_get_vector_type(ctx, HLSL_TYPE_INT, offset_dim), loc))) return false; }