Glslang started to enforce constantness of
the ID parameter in subgroupBroadcast.
This fixes some tests that used to have
non-constant Id by manually unrolling the loop.
Components: Vulkan
Affects: dEQP-VK.subgroups.ballot_broadcast.subgroupbroadcas*
VK-GL-CTS issue: 1489
Change-Id: I291875f94b9781fc4920617106c4f86786fd82d8
(cherry picked from commit
4708641aeed605da095764bbc2d90df760309db3)
if (OPTYPE_BROADCAST == caseDef.opType)
{
- bdy << " tempResult = 0x3;\n"
- << " for (int i = 0; i < " << subgroups::maxSupportedSubgroupSize() << "; i++)\n"
- << " {\n"
- << " const uint id = i;\n"
+ bdy << " tempResult = 0x3;\n";
+ for (int i = 0; i < (int)subgroups::maxSupportedSubgroupSize(); i++)
+ {
+ bdy << " {\n"
+ << " const uint id = "<< i << ";\n"
<< " " << subgroups::getFormatNameForGLSL(caseDef.format)
<< " op = subgroupBroadcast(data1[gl_SubgroupInvocationID], id);\n"
<< " if ((0 <= id) && (id < gl_SubgroupSize) && subgroupBallotBitExtract(mask, id))\n"
<< " }\n"
<< " }\n"
<< " }\n";
+ }
}
else
{