vkd3d-shader/hlsl: Don't allocate object types as constant registers.

This commit is contained in:
Francisco Casas 2022-09-07 16:51:56 -04:00 committed by Alexandre Julliard
parent 6f6ba8aa56
commit 3153ce3145
Notes: Alexandre Julliard 2022-11-10 22:56:31 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
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/42

View File

@ -2103,6 +2103,9 @@ static void allocate_const_registers(struct hlsl_ctx *ctx, struct hlsl_ir_functi
{
if (var->is_uniform && var->last_read)
{
if (var->data_type->reg_size == 0)
continue;
if (var->data_type->reg_size > 4)
var->reg = allocate_range(ctx, &liveness, 1, UINT_MAX, var->data_type->reg_size);
else