mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
vulkan: fix shader:send with fields in an array-of-structs.
This commit is contained in:
@@ -411,8 +411,19 @@ void Shader::buildLocalUniforms(spirv_cross::Compiler &comp, const spirv_cross::
|
||||
switch (memberType.basetype)
|
||||
{
|
||||
case SPIRType::Struct:
|
||||
name += ".";
|
||||
buildLocalUniforms(comp, memberType, offset, name);
|
||||
if (memberType.op == spv::OpTypeArray)
|
||||
{
|
||||
for (uint32 i = 0; i < memberType.array[0]; i++)
|
||||
{
|
||||
std::string structname = name + "[" + std::to_string(i) + "].";
|
||||
buildLocalUniforms(comp, memberType, offset, structname);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string structname = name = ".";
|
||||
buildLocalUniforms(comp, memberType, offset, structname);
|
||||
}
|
||||
continue;
|
||||
case SPIRType::Int:
|
||||
case SPIRType::UInt:
|
||||
|
||||
Reference in New Issue
Block a user