diff options
Diffstat (limited to 'examples/ray-tracing/main.cpp')
| -rw-r--r-- | examples/ray-tracing/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/ray-tracing/main.cpp b/examples/ray-tracing/main.cpp index 1285be866..e26393cbc 100644 --- a/examples/ray-tracing/main.cpp +++ b/examples/ray-tracing/main.cpp @@ -496,7 +496,7 @@ Slang::Result initialize() InputElementDesc inputElements[] = { {"POSITION", 0, Format::R32G32_FLOAT, offsetof(FullScreenTriangle::Vertex, position)}, }; - auto inputLayout = gDevice->createInputLayout(&inputElements[0], SLANG_COUNT_OF(inputElements)); + auto inputLayout = gDevice->createInputLayout(sizeof(FullScreenTriangle::Vertex), &inputElements[0], SLANG_COUNT_OF(inputElements)); if (!inputLayout) return SLANG_FAIL; @@ -622,7 +622,7 @@ virtual void renderFrame(int frameBufferIndex) override auto cursor = ShaderCursor(rootObject->getEntryPoint(1)); cursor["t"].setResource(gResultTextureUAV); presentEncoder->setVertexBuffer( - 0, gFullScreenVertexBuffer, sizeof(FullScreenTriangle::Vertex)); + 0, gFullScreenVertexBuffer); presentEncoder->setPrimitiveTopology(PrimitiveTopology::TriangleList); presentEncoder->draw(3); presentEncoder->endEncoding(); |
