Commit 1ba5ba74 by Chris Forbes

Capture RowMajor/ColMajor decorations

Bug: b/128690261 Change-Id: I847ac2d1727066076c0eae56cfdd94bf31c1f400 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/28949Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com>
parent e6419ad3
...@@ -1364,6 +1364,13 @@ namespace sw ...@@ -1364,6 +1364,13 @@ namespace sw
case spv::DecorationRelaxedPrecision: case spv::DecorationRelaxedPrecision:
RelaxedPrecision = true; RelaxedPrecision = true;
break; break;
case spv::DecorationRowMajor:
HasRowMajor = true;
RowMajor = true;
break;
case spv::DecorationColMajor:
HasRowMajor = true;
RowMajor = false;
default: default:
// Intentionally partial, there are many decorations we just don't care about. // Intentionally partial, there are many decorations we just don't care about.
break; break;
...@@ -1409,6 +1416,12 @@ namespace sw ...@@ -1409,6 +1416,12 @@ namespace sw
MatrixStride = src.MatrixStride; MatrixStride = src.MatrixStride;
} }
if (src.HasRowMajor)
{
HasRowMajor = true;
RowMajor = src.RowMajor;
}
Flat |= src.Flat; Flat |= src.Flat;
NoPerspective |= src.NoPerspective; NoPerspective |= src.NoPerspective;
Centroid |= src.Centroid; Centroid |= src.Centroid;
......
...@@ -416,6 +416,7 @@ namespace sw ...@@ -416,6 +416,7 @@ namespace sw
bool HasOffset : 1; bool HasOffset : 1;
bool HasArrayStride : 1; bool HasArrayStride : 1;
bool HasMatrixStride : 1; bool HasMatrixStride : 1;
bool HasRowMajor : 1; // whether RowMajor bit is valid.
bool Flat : 1; bool Flat : 1;
bool Centroid : 1; bool Centroid : 1;
...@@ -423,6 +424,7 @@ namespace sw ...@@ -423,6 +424,7 @@ namespace sw
bool Block : 1; bool Block : 1;
bool BufferBlock : 1; bool BufferBlock : 1;
bool RelaxedPrecision : 1; bool RelaxedPrecision : 1;
bool RowMajor : 1; // RowMajor if true; ColMajor if false
Decorations() Decorations()
: Location{-1}, Component{0}, : Location{-1}, Component{0},
...@@ -431,9 +433,10 @@ namespace sw ...@@ -431,9 +433,10 @@ namespace sw
HasLocation{false}, HasComponent{false}, HasLocation{false}, HasComponent{false},
HasBuiltIn{false}, HasOffset{false}, HasBuiltIn{false}, HasOffset{false},
HasArrayStride{false}, HasMatrixStride{false}, HasArrayStride{false}, HasMatrixStride{false},
HasRowMajor{false},
Flat{false}, Centroid{false}, NoPerspective{false}, Flat{false}, Centroid{false}, NoPerspective{false},
Block{false}, BufferBlock{false}, Block{false}, BufferBlock{false},
RelaxedPrecision{false} RelaxedPrecision{false}, RowMajor{false}
{ {
} }
......
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