HLSL: Reverse what the driver is told about row/column majorness, matching the row-column reversal.

This commit is contained in:
John Kessenich
2016-09-25 20:25:06 -06:00
parent 88712f1a21
commit 10f7fc739c
7 changed files with 145 additions and 124 deletions

View File

@@ -491,10 +491,10 @@ bool HlslGrammar::acceptQualifier(TQualifier& qualifier)
qualifier.sample = true;
break;
case EHTokRowMajor:
qualifier.layoutMatrix = ElmRowMajor;
qualifier.layoutMatrix = ElmColumnMajor;
break;
case EHTokColumnMajor:
qualifier.layoutMatrix = ElmColumnMajor;
qualifier.layoutMatrix = ElmRowMajor;
break;
case EHTokPrecise:
qualifier.noContraction = true;

View File

@@ -63,11 +63,11 @@ HlslParseContext::HlslParseContext(TSymbolTable& symbolTable, TIntermediate& int
linkage = new TIntermAggregate;
globalUniformDefaults.clear();
globalUniformDefaults.layoutMatrix = ElmColumnMajor;
globalUniformDefaults.layoutMatrix = ElmRowMajor;
globalUniformDefaults.layoutPacking = ElpStd140;
globalBufferDefaults.clear();
globalBufferDefaults.layoutMatrix = ElmColumnMajor;
globalBufferDefaults.layoutMatrix = ElmRowMajor;
globalBufferDefaults.layoutPacking = ElpStd430;
globalInputDefaults.clear();
@@ -3624,11 +3624,11 @@ void HlslParseContext::setLayoutQualifier(const TSourceLoc& loc, TQualifier& qua
std::transform(id.begin(), id.end(), id.begin(), ::tolower);
if (id == TQualifier::getLayoutMatrixString(ElmColumnMajor)) {
qualifier.layoutMatrix = ElmColumnMajor;
qualifier.layoutMatrix = ElmRowMajor;
return;
}
if (id == TQualifier::getLayoutMatrixString(ElmRowMajor)) {
qualifier.layoutMatrix = ElmRowMajor;
qualifier.layoutMatrix = ElmColumnMajor;
return;
}
if (id == "push_constant") {