diff options
Diffstat (limited to 'tools/gfx/renderer-shared.cpp')
| -rw-r--r-- | tools/gfx/renderer-shared.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/tools/gfx/renderer-shared.cpp b/tools/gfx/renderer-shared.cpp index 791cb1859..64f3f318c 100644 --- a/tools/gfx/renderer-shared.cpp +++ b/tools/gfx/renderer-shared.cpp @@ -31,6 +31,7 @@ const Slang::Guid GfxGUID::IID_ICommandBuffer = SLANG_UUID_ICommandBuffer; const Slang::Guid GfxGUID::IID_ICommandQueue = SLANG_UUID_ICommandQueue; const Slang::Guid GfxGUID::IID_IQueryPool = SLANG_UUID_IQueryPool; const Slang::Guid GfxGUID::IID_IAccelerationStructure = SLANG_UUID_IAccelerationStructure; +const Slang::Guid GfxGUID::IID_IFence = SLANG_UUID_IFence; StageType translateStage(SlangStage slangStage) @@ -300,6 +301,30 @@ SLANG_NO_THROW bool SLANG_MCALL RendererBase::hasFeature(const char* featureName return m_features.findFirstIndex([&](Slang::String x) { return x == featureName; }) != -1; } +Result RendererBase::getFormatSupportedResourceStates(Format format, ResourceStateSet* outStates) +{ + SLANG_UNUSED(format); + outStates->add(ResourceState::AccelerationStructure); + outStates->add(ResourceState::ConstantBuffer); + outStates->add(ResourceState::CopyDestination); + outStates->add(ResourceState::CopySource); + outStates->add(ResourceState::DepthRead); + outStates->add(ResourceState::DepthWrite); + outStates->add(ResourceState::IndexBuffer); + outStates->add(ResourceState::IndirectArgument); + outStates->add(ResourceState::PreInitialized); + outStates->add(ResourceState::Present); + outStates->add(ResourceState::RenderTarget); + outStates->add(ResourceState::ResolveDestination); + outStates->add(ResourceState::ResolveSource); + outStates->add(ResourceState::ShaderResource); + outStates->add(ResourceState::StreamOutput); + outStates->add(ResourceState::Undefined); + outStates->add(ResourceState::UnorderedAccess); + outStates->add(ResourceState::VertexBuffer); + return SLANG_OK; +} + SLANG_NO_THROW Result SLANG_MCALL RendererBase::getSlangSession(slang::ISession** outSlangSession) { *outSlangSession = slangContext.session.get(); @@ -352,6 +377,31 @@ Result RendererBase::createRayTracingPipelineState(const RayTracingPipelineState return SLANG_E_NOT_AVAILABLE; } +Result RendererBase::createMutableRootShaderObject( + IShaderProgram* program, IShaderObject** outObject) +{ + SLANG_UNUSED(program); + SLANG_UNUSED(outObject); + return SLANG_E_NOT_AVAILABLE; +} + +Result RendererBase::createFence(const IFence::Desc& desc, IFence** outFence) +{ + SLANG_UNUSED(desc); + *outFence = nullptr; + return SLANG_E_NOT_AVAILABLE; +} + +Result RendererBase::waitForFences( + IFence** fences, uint32_t fenceCount, bool waitForAll, uint64_t timeout) +{ + SLANG_UNUSED(fences); + SLANG_UNUSED(fenceCount); + SLANG_UNUSED(waitForAll); + SLANG_UNUSED(timeout); + return SLANG_E_NOT_AVAILABLE; +} + Result RendererBase::getShaderObjectLayout( slang::TypeReflection* type, ShaderObjectContainerType container, |
