mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Don't report a register type mismatch for unused reserved variables.
This commit is contained in:
parent
d6ac823dd6
commit
c8ffe8e1a8
Notes:
Alexandre Julliard
2023-06-22 22:04:01 +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/244
@ -2698,7 +2698,7 @@ static void allocate_register_reservations(struct hlsl_ctx *ctx)
|
|||||||
continue;
|
continue;
|
||||||
regset = hlsl_type_get_regset(var->data_type);
|
regset = hlsl_type_get_regset(var->data_type);
|
||||||
|
|
||||||
if (var->reg_reservation.reg_type)
|
if (var->reg_reservation.reg_type && var->regs[regset].bind_count)
|
||||||
{
|
{
|
||||||
if (var->reg_reservation.reg_type != get_regset_name(regset))
|
if (var->reg_reservation.reg_type != get_regset_name(regset))
|
||||||
{
|
{
|
||||||
@ -2710,7 +2710,7 @@ static void allocate_register_reservations(struct hlsl_ctx *ctx)
|
|||||||
type_string->buffer, get_regset_name(regset));
|
type_string->buffer, get_regset_name(regset));
|
||||||
hlsl_release_string_buffer(ctx, type_string);
|
hlsl_release_string_buffer(ctx, type_string);
|
||||||
}
|
}
|
||||||
else if (var->regs[regset].bind_count)
|
else
|
||||||
{
|
{
|
||||||
var->regs[regset].allocated = true;
|
var->regs[regset].allocated = true;
|
||||||
var->regs[regset].id = var->reg_reservation.reg_index;
|
var->regs[regset].id = var->reg_reservation.reg_index;
|
||||||
|
@ -70,7 +70,7 @@ probe all rgba (1.0, 1.0, 1.0, 99.0)
|
|||||||
|
|
||||||
|
|
||||||
% Register reservation with incorrect register type.
|
% Register reservation with incorrect register type.
|
||||||
[pixel shader todo]
|
[pixel shader]
|
||||||
Texture2D unused : register(s0);
|
Texture2D unused : register(s0);
|
||||||
Texture2D tex;
|
Texture2D tex;
|
||||||
|
|
||||||
@ -80,12 +80,12 @@ float4 main() : sv_target
|
|||||||
}
|
}
|
||||||
|
|
||||||
[test]
|
[test]
|
||||||
todo draw quad
|
draw quad
|
||||||
probe all rgba (0.0, 0.0, 0.0, 99.0)
|
probe all rgba (0.0, 0.0, 0.0, 99.0)
|
||||||
|
|
||||||
|
|
||||||
% Register reservation with incorrect register type.
|
% Register reservation with incorrect register type.
|
||||||
[pixel shader todo]
|
[pixel shader]
|
||||||
sampler2D unused : register(t0);
|
sampler2D unused : register(t0);
|
||||||
Texture2D tex;
|
Texture2D tex;
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ float4 main() : sv_target
|
|||||||
|
|
||||||
|
|
||||||
[test]
|
[test]
|
||||||
todo draw quad
|
draw quad
|
||||||
probe all rgba (0.0, 0.0, 0.0, 99.0)
|
probe all rgba (0.0, 0.0, 0.0, 99.0)
|
||||||
|
|
||||||
[pixel shader]
|
[pixel shader]
|
||||||
|
Loading…
Reference in New Issue
Block a user