Skip to content
Snippets Groups Projects
Commit 3c24a06c authored by John Kessenich's avatar John Kessenich
Browse files

SPV tests: Turn on some more tests related to currently pending issues.

parent cc16fa07
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
spv.matrix.frag spv.matrix.frag
WARNING: 0:6: varying deprecated in version 130; may be removed in future release
WARNING: 0:17: varying deprecated in version 130; may be removed in future release
WARNING: 0:22: varying deprecated in version 130; may be removed in future release
Linked fragment stage: Linked fragment stage:
......
#version 130 #version 450
uniform ivec4 uiv4; uniform ivec4 uiv4;
uniform vec4 uv4; uniform vec4 uv4;
...@@ -7,10 +7,10 @@ uniform bvec4 ub41, ub42; ...@@ -7,10 +7,10 @@ uniform bvec4 ub41, ub42;
uniform float uf; uniform float uf;
uniform int ui; uniform int ui;
#ifdef TEST_POST_110
uniform uvec4 uuv4; uniform uvec4 uuv4;
uniform unsigned int uui; uniform uint uui;
#endif
out vec4 FragColor;
void main() void main()
{ {
...@@ -19,9 +19,7 @@ void main() ...@@ -19,9 +19,7 @@ void main()
bool b; bool b;
bvec4 bv4; bvec4 bv4;
int i; int i;
#ifdef TEST_POST_110
uint u; uint u;
#endif
// floating point // floating point
v = radians(uv4); v = radians(uv4);
...@@ -51,37 +49,29 @@ void main() ...@@ -51,37 +49,29 @@ void main()
v += sign(v); v += sign(v);
v += floor(v); v += floor(v);
#ifdef TEST_POST_110
v += trunc(v); v += trunc(v);
v += round(v); v += round(v);
v += roundEven(v); v += roundEven(v);
#endif
v += ceil(v); v += ceil(v);
v += fract(v); v += fract(v);
v += mod(v, v); v += mod(v, v);
v += mod(v, v.x); v += mod(v, v.x);
#ifdef TEST_POST_110
v += modf(v, v); v += modf(v, v);
#endif
v += min(v, uv4); v += min(v, uv4);
v += max(v, uv4); v += max(v, uv4);
v += clamp(v, uv4, uv4); v += clamp(v, uv4, uv4);
v += mix(v,v,v); v += mix(v,v,v);
#ifdef TEST_POST_110 v += mix(v,v,ub41);
v += mix(v,v,ub); v += mix(v,v,f);
v += intBitsToFloat(v); //spv v += intBitsToFloat(ui);
v += uintBitsToFloat(v); // v += uintBitsToFloat(uui);
v += fma(v); // i += floatBitsToInt(f);
v += frexp(v); // u += floatBitsToUint(f);
v += ldexp(v); v += fma(v, uv4, v);
v += unpackUnorm2x16(v);
v += unpackUnorm4x8(v);
v += unpackSnorm4x8(v);
#endif
v += step(v,v); v += step(v,v);
v += smoothstep(v,v,v); v += smoothstep(v,v,v);
...@@ -94,9 +84,7 @@ void main() ...@@ -94,9 +84,7 @@ void main()
v += dFdx(v); v += dFdx(v);
v += dFdy(v); v += dFdy(v);
v += fwidth(v); v += fwidth(v);
//noise*(v);
#ifdef TEST_POST_110
// signed integer // signed integer
i += abs(ui); i += abs(ui);
i += sign(i); i += sign(i);
...@@ -104,29 +92,14 @@ void main() ...@@ -104,29 +92,14 @@ void main()
i += max(i, ui); i += max(i, ui);
i += clamp(i, ui, ui); i += clamp(i, ui, ui);
floatsBitsToInt(v);
packUnorm2x16(v);
packUnorm4x8(v);
packSnorm4x8(v);
// unsigned integer // unsigned integer
u = abs(uui);
u += sign(u);
u += min(u, uui); u += min(u, uui);
u += max(u, uui); u += max(u, uui);
u += clamp(u, uui, uui); u += clamp(u, uui, uui);
u += floatsBitToInt(v);
u += packUnorm2x16(v); //// bool
u += packUnorm4x8(v);
u += packSnorm4x8(v);
u += floatBitsToUInt(v);
#endif
// bool
#ifdef TEST_POST_110
b = isnan(uf); b = isnan(uf);
b = isinf(v); b = isinf(f);
#endif
b = any(lessThan(v, uv4)); b = any(lessThan(v, uv4));
b = (b && any(lessThanEqual(v, uv4))); b = (b && any(lessThanEqual(v, uv4)));
b = (b && any(greaterThan(v, uv4))); b = (b && any(greaterThan(v, uv4)));
...@@ -162,5 +135,5 @@ void main() ...@@ -162,5 +135,5 @@ void main()
i = ~i; i = ~i;
b = !b; b = !b;
gl_FragColor = b ? vec4(i) + vec4(f) + v : v; FragColor = b ? vec4(i) + vec4(f) + v : v;
} }
...@@ -2,11 +2,7 @@ ...@@ -2,11 +2,7 @@
uniform vec4 u[3]; uniform vec4 u[3];
#ifdef TEST_POST_110
varying vec2 v[];
#else
varying vec2 v[2]; varying vec2 v[2];
#endif
void main() void main()
{ {
......
#version 130 #version 130
//#define TEST_POST_110
uniform mat3 colorTransform; uniform mat3 colorTransform;
varying vec3 Color; in vec3 Color;
uniform mat4 m, n; uniform mat4 m, n;
#ifdef TEST_POST_110
uniform mat4x3 um43; uniform mat4x3 um43;
uniform mat3x4 un34; uniform mat3x4 un34;
#else
uniform mat4 um43;
uniform mat4 un34;
#endif
varying vec4 v; in vec4 v;
#ifdef TEST_POST_110 in vec3 u;
varying vec3 u;
#else
varying vec4 u;
#endif
void main() void main()
{ {
...@@ -29,24 +18,14 @@ void main() ...@@ -29,24 +18,14 @@ void main()
if (m != n) if (m != n)
gl_FragColor += v; gl_FragColor += v;
else { else {
gl_FragColor += m * v; gl_FragColor += m * v;
gl_FragColor += v * (m - n); gl_FragColor += v * (m - n);
} }
#ifdef TEST_POST_110
mat3x4 m34 = outerProduct(v, u); mat3x4 m34 = outerProduct(v, u);
m34 += mat4(v.x); m34 += mat3x4(v.x);
m34 += mat4(u, u.x, u, u.x, u, u.x, u.x); m34 += mat3x4(u, u.x, u, u.x, u, u.x);
#else
mat4 m34 = mat4(v.x*u.x, v.x*u.y, v.x*u.z, v.x*u.w,
v.y*u.x, v.y*u.y, v.y*u.z, v.y*u.w,
v.z*u.x, v.z*u.y, v.z*u.z, v.z*u.w,
v.w*u.x, v.w*u.y, v.w*u.z, v.w*u.w);
m34 += mat4(v.x);
m34 += mat4(u, u.x, u, u.x, u, u.x, u.x);
#endif
if (m34 == un34) if (m34 == un34)
gl_FragColor += m34 * u; gl_FragColor += m34 * u;
......
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits. // For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run). // For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "SPIRV99.836" #define GLSLANG_REVISION "SPIRV99.839"
#define GLSLANG_DATE "09-Dec-2015" #define GLSLANG_DATE "11-Dec-2015"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment