mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Handle uppercase regset names in register().
This commit is contained in:
parent
d8ef0c69a8
commit
0cea4d352e
Notes:
Alexandre Julliard
2023-04-19 22:11:12 +02: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/162
@ -1014,7 +1014,7 @@ static struct hlsl_reg_reservation parse_reg_reservation(const char *reg_string)
|
||||
FIXME("Unsupported register reservation syntax.\n");
|
||||
return reservation;
|
||||
}
|
||||
reservation.reg_type = reg_string[0];
|
||||
reservation.reg_type = ascii_tolower(reg_string[0]);
|
||||
return reservation;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,21 @@
|
||||
% Uppercase register set names
|
||||
[pixel shader]
|
||||
cbuffer Constants : register(B1)
|
||||
{
|
||||
};
|
||||
Texture2D tex : register(T1);
|
||||
float4 foo : register(C0);
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
return foo;
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 float4 1.0 2.0 3.0 4.0
|
||||
draw quad
|
||||
probe all rgba (1.0, 2.0, 3.0, 4.0)
|
||||
|
||||
[pixel shader]
|
||||
// Test empty constant buffer.
|
||||
cbuffer Constants : register(b1)
|
||||
@ -16,7 +34,6 @@ uniform 0 float4 1.0 2.0 3.0 4.0
|
||||
draw quad
|
||||
probe all rgba (1.0, 2.0, 3.0, 4.0)
|
||||
|
||||
|
||||
% SM1 buffer offset allocation follows different rules than SM4.
|
||||
% Those would have to be tested separately.
|
||||
[require]
|
||||
@ -611,7 +628,7 @@ float4 main() : sv_target
|
||||
cbuffer buffer
|
||||
{
|
||||
float4 foo : packoffset(c0);
|
||||
Texture2D tex : register(t1);
|
||||
Texture2D tex : register(T1);
|
||||
}
|
||||
|
||||
float4 main() : sv_target
|
||||
|
@ -121,6 +121,20 @@ float4 main() : sv_target1
|
||||
draw quad
|
||||
probe uav 3 (0, 0) rgba (0.9, 0.8, 0.7, 0.6)
|
||||
|
||||
% Uppercase register set name
|
||||
[pixel shader]
|
||||
RWTexture2D<float4> u : register(U3);
|
||||
|
||||
float4 main() : sv_target1
|
||||
{
|
||||
u[uint2(0, 0)] = float4(0.9, 0.8, 0.7, 0.6);
|
||||
return 0;
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe uav 3 (0, 0) rgba (0.9, 0.8, 0.7, 0.6)
|
||||
|
||||
% Test that we can declare and use an array of UAVs.
|
||||
|
||||
[uav 2]
|
||||
|
Loading…
x
Reference in New Issue
Block a user