vkd3d-shader/fx: Set EXPLICIT_BIND_POINT flag for packoffset() reservations as well.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2024-06-02 00:15:48 +02:00 committed by Henri Verbeet
parent da1d96f708
commit 402dc94259
Notes: Henri Verbeet 2024-06-12 19:13:16 +02:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/904
3 changed files with 4 additions and 2 deletions

View File

@ -989,8 +989,7 @@ static void write_fx_4_numeric_variable(struct hlsl_ir_var *var, bool shared, st
};
struct hlsl_ctx *ctx = fx->ctx;
/* Explicit bind point. */
if (var->reg_reservation.reg_type)
if (var->has_explicit_bind_point)
flags |= HAS_EXPLICIT_BIND_POINT;
type_offset = write_type(var->data_type, fx);

View File

@ -492,6 +492,7 @@ struct hlsl_ir_var
uint32_t is_param : 1;
uint32_t is_separated_resource : 1;
uint32_t is_synthetic : 1;
uint32_t has_explicit_bind_point : 1;
};
/* This struct is used to represent assignments in state block entries:

View File

@ -4791,6 +4791,7 @@ static void hlsl_calculate_buffer_offset(struct hlsl_ctx *ctx, struct hlsl_ir_va
if (register_reservation)
{
var->buffer_offset = 4 * var->reg_reservation.reg_index;
var->has_explicit_bind_point = 1;
}
else
{
@ -4823,6 +4824,7 @@ static void hlsl_calculate_buffer_offset(struct hlsl_ctx *ctx, struct hlsl_ir_va
}
}
var->buffer_offset = var->reg_reservation.offset_index;
var->has_explicit_bind_point = 1;
}
else
{