mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
tests: Add additional object references tests.
This commit is contained in:
parent
207643b8e8
commit
97c9669544
Notes:
Alexandre Julliard
2023-01-19 22:45:10 +01: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/54
@ -53,3 +53,139 @@ float4 main() : sv_target
|
|||||||
[test]
|
[test]
|
||||||
draw quad
|
draw quad
|
||||||
probe all rgba (1.0, 2.0, 3.0, 4.0)
|
probe all rgba (1.0, 2.0, 3.0, 4.0)
|
||||||
|
|
||||||
|
|
||||||
|
[sampler 0]
|
||||||
|
filter linear linear linear
|
||||||
|
address clamp clamp clamp
|
||||||
|
|
||||||
|
|
||||||
|
[texture 0]
|
||||||
|
size (1, 1)
|
||||||
|
1.0 2.0 3.0 4.0
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader fail todo]
|
||||||
|
static Texture2D tex;
|
||||||
|
sampler sam;
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
return tex.Sample(sam, int3(0, 0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader todo]
|
||||||
|
// This is allowed in 10.0.10011.16384 but not in 9.29.952.3111
|
||||||
|
static Texture2D tex;
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader todo]
|
||||||
|
// This is allowed in 10.0.10011.16384 but not in 9.29.952.3111
|
||||||
|
static Texture2D tex;
|
||||||
|
sampler sam;
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
if (0)
|
||||||
|
return tex.Sample(sam, int3(0, 0, 0));
|
||||||
|
else
|
||||||
|
return float4(0, 1, 2, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader todo]
|
||||||
|
// This is allowed in 10.0.10011.16384 but not in 9.29.952.3111
|
||||||
|
static Texture2D tex;
|
||||||
|
sampler sam;
|
||||||
|
uniform uint i;
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
float4 unused = tex.Sample(sam, int3(0, 1, 2));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader fail todo]
|
||||||
|
static Texture2D tex1;
|
||||||
|
sampler sam;
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
static Texture2D tex2 = tex1;
|
||||||
|
return tex2.Sample(sam, int3(0, 0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader fail todo]
|
||||||
|
static Texture2D tex1;
|
||||||
|
sampler sam;
|
||||||
|
|
||||||
|
float4 main(Texture2D tex2) : sv_target
|
||||||
|
{
|
||||||
|
tex2 = tex1;
|
||||||
|
return tex2.Sample(sam, int3(0, 0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader]
|
||||||
|
Texture2D real_tex;
|
||||||
|
static Texture2D tex = real_tex;
|
||||||
|
sampler sam;
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
return tex.Sample(sam, int3(0, 0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
draw quad
|
||||||
|
probe all rgba (1, 2, 3, 4)
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader todo]
|
||||||
|
Texture2D real_tex;
|
||||||
|
static Texture2D tex;
|
||||||
|
sampler sam;
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
tex = real_tex;
|
||||||
|
return tex.Sample(sam, int3(0, 0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
todo draw quad
|
||||||
|
todo probe all rgba (1, 2, 3, 4)
|
||||||
|
|
||||||
|
|
||||||
|
[require]
|
||||||
|
shader model >= 5.0
|
||||||
|
|
||||||
|
|
||||||
|
[uav 1]
|
||||||
|
format r32 float
|
||||||
|
size (1, 1)
|
||||||
|
|
||||||
|
0.5
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader todo]
|
||||||
|
// This is allowed in 10.0.10011.16384 but not in 9.29.952.3111
|
||||||
|
static RWTexture2D<float> tex;
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
if (0)
|
||||||
|
{
|
||||||
|
tex[int2(0, 0)] = 2;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@ -155,3 +155,12 @@ float4 main() : sv_target
|
|||||||
uniform 0 float 10.0
|
uniform 0 float 10.0
|
||||||
todo draw quad
|
todo draw quad
|
||||||
todo probe (0, 0) rgba (11.0, 12.0, 13.0, 11.0)
|
todo probe (0, 0) rgba (11.0, 12.0, 13.0, 11.0)
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader fail todo]
|
||||||
|
float4 main(Texture2D tex2) : sv_target
|
||||||
|
{
|
||||||
|
Texture2D tex1;
|
||||||
|
tex2 = tex1;
|
||||||
|
return tex2.Load(int3(0, 0, 0));
|
||||||
|
}
|
||||||
|
@ -167,7 +167,7 @@ static ID3D12RootSignature *d3d12_runner_create_root_signature(struct d3d12_shad
|
|||||||
ID3D12GraphicsCommandList *command_list, unsigned int *uniform_index)
|
ID3D12GraphicsCommandList *command_list, unsigned int *uniform_index)
|
||||||
{
|
{
|
||||||
D3D12_ROOT_SIGNATURE_DESC root_signature_desc = {0};
|
D3D12_ROOT_SIGNATURE_DESC root_signature_desc = {0};
|
||||||
D3D12_ROOT_PARAMETER root_params[3], *root_param;
|
D3D12_ROOT_PARAMETER root_params[4], *root_param;
|
||||||
D3D12_STATIC_SAMPLER_DESC static_samplers[1];
|
D3D12_STATIC_SAMPLER_DESC static_samplers[1];
|
||||||
ID3D12RootSignature *root_signature;
|
ID3D12RootSignature *root_signature;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user