mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Use proper dimensions on gather methods offset parameter.
This commit is contained in:
parent
652906aea7
commit
562f647c2a
Notes:
Alexandre Julliard
2022-10-18 00:13:00 +02:00
Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/9
@ -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))
|
|| object_type->sampler_dim == HLSL_SAMPLER_DIM_CUBEARRAY))
|
||||||
{
|
{
|
||||||
const unsigned int sampler_dim = hlsl_sampler_dim_count(object_type->sampler_dim);
|
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;
|
enum hlsl_resource_load_type load_type;
|
||||||
const struct hlsl_type *sampler_type;
|
const struct hlsl_type *sampler_type;
|
||||||
struct hlsl_ir_resource_load *load;
|
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 (params->args_count == 3 || params->args_count == 4)
|
||||||
{
|
{
|
||||||
if (!(offset = add_implicit_conversion(ctx, instrs, params->args[2],
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user