diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-11-06 01:31:31 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-11-06 01:31:31 +0000 |
| commit | 569fb5a399cdb1cb39fb10d8db1fd78ab56f6c9e (patch) | |
| tree | a40a058f9e9fe805be88d6625681c4e93880c0e0 /Graphics/ShaderTools | |
| parent | Added support for local root signature & shader record. (diff) | |
| download | DiligentCore-569fb5a399cdb1cb39fb10d8db1fd78ab56f6c9e.tar.gz DiligentCore-569fb5a399cdb1cb39fb10d8db1fd78ab56f6c9e.zip | |
A number of minor updates/fixes
Diffstat (limited to 'Graphics/ShaderTools')
| -rw-r--r-- | Graphics/ShaderTools/include/SPIRVShaderResources.hpp | 2 | ||||
| -rw-r--r-- | Graphics/ShaderTools/src/SPIRVShaderResources.cpp | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/Graphics/ShaderTools/include/SPIRVShaderResources.hpp b/Graphics/ShaderTools/include/SPIRVShaderResources.hpp index 7bb35f72..97ad1303 100644 --- a/Graphics/ShaderTools/include/SPIRVShaderResources.hpp +++ b/Graphics/ShaderTools/include/SPIRVShaderResources.hpp @@ -58,7 +58,7 @@ namespace Diligent // sizeof(SPIRVShaderResourceAttribs) == 32, msvc x64 struct SPIRVShaderResourceAttribs { - enum class ResourceType : Uint8 + enum ResourceType : Uint8 { UniformBuffer = 0, ROStorageBuffer, diff --git a/Graphics/ShaderTools/src/SPIRVShaderResources.cpp b/Graphics/ShaderTools/src/SPIRVShaderResources.cpp index ceeecbe8..873180b3 100644 --- a/Graphics/ShaderTools/src/SPIRVShaderResources.cpp +++ b/Graphics/ShaderTools/src/SPIRVShaderResources.cpp @@ -381,16 +381,16 @@ SPIRVShaderResources::SPIRVShaderResources(IMemoryAllocator& Allocator, Uint32 CurrUB = 0; for (const auto& UB : resources.uniform_buffers) { - const auto& name = GetUBName(Compiler, UB, ParsedIRSource); - const auto& Type = Compiler.get_type(UB.type_id); - const size_t Size = Compiler.get_declared_struct_size(Type); + const auto& name = GetUBName(Compiler, UB, ParsedIRSource); + const auto& Type = Compiler.get_type(UB.type_id); + const auto Size = Compiler.get_declared_struct_size(Type); new (&GetUB(CurrUB++)) SPIRVShaderResourceAttribs(Compiler, UB, ResourceNamesPool.CopyString(name), SPIRVShaderResourceAttribs::ResourceType::UniformBuffer, SPIRVShaderResourceAttribs::InvalidSepSmplrOrImgInd, - Uint32(Size)); + static_cast<Uint32>(Size)); } VERIFY_EXPR(CurrUB == GetNumUBs()); } @@ -404,17 +404,17 @@ SPIRVShaderResources::SPIRVShaderResources(IMemoryAllocator& Allocator, auto ResType = IsReadOnly ? SPIRVShaderResourceAttribs::ResourceType::ROStorageBuffer : SPIRVShaderResourceAttribs::ResourceType::RWStorageBuffer; - const auto& Type = Compiler.get_type(SB.type_id); - const size_t Size = Compiler.get_declared_struct_size(Type); - const size_t Stride = Compiler.get_declared_struct_size_runtime_array(Type, 1); + const auto& Type = Compiler.get_type(SB.type_id); + const auto Size = Compiler.get_declared_struct_size(Type); + const auto Stride = Compiler.get_declared_struct_size_runtime_array(Type, 1); new (&GetSB(CurrSB++)) SPIRVShaderResourceAttribs(Compiler, SB, ResourceNamesPool.CopyString(SB.name), ResType, SPIRVShaderResourceAttribs::InvalidSepSmplrOrImgInd, - Uint32(Size), - Uint32(Stride)); + static_cast<Uint32>(Size), + static_cast<Uint32>(Stride)); } VERIFY_EXPR(CurrSB == GetNumSBs()); } |
