Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
vkd3d
Manage
Activity
Members
Labels
Plan
Wiki
Bugzilla
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wine
vkd3d
Commits
b8a85c6a
Commit
b8a85c6a
authored
2 years ago
by
Francisco Casas
Committed by
Alexandre Julliard
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
tests: Add lowering combined samplers tests.
parent
ab37b27a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!209
vkd3d-shader/hlsl: Broaden resources support v2, part 3.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile.am
+1
-0
1 addition, 0 deletions
Makefile.am
tests/hlsl/combined-samplers.shader_test
+153
-0
153 additions, 0 deletions
tests/hlsl/combined-samplers.shader_test
with
154 additions
and
0 deletions
Makefile.am
+
1
−
0
View file @
b8a85c6a
...
...
@@ -70,6 +70,7 @@ vkd3d_shader_tests = \
tests/hlsl/cbuffer.shader_test
\
tests/hlsl/clamp.shader_test
\
tests/hlsl/clip.shader_test
\
tests/hlsl/combined-samplers.shader_test
\
tests/hlsl/comma.shader_test
\
tests/hlsl/compute.shader_test
\
tests/hlsl/conditional.shader_test
\
...
...
This diff is collapsed.
Click to expand it.
tests/hlsl/combined-samplers.shader_test
0 → 100644
+
153
−
0
View file @
b8a85c6a
[require]
shader model >= 4.0
[sampler 0]
filter linear linear linear
address clamp clamp clamp
[sampler 1]
filter linear linear linear
address clamp clamp clamp
[sampler 2]
filter linear linear linear
address clamp clamp clamp
[texture 0]
size (1, 1)
0.0 0.0 0.0 1.0
[texture 1]
size (1, 1)
1.0 1.0 1.0 1.0
[texture 2]
size (1, 1)
2.0 2.0 2.0 1.0
[texture 3]
size (1, 1)
3.0 3.0 3.0 1.0
[texture 4]
size (1, 1)
4.0 4.0 4.0 1.0
[pixel shader todo]
sampler sam;
float4 main() : sv_target
{
return tex2D(sam, float2(0, 0));
}
[test]
todo draw quad
todo probe all rgba (0, 0, 0, 1)
% Textures for new separated samplers are allocated before regular textures.
[pixel shader todo]
Texture2D tex;
sampler sam;
float4 main() : sv_target
{
return 10 * tex.Sample(sam, float2(0, 0)) + tex2D(sam, float2(0, 0));
}
[test]
todo draw quad
todo probe all rgba (10, 10, 10, 11)
[pixel shader todo]
Texture2D tex;
sampler sam[2];
float4 main() : sv_target
{
return 10 * tex.Sample(sam[0], float2(0, 0)) + tex2D(sam[1], float2(0, 0));
}
[test]
todo draw quad
todo probe all rgba (21, 21, 21, 11)
[pixel shader todo]
sampler sam0;
sampler sam1;
sampler sam2;
float4 main() : sv_target
{
return 100 * tex2D(sam1, float2(0, 0)) + 10 * tex2D(sam0, float2(0, 0))
+ tex2D(sam2, float2(0, 0));
}
[test]
todo draw quad
todo probe all rgba (12, 12, 12, 111)
[pixel shader todo]
Texture2D tex[2][2];
sampler sam;
float4 main() : sv_target
{
return 100 * tex[0][0].Load(int3(0, 0, 0)) + 10 * tex2D(sam, float2(0, 0))
+ tex[1][1].Sample(sam, float2(0, 0));
}
[test]
todo draw quad
todo probe all rgba (104, 104, 104, 111)
% Sampler arrays with components that have different usage dimensions are only forbidden in SM4 upwards.
% However, tex2D and tex1D are considered the same dimension for these purposes.
[pixel shader fail todo]
sampler sam[2];
float4 main() : sv_target
{
return tex2D(sam[0], float2(0, 0)) + tex3D(sam[1], float3(0, 0, 0));
}
[pixel shader todo]
sampler sam[2];
float4 main() : sv_target
{
return 10 * tex2D(sam[0], float2(0, 0)) + tex1D(sam[1], 0);
}
[test]
todo draw quad
todo probe all rgba (1, 1, 1, 11)
[require]
shader model >= 5.0
[pixel shader todo]
struct
{
Texture2D tex;
sampler sam;
} foo;
float4 main() : sv_target
{
return 10 * foo.tex.Sample(foo.sam, float2(0, 0)) + tex2D(foo.sam, float2(0, 0));
}
[test]
todo draw quad
todo probe all rgba (10, 10, 10, 11)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment