Created attachment 65969 [details] screenshot Hi, it seems that guardband clipping on i965(SNB) causes some polygons with normal vector (0,-1,0) to be clipped. this can be observed with an OpenGL version of the old DOOM engine. Ceiling planes are being clipped spontaneously while moving through the scene (see attached screenshot). I've tracked down the bad commit (85cd30406ff8414bc6ac6de1064d059a4c564160). When I switch off culling the problem goes away however this comes with the performance panelty. configure opts: ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --disable-dependency-tracking --enable-dri --enable-glx --disable-debug --disable-egl --disable-gbm --disable-gles1 --disable-gles2 --enable-glx-tls --enable-asm --enable-shared-glapi --disable-xa --with-dri-drivers=i965 --with-gallium-drivers= --with-egl-platforms= --disable-gallium-egl --disable-d3d1x --disable-gallium-g3dvl --disable-gallium-llvm --disable-openvg --disable-r600-llvm-compiler --disable-vdpau --disable-xvmc Could someone please confirm the issue? Thx and Regards Nic
I believe this is due to a hardware bug which we're failing to work around. Could you please try: sudo intel_reg_write 0x2090 0xffff0020 and see if it fixes the problem? (I'm guessing your value for that register is 0, not 0x20.) If by "an OpenGL version of the old DOOM engine" you mean Dante, I've verified that it does fix that. Thanks!
*** Bug 55523 has been marked as a duplicate of this bug. ***
Alternatively, I've sent out two patches to fix this: 1. Kernel bug fix: http://lists.freedesktop.org/archives/intel-gfx/2012-October/021043.html Applying that patch should apply the workaround correctly, thus fixing the problem. 2. Make Mesa check for the workaround: http://lists.freedesktop.org/archives/mesa-dev/2012-October/028345.html Applying this one will disable guardband clipping unless the workaround is correctly set. This allows Mesa to work regardless of the kernel version.
(In reply to comment #1) > If by "an OpenGL version of the old DOOM engine" you mean Dante, I've > verified that it does fix that. Probably the reporter means the original Doom (i.e. Doom 1) rather than Dante.
hello, sorry for the late reply I kinda lost track of this bug. @Kenneth: sudo intel_reg_write 0x2090 0xffff0020 in deed fixes the issue however applying the workarounds: http://lists.freedesktop.org/archives/intel-gfx/2012-October/021043.html http://lists.freedesktop.org/archives/mesa-dev/2012-October/028345.html does not. I have to remove the GEN6_CLIP_GB_TEST flag from gen6_clip_state.c to fix it actually. @Oliver: You're right. I didn't mean Dante(DOOM3) but the old DOOM1/2 game engine. I'm using my own OpenGL Renderer for this game which makes use of indexed VBOs (See screenshot). The code is not made public yet but you can try prboom-plus which produces the same clipping issue however much less of it ;-). Regards Nic
So, after applying the kernel fix, does intel_reg_read report 0x0 or 0x20 for the reg?
Also, if you're not getting the expected value from intel_reg_read, then bracketing the kernel setup of the workaround with printks of the register would be interesting.
Dear Reporter, This Mesa bug has been in the "NEEDINFO" status for over 60 days. I am closing this bug based on lack of response but feel free to reopen if resolution is still needed. Please ensure you're supplying the correct information as requested. Thank you.
Oops. We just forgot to close this. It was fixed in Kernel 3.10.
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.