From: Conor McCarthy cmccarthy@codeweavers.com
--- Makefile.am | 1 + tests/hlsl/calculate-lod.shader_test | 44 ++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 tests/hlsl/calculate-lod.shader_test
diff --git a/Makefile.am b/Makefile.am index 68e8642e0..d6295d1f0 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..aca46d4d8 --- /dev/null +++ b/tests/hlsl/calculate-lod.shader_test @@ -0,0 +1,44 @@ +[require] +shader model >= 4.1 + + +[sampler 0] +filter linear linear linear +address clamp clamp clamp + +[srv 0] +size (2d, 4, 4) +levels 2 + +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