From a03d21a5f54cba913c3f52e2822a433de8f39fdd Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 30 Jun 2021 14:59:18 -0700 Subject: [gfx] Add inline ray tracing support. (#1899) --- tools/gfx/cuda/render-cuda.cpp | 38 ++++++-------------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) (limited to 'tools/gfx/cuda/render-cuda.cpp') diff --git a/tools/gfx/cuda/render-cuda.cpp b/tools/gfx/cuda/render-cuda.cpp index 5a7e7babf..ffd197e57 100644 --- a/tools/gfx/cuda/render-cuda.cpp +++ b/tools/gfx/cuda/render-cuda.cpp @@ -920,22 +920,6 @@ public: class ComputeCommandEncoderImpl : public IComputeCommandEncoder { - public: - virtual SLANG_NO_THROW SlangResult SLANG_MCALL - queryInterface(SlangUUID const& uuid, void** outObject) override - { - if (uuid == GfxGUID::IID_ISlangUnknown || uuid == GfxGUID::IID_ICommandEncoder || - uuid == GfxGUID::IID_IComputeCommandEncoder) - { - *outObject = static_cast(this); - return SLANG_OK; - } - *outObject = nullptr; - return SLANG_E_NO_INTERFACE; - } - virtual SLANG_NO_THROW uint32_t SLANG_MCALL addRef() override { return 1; } - virtual SLANG_NO_THROW uint32_t SLANG_MCALL release() override { return 1; } - public: CommandWriter* m_writer; CommandBufferImpl* m_commandBuffer; @@ -981,22 +965,6 @@ public: class ResourceCommandEncoderImpl : public IResourceCommandEncoder { - public: - virtual SLANG_NO_THROW SlangResult SLANG_MCALL - queryInterface(SlangUUID const& uuid, void** outObject) override - { - if (uuid == GfxGUID::IID_ISlangUnknown || uuid == GfxGUID::IID_ICommandEncoder || - uuid == GfxGUID::IID_IResourceCommandEncoder) - { - *outObject = static_cast(this); - return SLANG_OK; - } - *outObject = nullptr; - return SLANG_E_NO_INTERFACE; - } - virtual SLANG_NO_THROW uint32_t SLANG_MCALL addRef() override { return 1; } - virtual SLANG_NO_THROW uint32_t SLANG_MCALL release() override { return 1; } - public: CommandWriter* m_writer; @@ -1037,6 +1005,12 @@ public: *outEncoder = &m_resourceCommandEncoder; } + virtual SLANG_NO_THROW void SLANG_MCALL + encodeRayTracingCommands(IRayTracingCommandEncoder** outEncoder) override + { + *outEncoder = nullptr; + } + virtual SLANG_NO_THROW void SLANG_MCALL close() override {} }; -- cgit v1.2.3