HLSL: Fix #1257: layout float1, int1, etc., as scalars.
This commit is contained in:
parent
46413d5780
commit
d55fe86512
3 changed files with 7 additions and 3 deletions
|
|
@ -1197,6 +1197,8 @@ int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, b
|
|||
if (type.isVector()) {
|
||||
int scalarAlign = getBaseAlignmentScalar(type, size);
|
||||
switch (type.getVectorSize()) {
|
||||
case 1: // HLSL has this, GLSL does not
|
||||
return scalarAlign;
|
||||
case 2:
|
||||
size *= 2;
|
||||
return 2 * scalarAlign;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue