mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
shaderc: Fixed SPIRV outputting useless uniforms.
This commit is contained in:
@@ -636,6 +636,11 @@ namespace bgfx { namespace spirv
|
||||
Uniform un;
|
||||
un.name = program->getUniformName(ii);
|
||||
|
||||
if (bx::hasSuffix(un.name.c_str(), ".@data") )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
un.num = 0;
|
||||
const uint32_t offset = program->getUniformBufferOffset(ii);
|
||||
un.regIndex = uint16_t(offset);
|
||||
@@ -800,6 +805,7 @@ namespace bgfx { namespace spirv
|
||||
for (auto& resource : resourcesrefl.storage_buffers)
|
||||
{
|
||||
std::string name = refl.get_name(resource.id);
|
||||
|
||||
uint32_t binding_index = refl.get_decoration(resource.id, spv::Decoration::DecorationBinding);
|
||||
|
||||
spirv_cross::Bitset flags = refl.get_buffer_block_flags(resource.id);
|
||||
|
||||
Reference in New Issue
Block a user