mirror of
https://github.com/love2d/love.git
synced 2026-08-19 12:14:20 +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)
|
switch (memberType.basetype)
|
||||||
{
|
{
|
||||||
case SPIRType::Struct:
|
case SPIRType::Struct:
|
||||||
name += ".";
|
if (memberType.op == spv::OpTypeArray)
|
||||||
buildLocalUniforms(comp, memberType, offset, name);
|
{
|
||||||
|
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;
|
continue;
|
||||||
case SPIRType::Int:
|
case SPIRType::Int:
|
||||||
case SPIRType::UInt:
|
case SPIRType::UInt:
|
||||||
|
|||||||
Reference in New Issue
Block a user