summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-07-01 12:45:02 -0400
committerGitHub <noreply@github.com>2020-07-01 12:45:02 -0400
commit69a059511389506460abd6f1f8ffe71e1dba5aa0 (patch)
treebb5b254a26dd31ac3e139464a44792ae8715ca79 /source
parent8ced9d2a0efaca8f6dbdaf427be1db52844787b5 (diff)
Fix handling of UniformState from #1396 (#1417)
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-emit-cuda.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/slang/slang-emit-cuda.cpp b/source/slang/slang-emit-cuda.cpp
index 6272ea02e..b79518052 100644
--- a/source/slang/slang-emit-cuda.cpp
+++ b/source/slang/slang-emit-cuda.cpp
@@ -739,7 +739,7 @@ void CUDASourceEmitter::emitModuleImpl(IRModule* module)
// Output the 'Context' which will be used for execution
{
- m_writer->emit("struct Context\n{\n");
+ m_writer->emit("struct KernelContext\n{\n");
m_writer->indent();
m_writer->emit("UniformState* uniformState;\n");
@@ -885,7 +885,7 @@ void CUDASourceEmitter::emitModuleImpl(IRModule* module)
m_writer->indent();
// Initialize when constructing so that globals are zeroed
- m_writer->emit("Context context = {};\n");
+ m_writer->emit("KernelContext context = {};\n");
// The global-scope parameter data got passed in differently depending on whether we have
// a compute shader or a ray-tracing shader, so we need to alter how we initialize
@@ -893,7 +893,7 @@ void CUDASourceEmitter::emitModuleImpl(IRModule* module)
//
if( stage == Stage::Compute )
{
- m_writer->emit("context.uniformState = uniformState;\n");
+ m_writer->emit("context.uniformState = (UniformState*)uniformState;\n");
}
else
{