From 3af404da7f7f125464b78159940cb3fc06e69cc5 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 17 Sep 2019 12:25:45 -0400 Subject: CPU ABI improvements (#1056) * WIP: Improving CPU performance/ABI * Optionally output code on CPU for groupThreadID and groupID. * Added ability to set compute dispatch size on command line for render-test. Dispatch compute tests taking into account dispatch size. Added test for semantics are working. * Test using GroupRange. * Fix problem with adding \n for externa diagnostic - to do it if there isn't a \n at the end. Change the ouput order (put result before) so last value is diagnostic string. --- tools/render-test/render-test-main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/render-test/render-test-main.cpp') diff --git a/tools/render-test/render-test-main.cpp b/tools/render-test/render-test-main.cpp index 0e457f9e4..2a0b9a6c9 100644 --- a/tools/render-test/render-test-main.cpp +++ b/tools/render-test/render-test-main.cpp @@ -232,7 +232,7 @@ void RenderTestApp::runCompute() auto pipelineType = PipelineType::Compute; m_renderer->setPipelineState(pipelineType, m_pipelineState); m_bindingState->apply(m_renderer, pipelineType); - m_renderer->dispatchCompute(1, 1, 1); + m_renderer->dispatchCompute(m_options.computeDispatchSize[0], m_options.computeDispatchSize[1], m_options.computeDispatchSize[2]); } void RenderTestApp::finalize() @@ -461,7 +461,7 @@ SLANG_TEST_TOOL_API SlangResult innerMain(Slang::StdWriters* stdWriters, SlangSe CPUComputeUtil::Context context; SLANG_RETURN_ON_FAIL(CPUComputeUtil::calcBindings(compilationAndLayout, context)); - SLANG_RETURN_ON_FAIL(CPUComputeUtil::execute(compilationAndLayout, context)); + SLANG_RETURN_ON_FAIL(CPUComputeUtil::execute(gOptions.computeDispatchSize, compilationAndLayout, context)); // Dump everything out that was written return CPUComputeUtil::writeBindings(compilationAndLayout.layout, context.buffers, gOptions.outputPath); -- cgit v1.2.3