mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/hlsl: Improve UAV format type checking for buffer types.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
committed by
Alexandre Julliard
parent
cff22ecde8
commit
cf8cacd336
Notes:
Alexandre Julliard
2023-05-22 23:19:48 +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/193
57
tests/uav-rwstructuredbuffer.shader_test
Normal file
57
tests/uav-rwstructuredbuffer.shader_test
Normal file
@ -0,0 +1,57 @@
|
||||
[require]
|
||||
shader model >= 5.0
|
||||
|
||||
[pixel shader todo]
|
||||
struct s
|
||||
{
|
||||
float3 a;
|
||||
};
|
||||
|
||||
struct s2
|
||||
{
|
||||
float4x4 f1, f2, f3;
|
||||
};
|
||||
|
||||
RWStructuredBuffer<float4> u : register(u2);
|
||||
RWStructuredBuffer<float> u1;
|
||||
RWStructuredBuffer<float2x2> u2;
|
||||
RWStructuredBuffer<struct s> u3;
|
||||
RWStructuredBuffer<float4x4> u4;
|
||||
RWStructuredBuffer<struct s2> u5;
|
||||
|
||||
float4 main() : sv_target1
|
||||
{
|
||||
u[0] = float4(11.1, 12.2, 13.3, 14.4);
|
||||
return 0;
|
||||
}
|
||||
|
||||
% Array type
|
||||
[pixel shader]
|
||||
typedef float arr[2];
|
||||
RWStructuredBuffer<arr> u;
|
||||
|
||||
float4 main() : sv_target1
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
% Object types
|
||||
[pixel shader fail]
|
||||
RWStructuredBuffer<Texture2D> u;
|
||||
|
||||
float4 main() : sv_target1
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
[pixel shader fail]
|
||||
struct s
|
||||
{
|
||||
Texture2D t;
|
||||
};
|
||||
RWStructuredBuffer<struct s> u;
|
||||
|
||||
float4 main() : sv_target1
|
||||
{
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user