From 5aae46a86eeceec378f103d63e702036aa97289a Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 18 Nov 2022 12:24:05 +0000 Subject: [PATCH] Test out-of-bounds descriptor access in D3D12 indexing test --- util/test/demos/d3d12/d3d12_descriptor_indexing.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util/test/demos/d3d12/d3d12_descriptor_indexing.cpp b/util/test/demos/d3d12/d3d12_descriptor_indexing.cpp index d7bdf4936..665b011e1 100644 --- a/util/test/demos/d3d12/d3d12_descriptor_indexing.cpp +++ b/util/test/demos/d3d12/d3d12_descriptor_indexing.cpp @@ -102,7 +102,11 @@ float4 main(v2f IN) : SV_Target0 for(int i=0; i < 100; i++) { tex_ref t = buf[i]; - if(t.tex == 100) break; + if(t.tex == 100) + { + ret += texArray1[t.binding*100].SampleLevel(s, uv.xy, 0); + break; + } if(t.tex == 0) {