Fix loading bool arrays from interface blocks

SPIR-V disallows bool in interface blocks, which is emulated with uint.
When loading a bool variable (through accessChainLoad()), it's converted
from uint to bool if it came from an interface block.

This was handled for bool and bvecN, but not for bool arrays.  This
change implements the conversion for bool arrays.

Closes #2694
This commit is contained in:
Shahbaz Youssefi
2021-07-15 22:00:51 -04:00
parent 4b7b86d568
commit 097215f618
6 changed files with 304 additions and 13 deletions

View File

@@ -0,0 +1,17 @@
#version 450 core
layout(std140, set=0, binding=0) uniform ub {
bool bi[2][3];
};
layout(std430, set=0, binding=1) buffer ssbo {
bool bo[2][3];
};
layout(location=0) out vec4 color;
void main()
{
bo = bi;
color = vec4(0);
}