From: Conor McCarthy cmccarthy@codeweavers.com
--- Makefile.am | 1 + tests/hlsl/calculate-lod.shader_test | 42 ++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 tests/hlsl/calculate-lod.shader_test
diff --git a/Makefile.am b/Makefile.am index a9ea14338..c8dfb2b49 100644 --- a/Makefile.am +++ b/Makefile.am @@ -65,6 +65,7 @@ vkd3d_shader_tests = \ tests/hlsl/bitwise.shader_test \ tests/hlsl/bool-cast.shader_test \ tests/hlsl/bool-semantics.shader_test \ + tests/hlsl/calculate-lod.shader_test \ tests/hlsl/cast-64-bit.shader_test \ tests/hlsl/cast-broadcast.shader_test \ tests/hlsl/cast-componentwise-compatible.shader_test \ diff --git a/tests/hlsl/calculate-lod.shader_test b/tests/hlsl/calculate-lod.shader_test new file mode 100644 index 000000000..f23783fa3 --- /dev/null +++ b/tests/hlsl/calculate-lod.shader_test @@ -0,0 +1,42 @@ +[require] +shader model >= 4.1 + + +[sampler 0] +filter linear linear linear +address clamp clamp clamp + +[srv 0] +size (2d, 4, 4) +0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 +0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 +0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 +0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 + + +[pixel shader todo] +sampler s; +Texture2D t; + +float4 main() : sv_target +{ + return t.CalculateLevelOfDetail(s, float2(0.5, 0.5)); +} + +[test] +todo draw quad +probe all rgba (0.0, 0.0, 0.0, 0.0) + + +[pixel shader todo] +sampler s; +Texture2D t; + +float4 main() : sv_target +{ + return t.CalculateLevelOfDetailUnclamped(s, float2(0.5, 0.5)); +} + +[test] +todo draw quad +probe all rgba (-3.40282347e+38, -3.40282347e+38, -3.40282347e+38, -3.40282347e+38) 1