From 7826afcaad78cc33c976bb3db3cdc9eada4c77e8 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Wed, 18 Oct 2023 06:26:00 +0800 Subject: Type layouts for structured buffers with counters (#3269) * More tests for append structured buffer * Append and Consume structured buffer tests for DX12 * neaten * test wobble * Add counter layout information to append/consume structured buffers * add getRWStructuredBufferType * Correct definition of get size for append/consume structured buffers * tweak append structured buffer test * Allow initializing counter buffer in render test * vulkan test for consume structured buffer * Handle null counterVarLayout in getExplicitCounterBindingRangeOffset * remove dead code * Implement atomic counter increment/decrement for spirv * explicit spirv test * Add missing check on result * Hold on to counter resources --------- Co-authored-by: Yong He --- tools/render-test/shader-input-layout.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/render-test/shader-input-layout.h') diff --git a/tools/render-test/shader-input-layout.h b/tools/render-test/shader-input-layout.h index 78d545114..2803d1915 100644 --- a/tools/render-test/shader-input-layout.h +++ b/tools/render-test/shader-input-layout.h @@ -58,6 +58,10 @@ struct InputBufferDesc InputBufferType type = InputBufferType::StorageBuffer; int stride = 0; // stride == 0 indicates an unstructured buffer. Format format = Format::Unknown; + // For RWStructuredBuffer, AppendStructuredBuffer, ConsumeStructuredBuffer + // the default value of 0xffffffff indicates that a counter buffer should + // not be assigned + uint32_t counter = ~0u; }; struct InputSamplerDesc -- cgit v1.2.3