From 06a0e3980fd04fa265bd20eb11f2abc18bd6a215 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 22 Aug 2019 15:58:28 -0400 Subject: WIP: CPU compute coverage (#1030) * Add support for '=' when defining a name in test. * Add support for double intrinsics. * Add support for asdouble Add findOrAddInst - used instead of findOrEmitHoistableInst, for nominal instructions. Support cloning of string literals. C++ working on more compute tests. * Constant buffer support in reflection. Fixed debugging into source for generated C++. buffer-layout.slang works. * Added cpu test result. * Remove some commented out code. Comment on next fixes. * Improvements to reflection CPU code. * C++ working with ByteAddressBuffer. * Enabled more compute tests for CPU. * Enabled more compute tests on CPU. Added support for [] style access to a vector. * Enabled more CPU compute tests. * Handling of buffer-type-splitting.slang Named buffers can be paths to resources * Fix some warnings, remove some dead code. * Fix problem with verification of number of operands for asuint/asint as they can have 1 or 3 operands. asdouble takes 2. * Fix handling in MemoryArena around aligned allocations. That _allocateAlignedFromNewBlock assumed the block allocated has the aligment that was requested and so did not correct the start address. --- tests/compute/func-cbuffer-param.slang | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/compute/func-cbuffer-param.slang') diff --git a/tests/compute/func-cbuffer-param.slang b/tests/compute/func-cbuffer-param.slang index 1fe7d2a38..a0784e21e 100644 --- a/tests/compute/func-cbuffer-param.slang +++ b/tests/compute/func-cbuffer-param.slang @@ -8,19 +8,20 @@ //TEST(compute):COMPARE_COMPUTE_EX:-slang -compute //TEST(compute, vulkan, compatibility-issue):COMPARE_COMPUTE_EX:-dx12 -compute -use-dxil //TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute +//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-cpu -compute struct Data { int4 val[4]; } -//TEST_INPUT:cbuffer(data=[0 1 2 3 16 17 18 19 32 33 34 35 48 49 50 51]):dxbinding(0),glbinding(0) +//TEST_INPUT:cbuffer(data=[0 1 2 3 16 17 18 19 32 33 34 35 48 49 50 51]):dxbinding(0),glbinding(0),name=a ConstantBuffer a; -//TEST_INPUT:cbuffer(data=[16 17 18 19 32 33 34 35 48 49 50 51 64 65 66 67]):dxbinding(1),glbinding(1) +//TEST_INPUT:cbuffer(data=[16 17 18 19 32 33 34 35 48 49 50 51 64 65 66 67]):dxbinding(1),glbinding(1),name=b ConstantBuffer b; -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):dxbinding(0),glbinding(2),out +//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):dxbinding(0),glbinding(2),out,name=outputBuffer RWStructuredBuffer outputBuffer; int helper(ConstantBuffer buffer, int index) -- cgit v1.2.3