Intel OpenGL Conformance Test Version ENG (Aug 6 2012 16:45:05) CLI options echo: oglconform -z -suite all -v 2 -D 141 -test glsl-bif-tex-grad basic.textureProjGradOffset.2D.float.vec4 Window will be recreated 1 times. Window 0 will run 1 testcases on config with id 141. Total of 1 testcases will be executed. Setup Report. Verbose level = 2. Path inactive. Visual Report for ID 141 (32 bits). ID |ACCELERA|DB |REND_T |SURF_T |C_BUF_T |BUF_S |RED_S | 141| 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) Sandybridge Desktop x86/MMX/SSE2' Version - '3.0 Mesa 8.1-devel (git-61b62c0)' (3.0) GLSL Version - '1.30' Context Flags - None >> GLSL built-in functions, textureGrad (glsl-bif-tex-grad) test: --> 1.4.2.3.2 - basic.textureProjGradOffset.2D.float.vec4 subcase: VS: Errors: 4160 Vertex Shader: --- --- --- #version 130 #define VERTEX_SHADER precision highp float; vec4 res, ref, cmp; out vec4 results[3]; #define gte(x,y) all(greaterThanEqual(x,y)) #define lte(x,y) all(lessThanEqual(x,y)) vec4 ColorToVec4(uint); vec3[2] GetDerivatives(vec2); float GetLOD(vec3[2]); #define SHADOW 1u #define ARRAY 2u #define PROJ 4u vec4 GetColor(vec4, float, uint); vec4 GetColor(vec4, float, ivec3, uint); bool showRes = false, showRef = false; const uvec3 dims = uvec3(28,28,0); uniform sampler2D tex; vec4 testFunction(vec4 pos, vec4 relPos) { relPos.w = 0.05f; vec3[2] d = GetDerivatives(floor(pos.xy * vec2(100))); const ivec3 off = ivec3(1,-1,0); ref = GetColor(relPos, GetLOD(d), off, PROJ); res = vec4(textureProjGradOffset(tex, relPos, d[0].xy, d[1].xy, off.xy)); if (lte(abs(res-ref), vec4(1e-5f))) return ColorToVec4(1u); return ColorToVec4(0u); } vec4 ColorToVec4(uint color) { if (color == 0u) return vec4(255, 0, 0, 255); if (color == 1u) return vec4(0, 255, 0, 255); if (color == 2u) return vec4(0, 0, 255, 255); if (color == 3u) return vec4(0, 0, 0, 255); if (color == 4u) return vec4(255, 255, 255, 255); if (color == 5u) return vec4(255, 255, 0, 255); if (color == 6u) return vec4(0, 255, 255, 255); } uint modulus(int x, uint y) { return uint((x+abs(x)*int(y))%int(y)); } uvec3 modulus(ivec3 x, uvec3 y) { return uvec3((x+abs(x)*ivec3(y))%ivec3(y)); } vec3[2] GetDerivatives(vec2 pos) { //center quads if (gte(pos,vec2(1)) && lte(pos,vec2(6))) return vec3[2](vec3(1/3.f,0,0),vec3(0,1/3.f,0)); if (gte(pos,vec2(7)) && lte(pos,vec2(16))) return vec3[2](vec3(1/7.f,0,0),vec3(0,1/7.f,0)); if (gte(pos,vec2(17)) && lte(pos,vec2(34))) return vec3[2](vec3(1/15.f,0,0),vec3(0,1/15.f,0)); if (gte(pos,vec2(35)) && lte(pos,vec2(68))) return vec3[2](vec3(1/31.f,0,0),vec3(0,1/31.f,0)); //border flat polygons if (pos.x >= 74.f) return vec3[2](vec3(1/24.f,0,0),vec3(0,1/49.f,0)); if (pos.y >= 74.f) return vec3[2](vec3(1/49.f,0,0),vec3(0,1/24.f,0)); //border bent polygons if (pos.x <= 10.f) return vec3[2](vec3(0,0,1/9.f),vec3(0,1/19.f,0)); if (pos.y <= 10.f) return vec3[2](vec3(1/19.f,0,0),vec3(0,1/9.f,1/9.f)); } float GetLOD(vec3[2] d) { float lod = 0.f; vec2 temp; d[0] *= vec3(dims); d[1] *= vec3(dims); temp.x = sqrt(d[0].x*d[0].x+d[0].y*d[0].y+d[0].z*d[0].z); temp.y = sqrt(d[1].x*d[1].x+d[1].y*d[1].y+d[1].z*d[1].z); lod = round(log2(max(temp.x, temp.y))); lod = max(0.f, lod); lod = min(4.f, lod); return lod; } vec4 GetColor(vec4 pos, float LOD, uint options) { return GetColor(pos, LOD, ivec3(0), options); } vec4 GetColor(vec4 pos, float LOD, ivec3 off, uint flags) { uvec3 newDims = uvec3(dims/uint(pow(2.f, LOD))); if ((flags&ARRAY)>0u && dims.z!=0u) newDims.z = dims.z; else if ((flags&ARRAY)>0u) newDims.yz = dims.yz; if ((flags&PROJ)==0u) pos.w = 1.f; uvec3 fakeDims = max(newDims, uvec3(1)); ivec3 linearPos=ivec3(floor(pos.xyz*vec3(newDims)/pos.w)); linearPos = ivec3(modulus(linearPos + off, fakeDims)); linearPos *= ivec3(1, newDims.x, newDims.x*newDims.y); uint total = uint(linearPos.x+linearPos.y+linearPos.z); if ((flags&SHADOW)>0u) return vec4((total*7u)%10u)/10.f; return max(ColorToVec4(total%7u)-vec4(50*LOD), vec4(0)); } void main() { gl_Position = gl_Vertex; vec4 relPos = gl_MultiTexCoord0; if (relPos.x == 1.f) relPos.x = 1.f - 1e-3f; if (relPos.y == 1.f) relPos.y = 1.f - 1e-3f; if (relPos.z == 1.f) relPos.z = 1.f - 1e-3f; cmp = testFunction((gl_Vertex+vec4(1))/vec4(2), relPos); if (any(greaterThanEqual(res.xyz, vec3(1)))) res = res / vec4(vec3(255), 1); if (any(greaterThanEqual(ref.xyz, vec3(1)))) ref = ref / vec4(vec3(255), 1); results[0] = res; results[1] = ref; results[2] = cmp / vec4(255); } Fragment Shader: --- --- --- #version 130 precision highp float; in vec4 results[3]; out vec4 res[3]; void main() { for (int i=0; i<3; i++) res[i] = results[i]; } --< 1.4.2.3.2 - basic.textureProjGradOffset.2D.float.vec4 subcase failed. << GLSL built-in functions, textureGrad (glsl-bif-tex-grad) test failed. (1 of 1 subcases) Intel Conformance failed. Total Passed : 0 Total Failed : 1 Total Not run: 0