Commit 9060a4e0 by Jamie Madill

Fix some missing UBO qualifier link validation errors.

TRAC #23747 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods
parent 19571818
...@@ -566,6 +566,12 @@ void OutputHLSL::header() ...@@ -566,6 +566,12 @@ void OutputHLSL::header()
BlockLayoutType blockLayoutType = convertBlockLayoutType(interfaceBlock.blockStorage()); BlockLayoutType blockLayoutType = convertBlockLayoutType(interfaceBlock.blockStorage());
setBlockLayout(&activeBlock, blockLayoutType); setBlockLayout(&activeBlock, blockLayoutType);
if (interfaceBlock.matrixPacking() == EmpRowMajor)
{
activeBlock.isRowMajorLayout = true;
}
mActiveInterfaceBlocks.push_back(activeBlock); mActiveInterfaceBlocks.push_back(activeBlock);
if (interfaceBlock.hasInstanceName()) if (interfaceBlock.hasInstanceName())
......
...@@ -50,7 +50,8 @@ InterfaceBlock::InterfaceBlock(const char *name, unsigned int arraySize, unsigne ...@@ -50,7 +50,8 @@ InterfaceBlock::InterfaceBlock(const char *name, unsigned int arraySize, unsigne
: name(name), : name(name),
arraySize(arraySize), arraySize(arraySize),
layout(BLOCKLAYOUT_SHARED), layout(BLOCKLAYOUT_SHARED),
registerIndex(registerIndex) registerIndex(registerIndex),
isRowMajorLayout(false)
{ {
} }
......
...@@ -79,6 +79,7 @@ struct InterfaceBlock ...@@ -79,6 +79,7 @@ struct InterfaceBlock
size_t dataSize; size_t dataSize;
std::vector<BlockMemberInfo> blockInfo; std::vector<BlockMemberInfo> blockInfo;
BlockLayoutType layout; BlockLayoutType layout;
bool isRowMajorLayout;
unsigned int registerIndex; unsigned int registerIndex;
}; };
......
...@@ -2459,6 +2459,12 @@ bool ProgramBinary::areMatchingInterfaceBlocks(InfoLog &infoLog, const sh::Inter ...@@ -2459,6 +2459,12 @@ bool ProgramBinary::areMatchingInterfaceBlocks(InfoLog &infoLog, const sh::Inter
return false; return false;
} }
if (vertexInterfaceBlock.layout != fragmentInterfaceBlock.layout || vertexInterfaceBlock.isRowMajorLayout != fragmentInterfaceBlock.isRowMajorLayout)
{
infoLog.append("Layout qualifiers differ for interface block '%s' between vertex and fragment shaders", blockName);
return false;
}
const unsigned int numBlockMembers = vertexInterfaceBlock.activeUniforms.size(); const unsigned int numBlockMembers = vertexInterfaceBlock.activeUniforms.size();
for (unsigned int blockMemberIndex = 0; blockMemberIndex < numBlockMembers; blockMemberIndex++) for (unsigned int blockMemberIndex = 0; blockMemberIndex < numBlockMembers; blockMemberIndex++)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment