Commit 4bfeed5f by John Kessenich

Semantics: Spec. changing to reflect reality of int/uint conversion for |^&.

This effects 4.x, where int/uint conversions are done, but not earlier.
parent 48891674
......@@ -185,3 +185,13 @@ void qlod()
}
struct SKeyMem { int precise; } KeyMem; // ERROR, keyword can't be a member
uniform uint uu;
out int iout;
void bitwiseConv()
{
iout = uu & i;
iout += uu ^ i;
iout += i | uu;
}
......@@ -7,10 +7,10 @@ uniform bvec4 ub41, ub42;
uniform float uf;
uniform int ui;
#ifdef TEST_POST_110
uniform uvec4 uuv4;
uniform unsigned int uui;
#endif
uniform uint uui;
void main()
{
......@@ -19,9 +19,9 @@ void main()
bool b;
bvec4 bv4;
int i;
#ifdef TEST_POST_110
uint u;
#endif
// floating point
v = radians(uv4);
......@@ -51,37 +51,37 @@ void main()
v += sign(v);
v += floor(v);
#ifdef TEST_POST_110
v += trunc(v);
v += round(v);
v += roundEven(v);
#endif
v += ceil(v);
v += fract(v);
v += mod(v, v);
v += mod(v, v.x);
#ifdef TEST_POST_110
v += modf(v, v);
#endif
v += min(v, uv4);
v += max(v, uv4);
v += clamp(v, uv4, uv4);
v += mix(v,v,v);
#ifdef TEST_POST_110
v += mix(v,v,ub);
v += intBitsToFloat(v);
v += uintBitsToFloat(v);
v += fma(v);
v += mix(v,v,bv4);
v += intBitsToFloat(ivec4(i));
v += uintBitsToFloat(uv4);
v += fma(v,v,v);
v += frexp(v);
v += ldexp(v);
v += unpackUnorm2x16(v);
v += unpackUnorm4x8(v);
v += unpackSnorm4x8(v);
#endif
v += step(v,v);
v += smoothstep(v,v,v);
......@@ -96,7 +96,7 @@ void main()
v += fwidth(v);
//noise*(v);
#ifdef TEST_POST_110
// signed integer
i += abs(ui);
i += sign(i);
......@@ -118,15 +118,15 @@ void main()
u += floatsBitToInt(v);
u += packUnorm2x16(v);
u += packUnorm4x8(v);
u += packSnorm4x8(v);
u += floatBitsToUInt(v);
#endif
i += uui & i; // ERRORs, no int/uint conversions before 400
i += uui ^ i;
i += i | uui;
// bool
#ifdef TEST_POST_110
b = isnan(uf);
b = isinf(v);
#endif
b = isinf(v.y);
b = any(lessThan(v, uv4));
b = (b && any(lessThanEqual(v, uv4)));
b = (b && any(greaterThan(v, uv4)));
......
......@@ -457,6 +457,10 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
case EOpMatrixTimesVector:
case EOpMatrixTimesScalar:
case EOpAnd:
case EOpInclusiveOr:
case EOpExclusiveOr:
case EOpFunctionCall:
case EOpReturn:
case EOpAssign:
......
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