From c8c281b503d6d7c14a06ba56acd93dda48663776 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 29 Jul 2020 14:52:05 +0100 Subject: [PATCH] Test swizzles on byte address buffer loads --- util/test/demos/d3d11/d3d11_shader_debug_zoo.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/util/test/demos/d3d11/d3d11_shader_debug_zoo.cpp b/util/test/demos/d3d11/d3d11_shader_debug_zoo.cpp index 9c76215fd..ed5342a91 100644 --- a/util/test/demos/d3d11/d3d11_shader_debug_zoo.cpp +++ b/util/test/demos/d3d11/d3d11_shader_debug_zoo.cpp @@ -597,6 +597,14 @@ float4 main(v2f IN) : SV_Target0 sincos(val, a, b); return float4(val, a, b, 0.0f); } + if(IN.tri == 68) + { + // use this to ensure the compiler doesn't know we're using fixed locations + uint z = intval - IN.tri - 7; + + // try to force a swizzle on the load + return asfloat(byterotest.Load4(z+0).yz).xyxy; + } return float4(0.4f, 0.4f, 0.4f, 0.4f); }