diff options
| author | Yong He <yonghe@outlook.com> | 2022-08-16 17:11:54 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-16 17:11:54 -0700 |
| commit | 42f49937ffa69c82e333e886952eed027e12340e (patch) | |
| tree | 08e3e9821dd40e23476060215d589e29092adb53 /examples/ray-tracing/main.cpp | |
| parent | e68fab2bda5d979f8d991fc41122bb9aa71849a6 (diff) | |
Add gfx interface definition in Slang. (#2364)
* Add gfx interface definition in Slang.
- add gfx interface definitons in Slang.
- fix slang compiler to correctly type-check `out` interface argument.
- modify gfx interface to be fully COM compatible
- add convenient ShaderProgram creation methods to gfx.
* Fix compile errors and warnings.
* Update project files
* Fix cuda.
* Properly implement queryInterface in command encoder impls.
Co-authored-by: Yong He <yhe@nvidia.com>
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 82ad01c95..a12da707d 100644 --- a/examples/ray-tracing/main.cpp +++ b/examples/ray-tracing/main.cpp @@ -404,13 +404,13 @@ Slang::Result initialize() IBufferResource::Desc asBufferDesc; asBufferDesc.type = IResource::Type::Buffer; asBufferDesc.defaultState = ResourceState::AccelerationStructure; - asBufferDesc.sizeInBytes = compactedSize; + asBufferDesc.sizeInBytes = (Size)compactedSize; gBLASBuffer = gDevice->createBufferResource(asBufferDesc); IAccelerationStructure::CreateDesc createDesc; createDesc.buffer = gBLASBuffer; createDesc.kind = IAccelerationStructure::Kind::BottomLevel; createDesc.offset = 0; - createDesc.size = compactedSize; + createDesc.size = (Size)compactedSize; gDevice->createAccelerationStructure(createDesc, gBLAS.writeRef()); commandBuffer = gTransientHeaps[0]->createCommandBuffer(); |
