gatherOffset2.hlsl 466 B

123456789101112131415
  1. // RUN: %dxc -T ps_6_0 %s | FileCheck %s
  2. // Test for access violation that previously occured with these gathers
  3. // CHECK: @main
  4. Texture2D<float> shadowMap;
  5. SamplerComparisonState BilinearClampCmpSampler;
  6. SamplerState BilinearClampSampler;
  7. float4 main(float3 uv_depth: TEXCOORD0): SV_Target
  8. {
  9. return shadowMap.GatherCmp(BilinearClampCmpSampler, uv_depth.xy, uv_depth.z, int2(0, 0))
  10. + shadowMap.GatherRed(BilinearClampSampler, uv_depth.xy, int2(0, 0));
  11. }