mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Support case-insensitive lookup for builtin 'dword' type.
This commit is contained in:
committed by
Alexandre Julliard
parent
5f904e5022
commit
891217664a
Notes:
Alexandre Julliard
2023-02-23 22:20:00 +01:00
Approved-by: Zebediah Figura (@zfigura) Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/101
44
tests/hlsl-type-names.shader_test
Normal file
44
tests/hlsl-type-names.shader_test
Normal file
@@ -0,0 +1,44 @@
|
||||
[pixel shader]
|
||||
typedef float2 Dword;
|
||||
typedef float3 dWord;
|
||||
|
||||
float4 f()
|
||||
{
|
||||
typedef Dword dword;
|
||||
dword v1 = {1, 2};
|
||||
DWORD v4 = 4;
|
||||
return float4(v1.x, v1.y, 3, v4);
|
||||
}
|
||||
|
||||
float4 f2()
|
||||
{
|
||||
typedef dword dword;
|
||||
dword v = 1;
|
||||
return float4(v, v, v, v);
|
||||
}
|
||||
|
||||
float4 main() : SV_TARGET
|
||||
{
|
||||
return f() + f2();
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe all rgba (2.0, 3.0, 4.0, 5.0)
|
||||
|
||||
% The "dword" alias is pre-defined as lowercase
|
||||
[pixel shader fail]
|
||||
typedef float2 dword;
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
return float4(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
[pixel shader fail]
|
||||
struct DWORD s;
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
return float4(0, 0, 0, 0);
|
||||
}
|
Reference in New Issue
Block a user