Commit ae8af5d3 by xavier Committed by John Kessenich

HLSL: fix array[1] of vec4 constant declaration.

parent c64a9dd6
......@@ -754,7 +754,7 @@ ERROR: 0:29: 'constructor' : cannot convert parameter 2 from ' const 2X2 matrix
ERROR: 0:29: ' const 2-element array of 4-component vector of float' : cannot construct with these arguments
ERROR: 0:29: '=' : cannot convert from ' const float' to ' global 2-element array of 4-component vector of float'
ERROR: 0:30: 'initializer list' : wrong number of matrix columns: temp 4X2 matrix of float
ERROR: 0:40: 'constructor' : cannot convert parameter 1 from ' temp float' to ' temp structure{ global float s, global float t}'
ERROR: 0:40: 'constructor' : cannot convert parameter 1 from ' const structure{ global 4-component vector of float a, global 4-component vector of float b}' to ' temp structure{ global float s, global float t}'
ERROR: 0:70: 'initializer list' : wrong number of structure members
ERROR: 13 compilation errors. No code generated.
......
......@@ -10,7 +10,7 @@ ERROR: 0:29: 'constructor' : cannot convert parameter 2 from ' const 2X2 matrix
ERROR: 0:29: ' const 2-element array of 4-component vector of float' : cannot construct with these arguments
ERROR: 0:29: '=' : cannot convert from ' const float' to ' global 2-element array of 4-component vector of float'
ERROR: 0:30: 'initializer list' : wrong number of matrix columns: temp 4X2 matrix of float
ERROR: 0:40: 'constructor' : cannot convert parameter 1 from ' temp float' to ' temp structure{ global float s, global float t}'
ERROR: 0:40: 'constructor' : cannot convert parameter 1 from ' const structure{ global 4-component vector of float a, global 4-component vector of float b}' to ' temp structure{ global float s, global float t}'
ERROR: 0:70: 'initializer list' : wrong number of structure members
ERROR: 13 compilation errors. No code generated.
......
......@@ -5,9 +5,14 @@ struct {
} s[11];
static float4 C = float4(1,2,3,4);
float4 a1[1] = { float4(1,2,3,4) };
float4 a2[2] = { float4(1,2,3,4), float4(5,2,3,4), };
const float4 c1[1] = { float4(1,2,3,4) };
static const float4 c2[2] = { C, float4(1,2,3,4), };
float4 PixelShaderFunction(int i : sem1, float4 input[3] : sem2) : SV_TARGET0
{
float4 b[10] = { C, C, C, C, C, C, C, C, C, C };
return a[1] + a[i] + input[2] + input[i] + b[5] + b[i] + s[i].m[i];
float4 tmp = C + a1[0] + c1[0] + a2[i] + c2[i];
return a[1] + a[i] + input[2] + input[i] + b[5] + b[i] + s[i].m[i] + tmp;
}
......@@ -5474,7 +5474,7 @@ TIntermTyped* TParseContext::addConstructor(const TSourceLoc& loc, TIntermNode*
bool singleArg;
if (aggrNode) {
if (aggrNode->getOp() != EOpNull || aggrNode->getSequence().size() == 1)
if (aggrNode->getOp() != EOpNull)
singleArg = true;
else
singleArg = false;
......
......@@ -7828,7 +7828,7 @@ TIntermTyped* HlslParseContext::addConstructor(const TSourceLoc& loc, TIntermTyp
bool singleArg;
if (aggrNode != nullptr) {
if (aggrNode->getOp() != EOpNull || aggrNode->getSequence().size() == 1)
if (aggrNode->getOp() != EOpNull)
singleArg = true;
else
singleArg = 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