From 3efd89673b48bedffcf36b6b8c66d587512854a1 Mon Sep 17 00:00:00 2001 From: azhirnov Date: Mon, 15 Mar 2021 03:14:26 +0300 Subject: Added inline ray tracing & trace rays indirect command. --- Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.hpp | 3 +++ Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp | 5 +++++ Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp | 9 ++++++--- 3 files changed, 14 insertions(+), 3 deletions(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.hpp index 867179af..f33b9d2c 100644 --- a/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.hpp @@ -261,6 +261,9 @@ public: /// Implementation of IDeviceContext::TraceRays() in OpenGL backend. virtual void DILIGENT_CALL_TYPE TraceRays(const TraceRaysAttribs& Attribs) override final; + /// Implementation of IDeviceContext::TraceRaysIndirect() in OpenGL backend. + virtual void DILIGENT_CALL_TYPE TraceRaysIndirect(const TraceRaysIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) override final; + /// Implementation of IDeviceContextGL::UpdateCurrentGLContext(). virtual bool DILIGENT_CALL_TYPE UpdateCurrentGLContext() override final; diff --git a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp index c613ca7d..9958c238 100644 --- a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp @@ -1648,4 +1648,9 @@ void DeviceContextGLImpl::TraceRays(const TraceRaysAttribs& Attribs) UNSUPPORTED("TraceRays is not supported in OpenGL"); } +void DeviceContextGLImpl::TraceRaysIndirect(const TraceRaysIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) +{ + UNSUPPORTED("TraceRaysIndirect is not supported in OpenGL"); +} + } // namespace Diligent diff --git a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp index 8cf07274..8950671e 100644 --- a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp @@ -302,9 +302,12 @@ RenderDeviceGLImpl::RenderDeviceGLImpl(IReferenceCounters* pRefCounters, } \ } while (false) + // clang-format off SET_FEATURE_STATE(VertexPipelineUAVWritesAndAtomics, false, "Vertex pipeline UAV writes and atomics are"); - SET_FEATURE_STATE(MeshShaders, false, "Mesh shaders are"); - SET_FEATURE_STATE(RayTracing, false, "Ray tracing is"); + SET_FEATURE_STATE(MeshShaders, false, "Mesh shaders are"); + SET_FEATURE_STATE(RayTracing, false, "Ray tracing is"); + SET_FEATURE_STATE(RayTracing2, false, "Inline ray tracing is"); + // clang-format on { bool WireframeFillSupported = (glPolygonMode != nullptr); @@ -457,7 +460,7 @@ RenderDeviceGLImpl::RenderDeviceGLImpl(IReferenceCounters* pRefCounters, #undef SET_FEATURE_STATE #if defined(_MSC_VER) && defined(_WIN64) - static_assert(sizeof(DeviceFeatures) == 33, "Did you add a new feature to DeviceFeatures? Please handle its satus here."); + static_assert(sizeof(DeviceFeatures) == 34, "Did you add a new feature to DeviceFeatures? Please handle its satus here."); #endif // get device limits -- cgit v1.2.3