mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Allow failure in hlsl_offset_from_deref.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
f257004caf
commit
b266133a8c
@@ -792,7 +792,7 @@ static void sm4_register_from_deref(struct hlsl_ctx *ctx, struct sm4_register *r
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned int offset = hlsl_offset_from_deref(deref) + var->buffer_offset;
|
||||
unsigned int offset = hlsl_offset_from_deref_safe(ctx, deref) + var->buffer_offset;
|
||||
|
||||
assert(data_type->type <= HLSL_CLASS_VECTOR);
|
||||
reg->type = VKD3D_SM4_RT_CONSTBUFFER;
|
||||
@@ -820,7 +820,7 @@ static void sm4_register_from_deref(struct hlsl_ctx *ctx, struct sm4_register *r
|
||||
}
|
||||
else
|
||||
{
|
||||
struct hlsl_reg hlsl_reg = hlsl_reg_from_deref(deref, data_type);
|
||||
struct hlsl_reg hlsl_reg = hlsl_reg_from_deref(ctx, deref, data_type);
|
||||
|
||||
assert(hlsl_reg.allocated);
|
||||
reg->type = VKD3D_SM4_RT_INPUT;
|
||||
@@ -850,7 +850,7 @@ static void sm4_register_from_deref(struct hlsl_ctx *ctx, struct sm4_register *r
|
||||
}
|
||||
else
|
||||
{
|
||||
struct hlsl_reg hlsl_reg = hlsl_reg_from_deref(deref, data_type);
|
||||
struct hlsl_reg hlsl_reg = hlsl_reg_from_deref(ctx, deref, data_type);
|
||||
|
||||
assert(hlsl_reg.allocated);
|
||||
reg->type = VKD3D_SM4_RT_OUTPUT;
|
||||
@@ -862,7 +862,7 @@ static void sm4_register_from_deref(struct hlsl_ctx *ctx, struct sm4_register *r
|
||||
}
|
||||
else
|
||||
{
|
||||
struct hlsl_reg hlsl_reg = hlsl_reg_from_deref(deref, data_type);
|
||||
struct hlsl_reg hlsl_reg = hlsl_reg_from_deref(ctx, deref, data_type);
|
||||
|
||||
assert(hlsl_reg.allocated);
|
||||
reg->type = VKD3D_SM4_RT_TEMP;
|
||||
|
||||
Reference in New Issue
Block a user