From 70b2fac658f1965ce414e37fed5d91bb9fcc7b10 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 17 Nov 2023 00:39:18 +0000 Subject: [PATCH] Fix compile warning on some D3D12 HLSL compiler versions --- renderdoc/data/hlsl/quadoverdraw.hlsl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/renderdoc/data/hlsl/quadoverdraw.hlsl b/renderdoc/data/hlsl/quadoverdraw.hlsl index 86cdccb78e..7fe59edab8 100644 --- a/renderdoc/data/hlsl/quadoverdraw.hlsl +++ b/renderdoc/data/hlsl/quadoverdraw.hlsl @@ -49,7 +49,10 @@ Texture2DArray overdrawSRV : register(t0); // (* For more details, see: // "Shader Amortization using Pixel Quad Message Passing", Eric Penner, GPU Pro 2.) uint2 p = uint2(vpos.xy) & 1; - int2 sign = p ? -1 : 1; + int2 sign; + sign.x = p.x ? -1 : 1; + sign.y = p.y ? -1 : 1; + uint c1 = c0 + sign.x * ddx_fine(c0); uint c2 = c0 + sign.y * ddy_fine(c0); uint c3 = c2 + sign.x * ddx_fine(c2);