System Environment: -------------------------- Platform: Sandybridge Libdrm: (master)libdrm-2.4.54-17-ge8c3c1358ecaf4e90f7d43762357ae6f8e2022b6 Mesa: (master)e945a19b35025c962131b2c4b7393461445f08f2 Xserver: (master)xorg-server-1.15.99.902-121-g2f5cf9ff9a0f713b7e038636484c77f113a5f10a Xf86_video_intel:(master)2.99.912-229-ge0523ade28fa0da00d0bd70d8b22d53ed4e49f73 Libva: (master)c61d8c6ce9ffc27320e9e177c1e1123d5f1b5014 Libva_intel_driver:(master)c5cb17ea86f0065a939d3636dd26651c93d497c8 kernel (drm-intel-nightly)2a38e1bcd4dc9523cd723291340226d139bece1b Bug detailed description: ------------------------- This new case fails on SNB+ platforms with mesa master and 10.2 branch. It works well on ILK. spec_ARB_shader_texture_lod_execution_tex-miplevel-selection_*ProjLod_3D also fails. Reproduce steps: ------------------------- 1. xinit 2. bin/tex-miplevel-selection *ProjGradARB 3D -fbo -auto
Created attachment 102884 [details] output
Following cases also fail: spec_glsl-1.30_execution_tex-miplevel-selection_textureGradOffset_1DArray spec_glsl-1.30_execution_tex-miplevel-selection_textureGradOffset_1DArrayShadow spec_glsl-1.30_execution_tex-miplevel-selection_textureGradOffset_2DRect spec_glsl-1.30_execution_tex-miplevel-selection_textureGradOffset_2DRectShadow spec_glsl-1.30_execution_tex-miplevel-selection_textureGrad_1DArray spec_glsl-1.30_execution_tex-miplevel-selection_textureGrad_1DArrayShadow spec_glsl-1.30_execution_tex-miplevel-selection_textureLodOffset_1DArray spec_glsl-1.30_execution_tex-miplevel-selection_textureLodOffset_1DArrayShadow spec_glsl-1.30_execution_tex-miplevel-selection_textureLod_1DArray spec_glsl-1.30_execution_tex-miplevel-selection_textureLod_1DArrayShadow spec_glsl-1.30_execution_tex-miplevel-selection_textureOffset_1DArray spec_glsl-1.30_execution_tex-miplevel-selection_textureOffset_1DArrayShadow spec_glsl-1.30_execution_tex-miplevel-selection_textureProjGradOffset_2DRect spec_glsl-1.30_execution_tex-miplevel-selection_textureProjGradOffset_2DRectShadow spec_glsl-1.30_execution_tex-miplevel-selection_textureProjGradOffset_2DRect_ProjVec4 spec_glsl-1.30_execution_tex-miplevel-selection_textureProjGradOffset_3D spec_glsl-1.30_execution_tex-miplevel-selection_textureProjGrad_3D spec_glsl-1.30_execution_tex-miplevel-selection_textureProjLodOffset_3D spec_glsl-1.30_execution_tex-miplevel-selection_textureProjOffset_3D spec_glsl-1.30_execution_tex-miplevel-selection_textureProj_3D
spec_glsl-1.30_execution_tex-miplevel-selection_textureGrad_1DArray also has bug 81450.
I have been looking into this.I don't think this is a bug in the driver, but simply a precision error when dividing by the projector that leads to selecting the wrong layer. I have a patch for piglit to prevent this kind of false positives that I'll send for review tomorrow.
I sent a patch for review to the piglit mailing list: http://lists.freedesktop.org/archives/piglit/2015-March/015124.html It fixes all projector tests with 3D textures on Intel hardware: bin/tex-miplevel-selection *ProjGradARB 3D -fbo -auto bin/tex-miplevel-selection *ProjLod 3D -fbo -auto bin/tex-miplevel-selection textureProj 3D -fbo -auto bin/tex-miplevel-selection textureProjGrad 3D -fbo -auto bin/tex-miplevel-selection textureProjGradOffset 3D -fbo -auto bin/tex-miplevel-selection textureProjOffset 3D -fbo -auto bin/tex-miplevel-selection "textureProj(bias)" 3D -fbo -auto bin/tex-miplevel-selection "textureProjOffset(bias)" 3D -fbo -auto
Fixed in piglit with: commit 181c26495634ba1a5603b4b75c47e2dee7c97c0f Author: Iago Toral Quiroga <itoral@igalia.com> Date: Wed Mar 11 08:25:24 2015 +0100 tex-miplevel-selection: Fix textureProj failures due to precision errors The textureProj tests multiply expected texture coordinates by the projector in advance so that when the driver does the division we obtain the same coordinates. However, the division can lead to small rounding errors that can affect the selected layer and fail the tests. This is currently happening on Intel hardware for all projector tests involving 3D textures. When we test a 3D texture for texture level 0 we have 32 layers, which means that each layer takes 1/32 = 0.03125 space in the [0, 1] texture coordinate space. The test uses 0.5 for the Z coordinate, which is exactly the boundary between layers 15 and 16 (16 * 0.03125 = 0.5). Because we first multiply 0.5 by the projector in CPU and then we divide the coordinate by the driver in the GPU, the result may be subject to rounding/precision errors and if the result of this operation is even slighly smaller than 0.5 the hardware will select layer 15 instead of layer 16, leading to the test failures we currently see, at least on Intel hardware, for all piglit tests that involve textureProj with 3D textures. The patch prevents this rounding from affecting the result of the test by using 0.51 as the target texture coordinates instead of 0.5. Because 0.51 is 0.01 into layer 16, we are giving a small room for rounding/precision errors that won't lead the hardware to select a different layer. This fixes all projector tests on Intel hardware: bin/tex-miplevel-selection *ProjGradARB 3D -fbo -auto bin/tex-miplevel-selection *ProjLod 3D -fbo -auto bin/tex-miplevel-selection textureProj 3D -fbo -auto bin/tex-miplevel-selection textureProjGrad 3D -fbo -auto bin/tex-miplevel-selection textureProjGradOffset 3D -fbo -auto bin/tex-miplevel-selection textureProjOffset 3D -fbo -auto bin/tex-miplevel-selection "textureProj(bias)" 3D -fbo -auto bin/tex-miplevel-selection "textureProjOffset(bias)" 3D -fbo -auto Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81405
Verified.Fixed.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.