From 1303a50cf54b779fd3f39ba83e3bab68ce3a9b9e Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 28 Oct 2022 14:13:06 +0100 Subject: [PATCH] Sampler tables should not be marked as data volatile (the default) --- util/test/demos/d3d12/d3d12_helpers.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/util/test/demos/d3d12/d3d12_helpers.cpp b/util/test/demos/d3d12/d3d12_helpers.cpp index c1a6b8c27..920402b54 100644 --- a/util/test/demos/d3d12/d3d12_helpers.cpp +++ b/util/test/demos/d3d12/d3d12_helpers.cpp @@ -203,6 +203,11 @@ D3D12_ROOT_PARAMETER1 tableParam(D3D12_SHADER_VISIBILITY vis, D3D12_DESCRIPTOR_R static D3D12_DESCRIPTOR_RANGE1 ranges[32] = {}; static int rangeIdx = 0; + if(type == D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER) + { + flags &= ~D3D12_DESCRIPTOR_RANGE_FLAG_DATA_VOLATILE; + } + D3D12_DESCRIPTOR_RANGE1 &range = ranges[rangeIdx]; rangeIdx = (rangeIdx + 1) % ARRAY_COUNT(ranges);