diff options
| author | azhirnov <zh1dron@gmail.com> | 2020-08-19 16:05:48 +0000 |
|---|---|---|
| committer | azhirnov <zh1dron@gmail.com> | 2020-08-19 16:05:48 +0000 |
| commit | bdecaefe87db4ccfb8dc8700fb1bf23aff4b6a0d (patch) | |
| tree | dd9d2191ea743af87b5f41abd5c2cf96917a5d5d /Graphics | |
| parent | Added root signature for DrawMeshIndirect, added some checks (diff) | |
| download | DiligentCore-bdecaefe87db4ccfb8dc8700fb1bf23aff4b6a0d.tar.gz DiligentCore-bdecaefe87db4ccfb8dc8700fb1bf23aff4b6a0d.zip | |
minor fixes and formatting
Diffstat (limited to 'Graphics')
6 files changed, 16 insertions, 16 deletions
diff --git a/Graphics/GLSLTools/src/GLSLSourceBuilder.cpp b/Graphics/GLSLTools/src/GLSLSourceBuilder.cpp index 8ed7e62e..dfb4d757 100644 --- a/Graphics/GLSLTools/src/GLSLSourceBuilder.cpp +++ b/Graphics/GLSLTools/src/GLSLSourceBuilder.cpp @@ -188,7 +188,7 @@ String BuildGLSLSourceString(const ShaderCreateInfo& CreationAttribs, "precision highp usampler3D;\n" "precision highp usamplerCube;\n" "precision highp usampler2DArray;\n" // clang-format off - ); // clang-format on + ); // clang-format on if (IsES32OrAbove) { diff --git a/Graphics/GraphicsEngine/interface/Constants.h b/Graphics/GraphicsEngine/interface/Constants.h index 9fa70088..dfd17c45 100644 --- a/Graphics/GraphicsEngine/interface/Constants.h +++ b/Graphics/GraphicsEngine/interface/Constants.h @@ -38,7 +38,7 @@ DILIGENT_BEGIN_NAMESPACE(Diligent) /// Maximum number of input buffer slots. /// D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT == 32 -#define DILIGENT_MAX_BUFFER_SOLTS 32 +#define DILIGENT_MAX_BUFFER_SLOTS 32 /// Maximum number of simultaneous render targets. #define DILIGENT_MAX_RENDER_TARGETS 8 @@ -46,7 +46,7 @@ DILIGENT_BEGIN_NAMESPACE(Diligent) /// Maximum number of viewports. #define DILIGENT_MAX_VIEWPORTS 16 -static const Uint32 MAX_BUFFER_SLOTS = DILIGENT_MAX_BUFFER_SOLTS; +static const Uint32 MAX_BUFFER_SLOTS = DILIGENT_MAX_BUFFER_SLOTS; static const Uint32 MAX_RENDER_TARGETS = DILIGENT_MAX_RENDER_TARGETS; static const Uint32 MAX_VIEWPORTS = DILIGENT_MAX_VIEWPORTS; diff --git a/Graphics/GraphicsEngineD3D12/include/CommandContext.hpp b/Graphics/GraphicsEngineD3D12/include/CommandContext.hpp index a405ea80..2f97b239 100644 --- a/Graphics/GraphicsEngineD3D12/include/CommandContext.hpp +++ b/Graphics/GraphicsEngineD3D12/include/CommandContext.hpp @@ -43,13 +43,13 @@ namespace Diligent struct DWParam { // clang-format off - DWParam( FLOAT f ) : Float{f} {} - DWParam( UINT u ) : Uint {u} {} - DWParam( INT i ) : Int {i} {} + DWParam( FLOAT f ) : Float{f} {} + DWParam( UINT u ) : Uint {u} {} + DWParam( INT i ) : Int {i} {} - void operator= ( FLOAT f ) { Float = f; } - void operator= ( UINT u ) { Uint = u; } - void operator= ( INT i ) { Int = i; } + void operator= ( FLOAT f ) { Float = f; } + void operator= ( UINT u ) { Uint = u; } + void operator= ( INT i ) { Int = i; } // clang-format on union diff --git a/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp index 481027c0..be5ca61f 100644 --- a/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp @@ -287,8 +287,8 @@ PipelineStateD3D12Impl::PipelineStateD3D12Impl(IReferenceCounters* pR d3d12PSODesc.NumRenderTargets = GraphicsPipeline.NumRenderTargets; for (Uint32 rt = 0; rt < GraphicsPipeline.NumRenderTargets; ++rt) d3d12PSODesc.RTVFormats[rt] = TexFormatToDXGI_Format(GraphicsPipeline.RTVFormats[rt]); - for (Uint32 rt = GraphicsPipeline.NumRenderTargets; rt < 8; ++rt) - d3d12PSODesc.RTVFormats[rt] = TexFormatToDXGI_Format(GraphicsPipeline.RTVFormats[rt]); + for (Uint32 rt = GraphicsPipeline.NumRenderTargets; rt < std::size(d3d12PSODesc.RTVFormats); ++rt) + d3d12PSODesc.RTVFormats[rt] = DXGI_FORMAT_UNKNOWN; d3d12PSODesc.DSVFormat = TexFormatToDXGI_Format(GraphicsPipeline.DSVFormat); d3d12PSODesc.SampleDesc.Count = GraphicsPipeline.SmplDesc.Count; @@ -368,8 +368,8 @@ PipelineStateD3D12Impl::PipelineStateD3D12Impl(IReferenceCounters* pR d3d12PSODesc.RTVFormatArray->NumRenderTargets = GraphicsPipeline.NumRenderTargets; for (Uint32 rt = 0; rt < GraphicsPipeline.NumRenderTargets; ++rt) d3d12PSODesc.RTVFormatArray->RTFormats[rt] = TexFormatToDXGI_Format(GraphicsPipeline.RTVFormats[rt]); - for (Uint32 rt = GraphicsPipeline.NumRenderTargets; rt < 8; ++rt) - d3d12PSODesc.RTVFormatArray->RTFormats[rt] = TexFormatToDXGI_Format(GraphicsPipeline.RTVFormats[rt]); + for (Uint32 rt = GraphicsPipeline.NumRenderTargets; rt < std::size(d3d12PSODesc.RTVFormatArray->RTFormats); ++rt) + d3d12PSODesc.RTVFormatArray->RTFormats[rt] = DXGI_FORMAT_UNKNOWN; d3d12PSODesc.DSVFormat = TexFormatToDXGI_Format(GraphicsPipeline.DSVFormat); d3d12PSODesc.SampleDesc->Count = GraphicsPipeline.SmplDesc.Count; diff --git a/Graphics/GraphicsEngineOpenGL/include/FramebufferGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/FramebufferGLImpl.hpp index 49ea8b84..743d7185 100644 --- a/Graphics/GraphicsEngineOpenGL/include/FramebufferGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/FramebufferGLImpl.hpp @@ -42,7 +42,7 @@ namespace Diligent class FixedBlockMemoryAllocator; -/// Render pass implementation in Direct3D11 backend. +/// Render pass implementation in OpenGL backend. class FramebufferGLImpl final : public FramebufferBase<IFramebuffer, RenderDeviceGLImpl> { public: diff --git a/Graphics/GraphicsEngineVulkan/CMakeLists.txt b/Graphics/GraphicsEngineVulkan/CMakeLists.txt index c6fffdee..51bb9dc5 100644 --- a/Graphics/GraphicsEngineVulkan/CMakeLists.txt +++ b/Graphics/GraphicsEngineVulkan/CMakeLists.txt @@ -245,7 +245,7 @@ elseif(PLATFORM_IOS) find_library(UI_KIT UIKit) list(APPEND PRIVATE_DEPENDENCIES ${CORE_GRAPHICS} ${METAL_LIBRARY} ${QUARTZ_CORE} ${UI_KIT}) elseif(PLATFORM_LINUX) - find_library(Vulkan_LIBRARY NAMES vulkan HINTS "$ENV{VULKAN_SDK}/lib" "../../ThirdParty/vulkan/libs/linux") + # Use Volk elseif(PLATFORM_ANDROID) # Use Volk else() @@ -308,7 +308,7 @@ endif() if(PLATFORM_WIN32) set(PRIVATE_COMPILE_DEFINITIONS VK_USE_PLATFORM_WIN32_KHR=1 NOMINMAX DILIGENT_USE_VOLK=1) elseif(PLATFORM_LINUX) - set(PRIVATE_COMPILE_DEFINITIONS VK_USE_PLATFORM_XCB_KHR=1 VK_USE_PLATFORM_XLIB_KHR=1) + set(PRIVATE_COMPILE_DEFINITIONS VK_USE_PLATFORM_XCB_KHR=1 VK_USE_PLATFORM_XLIB_KHR=1 DILIGENT_USE_VOLK=1) elseif(PLATFORM_MACOS) set(PRIVATE_COMPILE_DEFINITIONS VK_USE_PLATFORM_MACOS_MVK=1) elseif(PLATFORM_IOS) |
