Intel OpenGL Conformance Test Version ENG (Aug 6 2012 14:51:23) CLI options echo: oglconform -z -suite all -v 2 -test glsl-bif-tex-texture basic.texture.sampler1DShadow.set2-mips Window will be recreated 32 times. Window 0 will run 1 testcases on config with id 161. Window 1 will run 1 testcases on config with id 156. Window 2 will run 1 testcases on config with id 155. Window 3 will run 1 testcases on config with id 137. Window 4 will run 1 testcases on config with id 132. Window 5 will run 1 testcases on config with id 131. Window 6 will run 1 testcases on config with id 162. Window 7 will run 1 testcases on config with id 138. Window 8 will run 1 testcases on config with id 153. Window 9 will run 1 testcases on config with id 152. Window 10 will run 1 testcases on config with id 129. Window 11 will run 1 testcases on config with id 128. Window 12 will run 1 testcases on config with id 159. Window 13 will run 1 testcases on config with id 150. Window 14 will run 1 testcases on config with id 149. Window 15 will run 1 testcases on config with id 135. Window 16 will run 1 testcases on config with id 126. Window 17 will run 1 testcases on config with id 125. Window 18 will run 1 testcases on config with id 160. Window 19 will run 1 testcases on config with id 136. Window 20 will run 1 testcases on config with id 147. Window 21 will run 1 testcases on config with id 146. Window 22 will run 1 testcases on config with id 123. Window 23 will run 1 testcases on config with id 122. Window 24 will run 1 testcases on config with id 154. Window 25 will run 1 testcases on config with id 130. Window 26 will run 1 testcases on config with id 151. Window 27 will run 1 testcases on config with id 127. Window 28 will run 1 testcases on config with id 148. Window 29 will run 1 testcases on config with id 124. Window 30 will run 1 testcases on config with id 145. Window 31 will run 1 testcases on config with id 121. Total of 32 testcases will be executed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 161 (32 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 161| 1| 1| gl| wipbpx| rgba| 32| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 8| 24| 8| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 156 (32 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 156| 1| 1| gl| wipbpx| rgba| 32| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 8| 24| 8| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 155 (32 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 155| 1| 1| gl| wipbpx| rgba| 32| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 8| 24| 8| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 137 (32 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 137| 1| 1| gl| wipbpx| rgba| 32| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 8| 24| 8| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 132 (32 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 132| 1| 1| gl| wipbpx| rgba| 32| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 8| 24| 8| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 131 (32 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 131| 1| 1| gl| wipbpx| rgba| 32| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 8| 24| 8| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 162 (32 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 162| 1| 1| gl| wipbpx| rgba| 32| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 8| 24| 8| 64| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| slow| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 138 (32 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 138| 1| 1| gl| wipbpx| rgba| 32| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 8| 24| 8| 64| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| slow| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 153 (32 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 153| 1| 1| gl| wipbpx| rgba| 32| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 8| 0| 0| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 152 (32 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 152| 1| 1| gl| wipbpx| rgba| 32| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 8| 0| 0| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 129 (32 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 129| 1| 1| gl| wipbpx| rgba| 32| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 8| 0| 0| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 128 (32 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 128| 1| 1| gl| wipbpx| rgba| 32| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 8| 0| 0| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 159 (24 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 159| 1| 1| gl| wipbpx| rgba| 24| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 0| 24| 8| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 150 (24 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 150| 1| 1| gl| wipbpx| rgba| 24| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 0| 24| 8| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 149 (24 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 149| 1| 1| gl| wipbpx| rgba| 24| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 0| 24| 8| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 135 (24 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 135| 1| 1| gl| wipbpx| rgba| 24| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 0| 24| 8| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 126 (24 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 126| 1| 1| gl| wipbpx| rgba| 24| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 0| 24| 8| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 125 (24 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 125| 1| 1| gl| wipbpx| rgba| 24| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 0| 24| 8| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 160 (24 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 160| 1| 1| gl| wipbpx| rgba| 24| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 0| 24| 8| 48| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| slow| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 136 (24 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 136| 1| 1| gl| wipbpx| rgba| 24| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 0| 24| 8| 48| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| slow| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 147 (24 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 147| 1| 1| gl| wipbpx| rgba| 24| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 0| 0| 0| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 146 (24 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 146| 1| 1| gl| wipbpx| rgba| 24| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 0| 0| 0| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 123 (24 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 123| 1| 1| gl| wipbpx| rgba| 24| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 0| 0| 0| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 122 (24 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 122| 1| 1| gl| wipbpx| rgba| 24| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 0| 0| 0| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 154 (32 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 154| 1| 0| gl| wipbpx| rgba| 32| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 8| 24| 8| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 130 (32 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 130| 1| 0| gl| wipbpx| rgba| 32| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 8| 24| 8| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 151 (32 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 151| 1| 0| gl| wipbpx| rgba| 32| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 8| 0| 0| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 127 (32 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 127| 1| 0| gl| wipbpx| rgba| 32| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 8| 0| 0| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 148 (24 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 148| 1| 0| gl| wipbpx| rgba| 24| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 0| 24| 8| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 124 (24 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 124| 1| 0| gl| wipbpx| rgba| 24| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 0| 24| 8| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 145 (24 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 145| 1| 0| gl| wipbpx| rgba| 24| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 0| 0| 0| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 121 (24 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 121| 1| 0| gl| wipbpx| rgba| 24| 8| GREEN_S |BLUE_S |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES | 8| 8| 0| 0| 0| 0| 0| 0| SRGB |TEX_RGB |TEX_RGBA|CAVEAT |SWAP |M_PBUF_W|M_PBUF_H|M_PBUF_P -1| 0| 0| none| undef| 0| 0| 0 OpenGL Report. Vendor - 'Intel Open Source Technology Center' Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop ' Version - '3.0 Mesa 8.1-devel (git-ee99647)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test: --> 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase: VS: Errors number: 500 Vertex Shader: --- --- --- #version 130 precision highp float; #define VERTEX_SHADER vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { gl_Position = gl_Vertex; gl_FrontColor = testFunction((gl_Vertex + vec4(1.0f))/vec4(2.0f))/vec4(255); } Fragment Shader: --- --- --- #version 130 void main() { gl_FragColor = gl_Color*vec4(255); } FS: Errors number: 600 Vertex Shader: --- --- --- #version 130 void main() { gl_Position = gl_Vertex; } Fragment Shader: --- --- --- #version 130 precision highp float; vec4 ColorToVec4(int color) { if (color == 0) return vec4(255, 0, 0, 255); if (color == 1) return vec4(0, 255, 0, 255); if (color == 2) return vec4(0, 0, 255, 255); if (color == 3) return vec4(0, 0, 0, 255); if (color == 4) return vec4(255, 255, 255, 255); if (color == 5) return vec4(255, 255, 0, 255); if (color == 6) return vec4(0, 255, 255, 255); return vec4(255, 0, 255, 255); } int mod(int a, int b) { int div = a / b; int res = a - b * div; return (res >= 0) ? res : res + b; } uniform sampler1DShadow tex; #define MIPS_ENABLED #define SHADOW_FORM 1.0 #define _pos vec3(pos.xy, SHADOW_FORM/10.0f) #define _pos2 _pos #define _pos3 _pos #define _pos4 _pos #define TEX_TARGET_1D const ivec3 offset = ivec3(0,0,0); vec4 GetDriverResults(vec4 pos, ivec3 dims) { #ifdef LOD_FUNC_ON return vec4(texture(tex, _pos3)); #else #ifdef VERTEX_SHADER return vec4(texture(tex, _pos3)); #else #ifdef BIAS_FUNC_OFF return vec4(texture(tex, _pos)); #else if (pos.x < 0.25f) return vec4(texture(tex, _pos)); if (pos.x < 0.5f) return vec4(texture(tex, _pos2, float(0x00))); if (pos.x < 0.75f) return vec4(texture(tex, _pos3, float(-0x100))); return vec4(texture(tex, _pos4, float(0100))); #endif #endif #endif } int GetColorsNumber(ivec3 dims, vec4 pos) { int res = 7; #ifdef TEX_TARGET_Cube #if defined(VERTEX_SHADER) || defined(LOD_FUNC_ON) res = 6; #else { if (pos.x < 0.25f) res = 2; else if (pos.x < 0.5f) res = 5; else if (pos.x < 0.75f) res = 6; } #endif #endif return res; } int GetElementsNumber(ivec3 dims) { int res; res = dims.x * (dims.y > 0 ? dims.y : 1); res *= (dims.z > 0 ? dims.z : 1); return res; } int GetTexelLinearPos(ivec3 dims, vec4 pos, bool shadow) { int colors = GetColorsNumber(dims, pos); ivec3 texel; int res; texel.x = int(pos.x*dims.x); texel.y = int(pos.y*2*dims.y); texel.z = int(pos.x*dims.z); #ifdef TEX_TARGET_1DArray texel.y = int(pos.x*dims.y); #endif texel.x = mod(texel.x + mod(offset.x, dims.x), dims.x); if (dims.y > 0) texel.y = mod(texel.y + mod(offset.y, dims.y), dims.y); if (dims.z > 0) texel.z = mod(texel.z + mod(offset.z, dims.z), dims.z); res = texel.x; res += texel.y * dims.x; res += texel.z * dims.x * dims.y; if (shadow) return mod(res, 10); return mod(mod(res, GetElementsNumber(dims)), colors); } void RecalculateData(inout ivec3 dims) { #ifdef TEX_TARGET_1DArray dims.x /= 2; #elif defined TEX_TARGET_2DArray dims.xy /= ivec2(2); dims.y = dims.x < 1 ? 1 : dims.y; #else dims /= ivec3(2); dims.y = dims.x < 1 ? 1 : dims.y; dims.z = dims.z < 1 ? 1 : dims.z; #endif dims.x = dims.x < 1 ? 1 : dims.x; } vec4 GetShadowCmp(ivec3 dims, vec4 pos, float d_ref) { if (d_ref <= mod(GetTexelLinearPos(dims, pos, true)*7, 10)) return vec4(1); return vec4(0); } vec4 testFunction(vec4 pos) { ivec3 dims = ivec3(50,0,0); vec4 dark = vec4(0); if (pos.y >= 0.5f) return GetDriverResults(pos, dims); #ifdef LOD_FUNC_ON RecalculateData(dims); dark = vec4(50); #elif !defined VERTEX_SHADER #ifdef MIPS_ENABLED if (pos.x >= 0.75f) { RecalculateData(dims); dark = vec4(50); } #endif #endif #ifdef SHADOW_FORM vec4 res = GetShadowCmp(dims, pos, SHADOW_FORM); if (res != GetShadowCmp(dims, pos-vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); if (res != GetShadowCmp(dims, pos+vec4(1e-5f), SHADOW_FORM)) return ColorToVec4(100); return res; #else vec4 res = ColorToVec4(GetTexelLinearPos(dims,pos,false)); if (res != ColorToVec4(GetTexelLinearPos(dims,pos-vec4(1e-5f),false))) return ColorToVec4(100); if (res != ColorToVec4(GetTexelLinearPos(dims,pos+vec4(1e-5f),false))) return ColorToVec4(100); return res-dark; #endif } void main() { #ifdef SHADOW_FORM gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f)); #else gl_FragColor = testFunction(gl_FragCoord/vec4(100.0f))/vec4(255); #endif } --< 2.1.13.2 - basic.texture.sampler1DShadow.set2-mips subcase failed. << GLSL built-in functions, texture lookups (glsl-bif-tex-texture) test failed. (1 of 1 subcases) Intel Conformance failed. Total Passed : 0 Total Failed : 32 Total Not run: 0