From dd5dd83d29006fdc07e292990564962a90e2e209 Mon Sep 17 00:00:00 2001 From: assiduous Date: Sat, 6 Feb 2021 15:05:29 -0800 Subject: Shader Resource Layout Tests: fixed non-separable programs case --- Graphics/GraphicsEngine/interface/GraphicsTypes.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngine') diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h index 9234252c..ca4ebe6b 100644 --- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h +++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h @@ -1521,7 +1521,18 @@ DILIGENT_TYPED_ENUM(DEVICE_FEATURE_STATE, Uint8) /// Describes the device features struct DeviceFeatures { - /// Indicates if device supports separable programs + /// Indicates if device supports separable shader programs. + + /// \remarks The only case when separable programs are not supported is when the engine is + /// initialized in GLES3.0 mode. In GLES3.1+ and in all other backends, the + /// feature is always enabled. + /// In OpenGL backend, it may forcibly be disabled using ForceNonSeparablePrograms + /// member of EngineGLCreateInfo struct (this is primarily used for testing). + /// The are two main limitations when separable programs are disabled: + /// - If the same shader variable is present in multiple shader stages, + /// it will always be shared between all stages and different resources + /// can't be bound to different stages. + /// - Shader resource queries will be also disabled. DEVICE_FEATURE_STATE SeparablePrograms DEFAULT_INITIALIZER(DEVICE_FEATURE_STATE_DISABLED); /// Indicates if device supports resource queries from shader objects. -- cgit v1.2.3 From c6c5bb5ed3d4e3296e6f65e4072db5cf8bf2452c Mon Sep 17 00:00:00 2001 From: assiduous Date: Sun, 7 Feb 2021 12:50:39 -0800 Subject: Reworked ExecuteCommandList(s) to take multiple command lists instead of one --- Graphics/GraphicsEngine/interface/APIInfo.h | 2 +- Graphics/GraphicsEngine/interface/DeviceContext.h | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'Graphics/GraphicsEngine') diff --git a/Graphics/GraphicsEngine/interface/APIInfo.h b/Graphics/GraphicsEngine/interface/APIInfo.h index cd2be5a4..f268ff63 100644 --- a/Graphics/GraphicsEngine/interface/APIInfo.h +++ b/Graphics/GraphicsEngine/interface/APIInfo.h @@ -30,7 +30,7 @@ /// \file /// Diligent API information -#define DILIGENT_API_VERSION 240081 +#define DILIGENT_API_VERSION 240082 #include "../../../Primitives/interface/BasicTypes.h" diff --git a/Graphics/GraphicsEngine/interface/DeviceContext.h b/Graphics/GraphicsEngine/interface/DeviceContext.h index 2f9408bd..411103d7 100644 --- a/Graphics/GraphicsEngine/interface/DeviceContext.h +++ b/Graphics/GraphicsEngine/interface/DeviceContext.h @@ -1836,12 +1836,14 @@ DILIGENT_BEGIN_INTERFACE(IDeviceContext, IObject) ICommandList** ppCommandList) PURE; - /// Executes recorded commands in a command list. + /// Submits an array of recorded command lists for execution. - /// \param [in] pCommandList - Pointer to the command list to executre. - /// \remarks After command list is executed, it is no longer valid and should be released. - VIRTUAL void METHOD(ExecuteCommandList)(THIS_ - ICommandList* pCommandList) PURE; + /// \param [in] NumCommandLists - The number of command lists to execute. + /// \param [in] ppCommandLists - Pointer to the array of NumCommandLists command lists to execute. + /// \remarks After a command list is executed, it is no longer valid and must be released. + VIRTUAL void METHOD(ExecuteCommandLists)(THIS_ + Uint32 NumCommandLists, + ICommandList* const* ppCommandLists) PURE; /// Tells the GPU to set a fence to a specified value after all previous work has completed. @@ -2231,7 +2233,7 @@ DILIGENT_END_INTERFACE # define IDeviceContext_ClearDepthStencil(This, ...) CALL_IFACE_METHOD(DeviceContext, ClearDepthStencil, This, __VA_ARGS__) # define IDeviceContext_ClearRenderTarget(This, ...) CALL_IFACE_METHOD(DeviceContext, ClearRenderTarget, This, __VA_ARGS__) # define IDeviceContext_FinishCommandList(This, ...) CALL_IFACE_METHOD(DeviceContext, FinishCommandList, This, __VA_ARGS__) -# define IDeviceContext_ExecuteCommandList(This, ...) CALL_IFACE_METHOD(DeviceContext, ExecuteCommandList, This, __VA_ARGS__) +# define IDeviceContext_ExecuteCommandLists(This, ...) CALL_IFACE_METHOD(DeviceContext, ExecuteCommandLists, This, __VA_ARGS__) # define IDeviceContext_SignalFence(This, ...) CALL_IFACE_METHOD(DeviceContext, SignalFence, This, __VA_ARGS__) # define IDeviceContext_WaitForFence(This, ...) CALL_IFACE_METHOD(DeviceContext, WaitForFence, This, __VA_ARGS__) # define IDeviceContext_WaitForIdle(This, ...) CALL_IFACE_METHOD(DeviceContext, WaitForIdle, This, __VA_ARGS__) -- cgit v1.2.3 From 4e2d8d0b8408e6054cbf7dbda15c742d8698efd7 Mon Sep 17 00:00:00 2001 From: Shootfast Date: Tue, 2 Mar 2021 16:42:25 +0000 Subject: Fixed uninitialized atomic in StateObjectsRegistry (#193) Add() method was attempting to read m_NumDeletedObjects before it was initialized. --- Graphics/GraphicsEngine/include/StateObjectsRegistry.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'Graphics/GraphicsEngine') diff --git a/Graphics/GraphicsEngine/include/StateObjectsRegistry.hpp b/Graphics/GraphicsEngine/include/StateObjectsRegistry.hpp index a2a7cad1..937e6908 100644 --- a/Graphics/GraphicsEngine/include/StateObjectsRegistry.hpp +++ b/Graphics/GraphicsEngine/include/StateObjectsRegistry.hpp @@ -66,6 +66,7 @@ public: static constexpr int DeletedObjectsToPurge = 32; StateObjectsRegistry(IMemoryAllocator& RawAllocator, const Char* RegistryName) : + m_NumDeletedObjects{0}, m_DescToObjHashMap(STD_ALLOCATOR_RAW_MEM(HashMapElem, RawAllocator, "Allocator for unordered_map >")), m_RegistryName{RegistryName} {} -- cgit v1.2.3