summaryrefslogtreecommitdiffstats
path: root/examples/gpu-printing/main.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-04-05 13:31:05 -0700
committerGitHub <noreply@github.com>2021-04-05 13:31:05 -0700
commit086ecf41fa21138899960bb9805bc8ced91690f0 (patch)
treec98af81ffc28371a9334e71987a85f9e88bce678 /examples/gpu-printing/main.cpp
parentdd662f5cda97e7a6720ef526509a772a06112d4a (diff)
Transient root shader object. (#1782)
Diffstat (limited to 'examples/gpu-printing/main.cpp')
-rw-r--r--examples/gpu-printing/main.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/gpu-printing/main.cpp b/examples/gpu-printing/main.cpp
index a0acb8159..265b4c5ff 100644
--- a/examples/gpu-printing/main.cpp
+++ b/examples/gpu-printing/main.cpp
@@ -121,9 +121,7 @@ Result execute()
auto queue = gDevice->createCommandQueue(queueDesc);
auto commandBuffer = transientHeap->createCommandBuffer();
auto encoder = commandBuffer->encodeComputeCommands();
- auto rootShaderObject = gDevice->createRootShaderObject(gProgram);
- encoder->setPipelineState(gPipelineState);
- encoder->bindRootShaderObject(rootShaderObject);
+ auto rootShaderObject = encoder->bindPipeline(gPipelineState);
encoder->dispatchCompute(1, 1, 1);
encoder->endEncoding();
commandBuffer->close();