From b5b3a8d36c09631cbd4cf236c0280a314436748d Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 3 Sep 2019 14:36:55 -0400 Subject: CPU uniform entry point params (#1041) * * Made entry point parameters a separate entry point * Made CPUMemoryBinding work with entry point parameters/initialize constant buffers * Added isCPUOnly to bindings, because entry point parameters do not layout like constant buffer * entry-point-uniform.slang works on CPU * EntryPointParams -> UniformEntryPointParams Updated CPU documentation. * Update cpu-target.md to removed completed issues. * Only allocate CPU buffers if the size is > 0. Small update to cpu-target doc. --- tests/compute/entry-point-uniform-params.slang | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tests/compute') diff --git a/tests/compute/entry-point-uniform-params.slang b/tests/compute/entry-point-uniform-params.slang index f91f7d146..e0c14ec93 100644 --- a/tests/compute/entry-point-uniform-params.slang +++ b/tests/compute/entry-point-uniform-params.slang @@ -3,6 +3,8 @@ // Confirm that `uniform` parameters on // entry points are allowed, and work as expected. +//DISABLE_TEST:CPU_REFLECTION: -profile cs_5_0 -entry computeMain -target cpp +//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -cpu //TEST(compute):COMPARE_COMPUTE_EX:-slang -compute //TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 //TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute @@ -25,16 +27,17 @@ struct Things // A shader parameter at global scope should be assigned // a register/binding before any related to the entry point. -//TEST_INPUT:cbuffer(data=[1 0 0 0]):dxbinding(0),glbinding(0) +//TEST_INPUT:cbuffer(data=[1 0 0 0]):dxbinding(0),glbinding(0),name=signs ConstantBuffer signs; [numthreads(4, 1, 1)] void computeMain( -//TEST_INPUT:cbuffer(data=[2 0 0 0 3 0 0 0]):dxbinding(1),glbinding(1) +//TEST_INPUT:cbuffer(data=[2 0 0 0 3 0 0 0]):dxbinding(1),glbinding(1),name=stuff uniform Stuff stuff, +//TEST_INPUT:cbuffer(data=[3]):,isCPUOnly,name=things uniform Things things, -//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 uniform RWStructuredBuffer outputBuffer, uint3 dispatchThreadID : SV_DispatchThreadID) -- cgit v1.2.3