diff --git a/libs/vkd3d-shader/fx.c b/libs/vkd3d-shader/fx.c index bd3bba6a..54cf1020 100644 --- a/libs/vkd3d-shader/fx.c +++ b/libs/vkd3d-shader/fx.c @@ -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); diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h index 669ab551..5f6ed34f 100644 --- a/libs/vkd3d-shader/hlsl.h +++ b/libs/vkd3d-shader/hlsl.h @@ -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: diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index fb108ad9..09066a61 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -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 {