tests: Add a few tests for the NULL value.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2024-05-28 14:43:36 +02:00 committed by Alexandre Julliard
parent 163aaf9729
commit 727aacca18
Notes: Alexandre Julliard 2024-05-30 23:27:15 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/892
2 changed files with 82 additions and 0 deletions

View File

@ -162,6 +162,7 @@ vkd3d_shader_tests = \
tests/hlsl/nointerpolation.shader_test \ tests/hlsl/nointerpolation.shader_test \
tests/hlsl/non-const-indexing.shader_test \ tests/hlsl/non-const-indexing.shader_test \
tests/hlsl/normalize.shader_test \ tests/hlsl/normalize.shader_test \
tests/hlsl/null.shader_test \
tests/hlsl/numeric-constructor-truncation.shader_test \ tests/hlsl/numeric-constructor-truncation.shader_test \
tests/hlsl/numeric-types.shader_test \ tests/hlsl/numeric-types.shader_test \
tests/hlsl/numthreads.shader_test \ tests/hlsl/numthreads.shader_test \

View File

@ -0,0 +1,81 @@
[pixel shader fail]
float4 var = NULL;
float4 main() : sv_target
{
return 0;
}
[pixel shader fail]
float4x4 var = NULL;
float4 main() : sv_target
{
return 0;
}
[pixel shader fail]
struct s
{
float4 f;
};
float4 main() : sv_target
{
s var = (s)NULL;
return s.f;
}
[pixel shader fail(sm<6)]
Texture var = null;
float4 main() : sv_target
{
return 0;
}
[pixel shader todo]
SamplerState s
{
UnknownField = NULL;
};
Texture t = NULL;
PixelShader ps = NULL;
VertexShader vs = NULL;
float4 main() : sv_target
{
return 0;
}
[require]
shader model >= 4.0
[pixel shader fail(sm>=6) todo]
Texture2DMS<float4> t = NULL;
RWTexture1D<float4> u1 = NULL;
RWTexture2D<float4> u2 = NULL;
RWTexture3D<float4> u3 = NULL;
RWTexture1DArray<float4> ua1 = NULL;
RWTexture2DArray<float4> ua2 = NULL;
RWBuffer<float4> b1 = NULL;
float4 main() : sv_target
{
return 0;
}
[require]
shader model >= 5.0
[pixel shader fail(sm>=6) todo]
RasterizerOrderedTexture2D<uint4> t1 = NULL;
float4 main() : sv_target
{
return 0;
}