pixelCounterEarlyZ.hlsl 664 B

12345678910111213141516
  1. // RUN: %dxc -Emain -Tps_6_0 %s | %opt -S -hlsl-dxil-add-pixel-hit-instrmentation,rt-width=16,num-pixels=64,force-early-z=1 | %FileCheck %s
  2. // Check the write to the UAV was emitted:
  3. // CHECK: %UAVIncResult = call i32 @dx.op.atomicBinOp.i32(i32 78, %dx.types.Handle %PIX_CountUAV_Handle, i32 0, i32 %ByteIndex, i32 undef, i32 undef, i32 1)
  4. // Early z flag value is 8. The flags are stored in an entry in the entry function description record. See:
  5. // https://github.com/Microsoft/DirectXShaderCompiler/blob/master/docs/DXIL.rst#shader-properties-and-capabilities
  6. // CHECK: !{i32 0, i64 8}
  7. float4 main(float4 pos : SV_Position) : SV_Target {
  8. return pos;
  9. }