From 9e567836f3e63c541cde7b0a02fd2fc7916402c8 Mon Sep 17 00:00:00 2001 From: azhirnov Date: Sun, 4 Oct 2020 23:22:16 +0300 Subject: Added dummy implementation for D3D11, D3D12, OpenGL --- .../include/DeviceContextD3D11Impl.hpp | 15 +++++++++++++ .../include/RenderDeviceD3D11Impl.hpp | 12 +++++++++++ .../src/DeviceContextD3D11Impl.cpp | 25 ++++++++++++++++++++++ .../src/RenderDeviceD3D11Impl.cpp | 24 ++++++++++++++++++++- 4 files changed, 75 insertions(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp index dbb74361..6b613458 100644 --- a/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp @@ -246,6 +246,21 @@ public: /// Implementation of IDeviceContext::Flush() in Direct3D11 backend. virtual void DILIGENT_CALL_TYPE Flush() override final; + /// Implementation of IDeviceContext::BuildBLAS(). + virtual void DILIGENT_CALL_TYPE BuildBLAS(const BLASBuildAttribs& Attribs) override final; + + /// Implementation of IDeviceContext::BuildTLAS(). + virtual void DILIGENT_CALL_TYPE BuildTLAS(const TLASBuildAttribs& Attribs) override final; + + /// Implementation of IDeviceContext::CopyBLAS(). + virtual void DILIGENT_CALL_TYPE CopyBLAS(const CopyBLASAttribs& Attribs) override final; + + /// Implementation of IDeviceContext::CopyTLAS(). + virtual void DILIGENT_CALL_TYPE CopyTLAS(const CopyTLASAttribs& Attribs) override final; + + /// Implementation of IDeviceContext::TraceRays(). + virtual void DILIGENT_CALL_TYPE TraceRays(const TraceRaysAttribs& Attribs) override final; + /// Implementation of IDeviceContextD3D11::GetD3D11DeviceContext(). virtual ID3D11DeviceContext* DILIGENT_CALL_TYPE GetD3D11DeviceContext() override final { return m_pd3d11DeviceContext; } diff --git a/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.hpp index 8003615e..2d279b86 100644 --- a/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.hpp @@ -89,6 +89,18 @@ public: virtual void DILIGENT_CALL_TYPE CreateFramebuffer(const FramebufferDesc& Desc, IFramebuffer** ppFramebuffer) override final; + /// Implementation of IRenderDevice::CreateBLAS() in Direct3D11 backend. + virtual void DILIGENT_CALL_TYPE CreateBLAS(const BottomLevelASDesc& Desc, + IBottomLevelAS** ppBLAS) override final; + + /// Implementation of IRenderDevice::CreateTLAS() in Direct3D11 backend. + virtual void DILIGENT_CALL_TYPE CreateTLAS(const TopLevelASDesc& Desc, + ITopLevelAS** ppTLAS) override final; + + /// Implementation of IRenderDevice::CreateSBT() in Direct3D11 backend. + virtual void DILIGENT_CALL_TYPE CreateSBT(const ShaderBindingTableDesc& Desc, + IShaderBindingTable** ppSBT) override final; + /// Implementation of IRenderDeviceD3D11::GetD3D11Device() in Direct3D11 backend. ID3D11Device* DILIGENT_CALL_TYPE GetD3D11Device() override final { return m_pd3d11Device; } diff --git a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp index 6af8b502..c396b15c 100755 --- a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp @@ -2297,6 +2297,31 @@ void DeviceContextD3D11Impl::ResolveTextureSubresource(ITexture* m_pd3d11DeviceContext->ResolveSubresource(pDstTexD3D11->GetD3D11Texture(), DstSubresIndex, pSrcTexD3D11->GetD3D11Texture(), SrcSubresIndex, DXGIFmt); } +void DeviceContextD3D11Impl::BuildBLAS(const BLASBuildAttribs& Attribs) +{ + UNSUPPORTED("BuildBLAS is not supported in DirectX 11"); +} + +void DeviceContextD3D11Impl::BuildTLAS(const TLASBuildAttribs& Attribs) +{ + UNSUPPORTED("BuildTLAS is not supported in DirectX 11"); +} + +void DeviceContextD3D11Impl::CopyBLAS(const CopyBLASAttribs& Attribs) +{ + UNSUPPORTED("CopyBLAS is not supported in DirectX 11"); +} + +void DeviceContextD3D11Impl::CopyTLAS(const CopyTLASAttribs& Attribs) +{ + UNSUPPORTED("CopyTLAS is not supported in DirectX 11"); +} + +void DeviceContextD3D11Impl::TraceRays(const TraceRaysAttribs& Attribs) +{ + UNSUPPORTED("TraceRays is not supported in DirectX 11"); +} + // clang-format off #ifdef VERIFY_CONTEXT_BINDINGS DEFINE_D3D11CTX_FUNC_POINTERS(GetCBMethods, GetConstantBuffers) diff --git a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp index 76020ed8..5793508a 100644 --- a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp @@ -147,6 +147,7 @@ RenderDeviceD3D11Impl::RenderDeviceD3D11Impl(IReferenceCounters* pRefCo UNSUPPORTED_FEATURE(BindlessResources, "Bindless resources are"); UNSUPPORTED_FEATURE(VertexPipelineUAVWritesAndAtomics, "Vertex pipeline UAV writes and atomics are"); UNSUPPORTED_FEATURE(MeshShaders, "Mesh shaders are"); + UNSUPPORTED_FEATURE(RayTracing, "Ray tracing are"); { bool ShaderFloat16Supported = false; @@ -176,7 +177,7 @@ RenderDeviceD3D11Impl::RenderDeviceD3D11Impl(IReferenceCounters* pRefCo #undef UNSUPPORTED_FEATURE #if defined(_MSC_VER) && defined(_WIN64) - static_assert(sizeof(DeviceFeatures) == 30, "Did you add a new feature to DeviceFeatures? Please handle its satus here."); + static_assert(sizeof(DeviceFeatures) == 31, "Did you add a new feature to DeviceFeatures? Please handle its satus here."); #endif auto& TexCaps = m_DeviceCaps.TexCaps; @@ -440,6 +441,27 @@ void RenderDeviceD3D11Impl::CreateFramebuffer(const FramebufferDesc& Desc, IFram }); } +void RenderDeviceD3D11Impl::CreateBLAS(const BottomLevelASDesc& Desc, + IBottomLevelAS** ppBLAS) +{ + UNSUPPORTED("CreateBLAS is not supported in DirectX 11"); + *ppBLAS = nullptr; +} + +void RenderDeviceD3D11Impl::CreateTLAS(const TopLevelASDesc& Desc, + ITopLevelAS** ppTLAS) +{ + UNSUPPORTED("CreateTLAS is not supported in DirectX 11"); + *ppTLAS = nullptr; +} + +void RenderDeviceD3D11Impl::CreateSBT(const ShaderBindingTableDesc& Desc, + IShaderBindingTable** ppSBT) +{ + UNSUPPORTED("CreateSBT is not supported in DirectX 11"); + *ppSBT = nullptr; +} + void RenderDeviceD3D11Impl::IdleGPU() { if (auto pImmediateCtx = m_wpImmediateContext.Lock()) -- cgit v1.2.3 From 73fd82a29d3175e156754010f5de261d6f561f16 Mon Sep 17 00:00:00 2001 From: assiduous Date: Sun, 4 Oct 2020 16:59:33 -0700 Subject: A few random fixes to ray tracing API and implementation --- Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp index 5793508a..d0d4957b 100644 --- a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp @@ -147,7 +147,7 @@ RenderDeviceD3D11Impl::RenderDeviceD3D11Impl(IReferenceCounters* pRefCo UNSUPPORTED_FEATURE(BindlessResources, "Bindless resources are"); UNSUPPORTED_FEATURE(VertexPipelineUAVWritesAndAtomics, "Vertex pipeline UAV writes and atomics are"); UNSUPPORTED_FEATURE(MeshShaders, "Mesh shaders are"); - UNSUPPORTED_FEATURE(RayTracing, "Ray tracing are"); + UNSUPPORTED_FEATURE(RayTracing, "Ray tracing is"); { bool ShaderFloat16Supported = false; -- cgit v1.2.3 From 7f26e40e0898391a32e6a05d91ef1a217d885668 Mon Sep 17 00:00:00 2001 From: azhirnov Date: Sun, 25 Oct 2020 15:53:05 +0300 Subject: PSO refactoring for ray tracing --- .../GraphicsEngineD3D11/include/PipelineStateD3D11Impl.hpp | 2 +- .../GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.hpp | 4 ++++ .../include/ShaderResourceBindingD3D11Impl.hpp | 2 +- Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp | 2 ++ Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp | 13 ++++++++++++- .../GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp | 5 +++++ Graphics/GraphicsEngineD3D11/src/ShaderResourcesD3D11.cpp | 10 ++++++++++ 7 files changed, 35 insertions(+), 3 deletions(-) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.hpp index 520e9bb0..77b68360 100644 --- a/Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.hpp @@ -166,7 +166,7 @@ private: // Resource layout index in m_pStaticResourceLayouts array for every shader stage, // indexed by the shader type pipeline index (returned by GetShaderTypePipelineIndex) - std::array m_ResourceLayoutIndex = {-1, -1, -1, -1, -1}; + std::array m_ResourceLayoutIndex = {-1, -1, -1, -1, -1, -1}; std::array m_ImmutableSamplerOffsets = {}; struct ImmutableSamplerInfo diff --git a/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.hpp index 8565935d..3e5ef8f1 100644 --- a/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.hpp @@ -77,6 +77,10 @@ public: virtual void DILIGENT_CALL_TYPE CreateComputePipelineState(const ComputePipelineStateCreateInfo& PSOCreateInfo, IPipelineState** ppPipelineState) override final; + /// Implementation of IRenderDevice::CreateRayTracingPipelineState() in Direct3D11 backend. + virtual void DILIGENT_CALL_TYPE CreateRayTracingPipelineState(const RayTracingPipelineStateCreateInfo& PSOCreateInfo, + IPipelineState** ppPipelineState) override final; + /// Implementation of IRenderDevice::CreateFence() in Direct3D11 backend. virtual void DILIGENT_CALL_TYPE CreateFence(const FenceDesc& Desc, IFence** ppFence) override final; diff --git a/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.hpp index 21437e0f..1e7fd160 100644 --- a/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.hpp @@ -110,7 +110,7 @@ private: // Resource layout index in m_pResourceLayouts array for every shader stage, // indexed by the shader type pipeline index (returned by GetShaderTypePipelineIndex) - std::array m_ResourceLayoutIndex = {-1, -1, -1, -1, -1}; + std::array m_ResourceLayoutIndex = {-1, -1, -1, -1, -1, -1}; Uint8 m_NumActiveShaders = 0; diff --git a/Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp index 108f149c..1c03690e 100644 --- a/Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp @@ -203,6 +203,8 @@ PipelineStateD3D11Impl::~PipelineStateD3D11Impl() void PipelineStateD3D11Impl::Destruct() { + TPipelineStateBase::Destruct(); + if (m_pStaticResourceLayouts != nullptr) { for (Uint32 l = 0; l < GetNumShaderStages(); ++l) diff --git a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp index 06cda6ad..4453b598 100644 --- a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp @@ -101,13 +101,18 @@ RenderDeviceD3D11Impl::RenderDeviceD3D11Impl(IReferenceCounters* pRefCo sizeof(FenceD3D11Impl), sizeof(QueryD3D11Impl), sizeof(RenderPassD3D11Impl), - sizeof(FramebufferD3D11Impl) + sizeof(FramebufferD3D11Impl), + 0, + 0, + 0 } }, m_EngineAttribs{EngineAttribs}, m_pd3d11Device {pd3d11Device } // clang-format on { + static_assert(sizeof(DeviceObjectSizes) == sizeof(size_t) * 15, "Please add new objects to DeviceObjectSizes constructor"); + m_DeviceCaps.DevType = RENDER_DEVICE_TYPE_D3D11; auto FeatureLevel = m_pd3d11Device->GetFeatureLevel(); switch (FeatureLevel) @@ -409,6 +414,12 @@ void RenderDeviceD3D11Impl::CreateComputePipelineState(const ComputePipelineStat CreatePipelineState(PSOCreateInfo, ppPipelineState); } +void RenderDeviceD3D11Impl::CreateRayTracingPipelineState(const RayTracingPipelineStateCreateInfo& PSOCreateInfo, IPipelineState** ppPipelineState) +{ + UNSUPPORTED("CreateRayTracingPipelineState is not supported in DirectX 11"); + *ppPipelineState = nullptr; +} + void RenderDeviceD3D11Impl::CreateFence(const FenceDesc& Desc, IFence** ppFence) { CreateDeviceObject("Fence", Desc, ppFence, diff --git a/Graphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp index f7c1958d..0c4c38c7 100755 --- a/Graphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp +++ b/Graphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp @@ -292,6 +292,11 @@ void ShaderResourceLayoutD3D11::Initialize(std::shared_ptr(bufUav++)) BuffUAVBindInfo(BuffUAV, *this, VarType); NumUAVSlots = std::max(NumUAVSlots, Uint32{BuffUAV.BindPoint} + Uint32{BuffUAV.BindCount}); } + }, + + [&](const D3DShaderResourceAttribs&, Uint32) // + { + UNEXPECTED("acceleration structure is not supported in DirectX 11"); }); // clang-format off diff --git a/Graphics/GraphicsEngineD3D11/src/ShaderResourcesD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/ShaderResourcesD3D11.cpp index 21a65108..b6430c04 100755 --- a/Graphics/GraphicsEngineD3D11/src/ShaderResourcesD3D11.cpp +++ b/Graphics/GraphicsEngineD3D11/src/ShaderResourcesD3D11.cpp @@ -94,6 +94,11 @@ ShaderResourcesD3D11::ShaderResourcesD3D11(RenderDeviceD3D11Impl* pDeviceD3D11Im Resources.m_MaxSRVBindPoint = std::max(Resources.m_MaxSRVBindPoint, static_cast(TexAttribs.BindPoint + TexAttribs.BindCount - 1)); } + void OnNewAccelStruct(const D3DShaderResourceAttribs& ASAttribs) + { + UNEXPECTED("Acceleration structure is not supported in DirectX 11"); + } + ~NewResourceHandler() { } @@ -439,6 +444,11 @@ void ShaderResourcesD3D11::dvpVerifyCommittedResources(ID3D11Buffer* return; } } + }, + + [&](const D3DShaderResourceAttribs&, Uint32) // + { + UNEXPECTED("acceleration structure is not supported in DirectX 11"); } // clang-format off ); // clang-format on } -- cgit v1.2.3 From f8be662d357be9dcbb4b298d93b43d29ae93ce04 Mon Sep 17 00:00:00 2001 From: assiduous Date: Tue, 27 Oct 2020 19:08:28 -0700 Subject: A number of updates/fixes to PSO refactor merge --- Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.hpp | 1 + Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.hpp | 1 + Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp | 2 +- Graphics/GraphicsEngineD3D11/src/ShaderResourcesD3D11.cpp | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.hpp index 77b68360..9614ebab 100644 --- a/Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.hpp @@ -167,6 +167,7 @@ private: // Resource layout index in m_pStaticResourceLayouts array for every shader stage, // indexed by the shader type pipeline index (returned by GetShaderTypePipelineIndex) std::array m_ResourceLayoutIndex = {-1, -1, -1, -1, -1, -1}; + static_assert(MAX_SHADERS_IN_PIPELINE == 6, "Please update the initializer list above"); std::array m_ImmutableSamplerOffsets = {}; struct ImmutableSamplerInfo diff --git a/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.hpp index 1e7fd160..cd595f86 100644 --- a/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.hpp @@ -111,6 +111,7 @@ private: // Resource layout index in m_pResourceLayouts array for every shader stage, // indexed by the shader type pipeline index (returned by GetShaderTypePipelineIndex) std::array m_ResourceLayoutIndex = {-1, -1, -1, -1, -1, -1}; + static_assert(MAX_SHADERS_IN_PIPELINE == 6, "Please update the initializer list above"); Uint8 m_NumActiveShaders = 0; diff --git a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp index 4453b598..91ab6592 100644 --- a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp @@ -416,7 +416,7 @@ void RenderDeviceD3D11Impl::CreateComputePipelineState(const ComputePipelineStat void RenderDeviceD3D11Impl::CreateRayTracingPipelineState(const RayTracingPipelineStateCreateInfo& PSOCreateInfo, IPipelineState** ppPipelineState) { - UNSUPPORTED("CreateRayTracingPipelineState is not supported in DirectX 11"); + UNSUPPORTED("Ray tracing is not supported in DirectX 11"); *ppPipelineState = nullptr; } diff --git a/Graphics/GraphicsEngineD3D11/src/ShaderResourcesD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/ShaderResourcesD3D11.cpp index b6430c04..071d2f59 100755 --- a/Graphics/GraphicsEngineD3D11/src/ShaderResourcesD3D11.cpp +++ b/Graphics/GraphicsEngineD3D11/src/ShaderResourcesD3D11.cpp @@ -448,7 +448,7 @@ void ShaderResourcesD3D11::dvpVerifyCommittedResources(ID3D11Buffer* [&](const D3DShaderResourceAttribs&, Uint32) // { - UNEXPECTED("acceleration structure is not supported in DirectX 11"); + UNEXPECTED("Acceleration structure is not supported in DirectX 11"); } // clang-format off ); // clang-format on } -- cgit v1.2.3 From 135d5dc6743fc89d7a19c539fa06eca33506f51b Mon Sep 17 00:00:00 2001 From: azhirnov Date: Wed, 28 Oct 2020 19:33:03 +0300 Subject: added ray tracing implementation for dx12 and vulkan --- .../include/DeviceContextD3D11Impl.hpp | 4 ++ .../src/DeviceContextD3D11Impl.cpp | 61 ++++++++++++---------- 2 files changed, 36 insertions(+), 29 deletions(-) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp index 6b613458..5e69da8e 100644 --- a/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp @@ -41,6 +41,8 @@ #include "FramebufferD3D11Impl.hpp" #include "RenderPassD3D11Impl.hpp" #include "DisjointQueryPool.hpp" +#include "BottomLevelASBase.hpp" +#include "TopLevelASBase.hpp" #ifdef DILIGENT_DEBUG # define VERIFY_CONTEXT_BINDINGS @@ -58,6 +60,8 @@ struct DeviceContextD3D11ImplTraits using QueryType = QueryD3D11Impl; using FramebufferType = FramebufferD3D11Impl; using RenderPassType = RenderPassD3D11Impl; + using BottomLevelASType = BottomLevelASBase; + using TopLevelASType = TopLevelASBase; }; /// Device context implementation in Direct3D11 backend. diff --git a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp index 9286f3f8..e42dd2d0 100755 --- a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp @@ -2157,7 +2157,6 @@ void DeviceContextD3D11Impl::TransitionResourceStates(Uint32 BarrierCount, State #ifdef DILIGENT_DEVELOPMENT DvpVerifyStateTransitionDesc(Barrier); #endif - DEV_CHECK_ERR((Barrier.pTexture != nullptr) ^ (Barrier.pBuffer != nullptr), "Exactly one of pTexture or pBuffer must not be null"); DEV_CHECK_ERR(Barrier.NewState != RESOURCE_STATE_UNKNOWN, "New resource state can't be unknown"); if (Barrier.TransitionType == STATE_TRANSITION_TYPE_BEGIN) @@ -2168,28 +2167,28 @@ void DeviceContextD3D11Impl::TransitionResourceStates(Uint32 BarrierCount, State } VERIFY(Barrier.TransitionType == STATE_TRANSITION_TYPE_IMMEDIATE || Barrier.TransitionType == STATE_TRANSITION_TYPE_END, "Unexpected barrier type"); - if (Barrier.pTexture) + RefCntAutoPtr pTexture{Barrier.pResource, IID_TextureD3D11}; + if (pTexture) { - auto* pTextureD3D11Impl = ValidatedCast(Barrier.pTexture); - auto OldState = Barrier.OldState; + auto OldState = Barrier.OldState; if (OldState == RESOURCE_STATE_UNKNOWN) { - if (pTextureD3D11Impl->IsInKnownState()) + if (pTexture->IsInKnownState()) { - OldState = pTextureD3D11Impl->GetState(); + OldState = pTexture->GetState(); } else { - LOG_ERROR_MESSAGE("Failed to transition the state of texture '", pTextureD3D11Impl->GetDesc().Name, "' because the buffer state is unknown and is not explicitly specified"); + LOG_ERROR_MESSAGE("Failed to transition the state of texture '", pTexture->GetDesc().Name, "' because the buffer state is unknown and is not explicitly specified"); continue; } } else { - if (pTextureD3D11Impl->IsInKnownState() && pTextureD3D11Impl->GetState() != OldState) + if (pTexture->IsInKnownState() && pTexture->GetState() != OldState) { - LOG_ERROR_MESSAGE("The state ", GetResourceStateString(pTextureD3D11Impl->GetState()), " of texture '", - pTextureD3D11Impl->GetDesc().Name, "' does not match the old state ", GetResourceStateString(OldState), + LOG_ERROR_MESSAGE("The state ", GetResourceStateString(pTexture->GetState()), " of texture '", + pTexture->GetDesc().Name, "' does not match the old state ", GetResourceStateString(OldState), " specified by the barrier"); } } @@ -2197,52 +2196,53 @@ void DeviceContextD3D11Impl::TransitionResourceStates(Uint32 BarrierCount, State if ((Barrier.NewState & RESOURCE_STATE_UNORDERED_ACCESS) != 0) { DEV_CHECK_ERR((Barrier.NewState & (RESOURCE_STATE_GENERIC_READ | RESOURCE_STATE_INPUT_ATTACHMENT)) == 0, "Unordered access state is not compatible with any input state"); - UnbindTextureFromInput(pTextureD3D11Impl, pTextureD3D11Impl->GetD3D11Texture()); + UnbindTextureFromInput(pTexture, pTexture->GetD3D11Texture()); } if ((Barrier.NewState & (RESOURCE_STATE_GENERIC_READ | RESOURCE_STATE_INPUT_ATTACHMENT)) != 0) { if ((OldState & RESOURCE_STATE_RENDER_TARGET) != 0) - UnbindTextureFromRenderTarget(pTextureD3D11Impl); + UnbindTextureFromRenderTarget(pTexture); if ((OldState & RESOURCE_STATE_DEPTH_WRITE) != 0) - UnbindTextureFromDepthStencil(pTextureD3D11Impl); + UnbindTextureFromDepthStencil(pTexture); if ((OldState & RESOURCE_STATE_UNORDERED_ACCESS) != 0) { - UnbindResourceFromUAV(pTextureD3D11Impl, pTextureD3D11Impl->GetD3D11Texture()); - pTextureD3D11Impl->ClearState(RESOURCE_STATE_UNORDERED_ACCESS); + UnbindResourceFromUAV(pTexture, pTexture->GetD3D11Texture()); + pTexture->ClearState(RESOURCE_STATE_UNORDERED_ACCESS); } } if (Barrier.UpdateResourceState) { - pTextureD3D11Impl->SetState(Barrier.NewState); + pTexture->SetState(Barrier.NewState); } + continue; } - else + + RefCntAutoPtr pBuffer{Barrier.pResource, IID_BufferD3D11}; + if (pBuffer) { - VERIFY_EXPR(Barrier.pBuffer); - auto* pBufferD3D11Impl = ValidatedCast(Barrier.pBuffer); - auto OldState = Barrier.OldState; + auto OldState = Barrier.OldState; if (OldState == RESOURCE_STATE_UNKNOWN) { - if (pBufferD3D11Impl->IsInKnownState()) + if (pBuffer->IsInKnownState()) { - OldState = pBufferD3D11Impl->GetState(); + OldState = pBuffer->GetState(); } else { - LOG_ERROR_MESSAGE("Failed to transition the state of buffer '", pBufferD3D11Impl->GetDesc().Name, "' because the buffer state is unknown and is not explicitly specified"); + LOG_ERROR_MESSAGE("Failed to transition the state of buffer '", pBuffer->GetDesc().Name, "' because the buffer state is unknown and is not explicitly specified"); continue; } } else { - if (pBufferD3D11Impl->IsInKnownState() && pBufferD3D11Impl->GetState() != OldState) + if (pBuffer->IsInKnownState() && pBuffer->GetState() != OldState) { - LOG_ERROR_MESSAGE("The state ", GetResourceStateString(pBufferD3D11Impl->GetState()), " of buffer '", - pBufferD3D11Impl->GetDesc().Name, "' does not match the old state ", GetResourceStateString(OldState), + LOG_ERROR_MESSAGE("The state ", GetResourceStateString(pBuffer->GetState()), " of buffer '", + pBuffer->GetDesc().Name, "' does not match the old state ", GetResourceStateString(OldState), " specified by the barrier"); } } @@ -2250,19 +2250,22 @@ void DeviceContextD3D11Impl::TransitionResourceStates(Uint32 BarrierCount, State if ((Barrier.NewState & RESOURCE_STATE_UNORDERED_ACCESS) != 0) { DEV_CHECK_ERR((Barrier.NewState & RESOURCE_STATE_GENERIC_READ) == 0, "Unordered access state is not compatible with any input state"); - UnbindBufferFromInput(pBufferD3D11Impl, pBufferD3D11Impl->m_pd3d11Buffer); + UnbindBufferFromInput(pBuffer, pBuffer->m_pd3d11Buffer); } if ((Barrier.NewState & RESOURCE_STATE_GENERIC_READ) != 0) { - UnbindResourceFromUAV(pBufferD3D11Impl, pBufferD3D11Impl->m_pd3d11Buffer); + UnbindResourceFromUAV(pBuffer, pBuffer->m_pd3d11Buffer); } if (Barrier.UpdateResourceState) { - pBufferD3D11Impl->SetState(Barrier.NewState); + pBuffer->SetState(Barrier.NewState); } + continue; } + + UNEXPECTED("unsupported resource type"); } } -- cgit v1.2.3 From 076e2f20ce80ef9ea6ccb351c2bfdc3b99ac8015 Mon Sep 17 00:00:00 2001 From: assiduous Date: Fri, 30 Oct 2020 14:18:45 -0700 Subject: A number of minor updates --- .../GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp index e42dd2d0..54c9b3c4 100755 --- a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp @@ -2167,8 +2167,7 @@ void DeviceContextD3D11Impl::TransitionResourceStates(Uint32 BarrierCount, State } VERIFY(Barrier.TransitionType == STATE_TRANSITION_TYPE_IMMEDIATE || Barrier.TransitionType == STATE_TRANSITION_TYPE_END, "Unexpected barrier type"); - RefCntAutoPtr pTexture{Barrier.pResource, IID_TextureD3D11}; - if (pTexture) + if (RefCntAutoPtr pTexture{Barrier.pResource, IID_TextureD3D11}) { auto OldState = Barrier.OldState; if (OldState == RESOURCE_STATE_UNKNOWN) @@ -2218,11 +2217,8 @@ void DeviceContextD3D11Impl::TransitionResourceStates(Uint32 BarrierCount, State { pTexture->SetState(Barrier.NewState); } - continue; } - - RefCntAutoPtr pBuffer{Barrier.pResource, IID_BufferD3D11}; - if (pBuffer) + else if (RefCntAutoPtr pBuffer{Barrier.pResource, IID_BufferD3D11}) { auto OldState = Barrier.OldState; if (OldState == RESOURCE_STATE_UNKNOWN) @@ -2262,10 +2258,11 @@ void DeviceContextD3D11Impl::TransitionResourceStates(Uint32 BarrierCount, State { pBuffer->SetState(Barrier.NewState); } - continue; } - - UNEXPECTED("unsupported resource type"); + else + { + UNEXPECTED("The type of resource '", Barrier.pResource->GetDesc().Name, "' is not support in D3D11"); + } } } -- cgit v1.2.3 From efa43e2bd2475a4dec6771bf9759f6a99f7d77ed Mon Sep 17 00:00:00 2001 From: azhirnov Date: Tue, 3 Nov 2020 13:52:24 +0300 Subject: fixed resource state transitions, some improvements for ray tracing --- Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp index 5e69da8e..5be505a1 100644 --- a/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp @@ -61,7 +61,7 @@ struct DeviceContextD3D11ImplTraits using FramebufferType = FramebufferD3D11Impl; using RenderPassType = RenderPassD3D11Impl; using BottomLevelASType = BottomLevelASBase; - using TopLevelASType = TopLevelASBase; + using TopLevelASType = TopLevelASBase; }; /// Device context implementation in Direct3D11 backend. -- cgit v1.2.3 From 5e81b867be771dc7f2add0d7b403af4aeaa744db Mon Sep 17 00:00:00 2001 From: azhirnov Date: Thu, 5 Nov 2020 03:43:05 +0300 Subject: Added AS copy with compacting. Added UB & SB size checks for Vulkan. Some improvements for ray tracing & tests. --- .../GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp | 6 ++++++ Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp | 10 ++++++++++ 2 files changed, 16 insertions(+) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp index 5be505a1..0eea2efe 100644 --- a/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp @@ -262,6 +262,12 @@ public: /// Implementation of IDeviceContext::CopyTLAS(). virtual void DILIGENT_CALL_TYPE CopyTLAS(const CopyTLASAttribs& Attribs) override final; + /// Implementation of IDeviceContext::WriteBLASCompactedSize(). + virtual void DILIGENT_CALL_TYPE WriteBLASCompactedSize(const WriteBLASCompactedSizeAttribs& Attribs) override final; + + /// Implementation of IDeviceContext::WriteTLASCompactedSize(). + virtual void DILIGENT_CALL_TYPE WriteTLASCompactedSize(const WriteTLASCompactedSizeAttribs& Attribs) override final; + /// Implementation of IDeviceContext::TraceRays(). virtual void DILIGENT_CALL_TYPE TraceRays(const TraceRaysAttribs& Attribs) override final; diff --git a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp index 54c9b3c4..c59f7165 100755 --- a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp @@ -2319,6 +2319,16 @@ void DeviceContextD3D11Impl::CopyTLAS(const CopyTLASAttribs& Attribs) UNSUPPORTED("CopyTLAS is not supported in DirectX 11"); } +void DeviceContextD3D11Impl::WriteBLASCompactedSize(const WriteBLASCompactedSizeAttribs& Attribs) +{ + UNSUPPORTED("CopyTLAS is not supported in DirectX 11"); +} + +void DeviceContextD3D11Impl::WriteTLASCompactedSize(const WriteTLASCompactedSizeAttribs& Attribs) +{ + UNSUPPORTED("CopyTLAS is not supported in DirectX 11"); +} + void DeviceContextD3D11Impl::TraceRays(const TraceRaysAttribs& Attribs) { UNSUPPORTED("TraceRays is not supported in DirectX 11"); -- cgit v1.2.3 From 8e0218168e2f63812f658298b3571c53879a5780 Mon Sep 17 00:00:00 2001 From: azhirnov Date: Thu, 5 Nov 2020 19:58:57 +0300 Subject: Added support for local root signature & shader record. Bug fix for ray tracing. --- Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp | 4 ++-- Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp index 0eea2efe..addf3d92 100644 --- a/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.hpp @@ -251,10 +251,10 @@ public: virtual void DILIGENT_CALL_TYPE Flush() override final; /// Implementation of IDeviceContext::BuildBLAS(). - virtual void DILIGENT_CALL_TYPE BuildBLAS(const BLASBuildAttribs& Attribs) override final; + virtual void DILIGENT_CALL_TYPE BuildBLAS(const BuildBLASAttribs& Attribs) override final; /// Implementation of IDeviceContext::BuildTLAS(). - virtual void DILIGENT_CALL_TYPE BuildTLAS(const TLASBuildAttribs& Attribs) override final; + virtual void DILIGENT_CALL_TYPE BuildTLAS(const BuildTLASAttribs& Attribs) override final; /// Implementation of IDeviceContext::CopyBLAS(). virtual void DILIGENT_CALL_TYPE CopyBLAS(const CopyBLASAttribs& Attribs) override final; diff --git a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp index c59f7165..16f8f7fa 100755 --- a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp @@ -2299,12 +2299,12 @@ void DeviceContextD3D11Impl::ResolveTextureSubresource(ITexture* m_pd3d11DeviceContext->ResolveSubresource(pDstTexD3D11->GetD3D11Texture(), DstSubresIndex, pSrcTexD3D11->GetD3D11Texture(), SrcSubresIndex, DXGIFmt); } -void DeviceContextD3D11Impl::BuildBLAS(const BLASBuildAttribs& Attribs) +void DeviceContextD3D11Impl::BuildBLAS(const BuildBLASAttribs& Attribs) { UNSUPPORTED("BuildBLAS is not supported in DirectX 11"); } -void DeviceContextD3D11Impl::BuildTLAS(const TLASBuildAttribs& Attribs) +void DeviceContextD3D11Impl::BuildTLAS(const BuildTLASAttribs& Attribs) { UNSUPPORTED("BuildTLAS is not supported in DirectX 11"); } -- cgit v1.2.3 From db5cfe224b9ff00234b29ff097262bc7377b90c4 Mon Sep 17 00:00:00 2001 From: assiduous Date: Thu, 5 Nov 2020 21:43:17 -0800 Subject: Refactored BufferBase --- Graphics/GraphicsEngineD3D11/src/BufferD3D11Impl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/src/BufferD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/BufferD3D11Impl.cpp index 16e77806..438bafff 100644 --- a/Graphics/GraphicsEngineD3D11/src/BufferD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/BufferD3D11Impl.cpp @@ -259,7 +259,7 @@ void BufferD3D11Impl::CreateViewInternal(const BufferViewDesc& OrigViewDesc, IBu void BufferD3D11Impl::CreateUAV(BufferViewDesc& UAVDesc, ID3D11UnorderedAccessView** ppD3D11UAV) { - CorrectBufferViewDesc(UAVDesc); + ValidateAndCorrectBufferViewDesc(m_Desc, UAVDesc); D3D11_UNORDERED_ACCESS_VIEW_DESC D3D11_UAVDesc; BufferViewDesc_to_D3D11_UAV_DESC(m_Desc, UAVDesc, D3D11_UAVDesc); @@ -271,7 +271,7 @@ void BufferD3D11Impl::CreateUAV(BufferViewDesc& UAVDesc, ID3D11UnorderedAccessVi void BufferD3D11Impl::CreateSRV(struct BufferViewDesc& SRVDesc, ID3D11ShaderResourceView** ppD3D11SRV) { - CorrectBufferViewDesc(SRVDesc); + ValidateAndCorrectBufferViewDesc(m_Desc, SRVDesc); D3D11_SHADER_RESOURCE_VIEW_DESC D3D11_SRVDesc; BufferViewDesc_to_D3D11_SRV_DESC(m_Desc, SRVDesc, D3D11_SRVDesc); -- cgit v1.2.3 From 4de58520987882e1daa162e31cabca3f334c20a8 Mon Sep 17 00:00:00 2001 From: assiduous Date: Thu, 5 Nov 2020 22:46:17 -0800 Subject: Refactored TextureBase --- Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp index 0e9b217b..cb83f194 100644 --- a/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp +++ b/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp @@ -70,7 +70,7 @@ void TextureBaseD3D11::CreateViewInternal(const struct TextureViewDesc& ViewDesc try { auto UpdatedViewDesc = ViewDesc; - CorrectTextureViewDesc(UpdatedViewDesc); + ValidatedAndCorrectTextureViewDesc(m_Desc, UpdatedViewDesc); RefCntAutoPtr pD3D11View; switch (ViewDesc.ViewType) -- cgit v1.2.3 From 43c3821993cb3d6ec3025fa7156da8544d2a1dac Mon Sep 17 00:00:00 2001 From: azhirnov Date: Mon, 16 Nov 2020 20:30:23 +0300 Subject: D3D12 resource binding refactoring, rename LinearAllocator to FixedLinearAllocator. --- Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp | 2 +- Graphics/GraphicsEngineD3D11/src/ShaderResourceBindingD3D11Impl.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp index 1c03690e..dd3566b8 100644 --- a/Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp @@ -46,7 +46,7 @@ void PipelineStateD3D11Impl::InitInternalObjects(const PSOCreateInfoType& Create const auto NumShaderStages = GetNumShaderStages(); VERIFY_EXPR(NumShaderStages > 0 && NumShaderStages == ShaderStages.size()); - LinearAllocator MemPool{GetRawAllocator()}; + FixedLinearAllocator MemPool{GetRawAllocator()}; MemPool.AddSpace(NumShaderStages); MemPool.AddSpace(NumShaderStages); diff --git a/Graphics/GraphicsEngineD3D11/src/ShaderResourceBindingD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/ShaderResourceBindingD3D11Impl.cpp index 46833c81..c33ba26e 100644 --- a/Graphics/GraphicsEngineD3D11/src/ShaderResourceBindingD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/ShaderResourceBindingD3D11Impl.cpp @@ -31,7 +31,7 @@ #include "DeviceContextD3D11Impl.hpp" #include "RenderDeviceD3D11Impl.hpp" #include "ShaderD3D11Impl.hpp" -#include "LinearAllocator.hpp" +#include "FixedLinearAllocator.hpp" namespace Diligent { @@ -55,7 +55,7 @@ ShaderResourceBindingD3D11Impl::ShaderResourceBindingD3D11Impl(IReferenceCounter m_ResourceLayoutIndex.fill(-1); m_NumActiveShaders = static_cast(pPSO->GetNumShaderStages()); - LinearAllocator MemPool{GetRawAllocator()}; + FixedLinearAllocator MemPool{GetRawAllocator()}; MemPool.AddSpace(m_NumActiveShaders); MemPool.AddSpace(m_NumActiveShaders); -- cgit v1.2.3