Minetest wireframe debug view with undersampling culls front faces instead of back faces
System information
System:
Host: uff Kernel: 5.10.0-26-686 i686 bits: 32 compiler: gcc v: 10.2.1
Desktop: i3 4.19.1-non-git dm: LXDM Distro: Debian GNU/Linux 11 (bullseye)
CPU:
Info: Dual Core model: Intel Core Duo T2400 bits: 32 type: MCP
arch: M Yonah rev: C L2 cache: 2 MiB
flags: nx pae sse sse2 sse3 bogomips: 7315
Speed: 1829 MHz min/max: 1000/1833 MHz Core speeds (MHz): 1: 1829 2: 1829
Graphics:
Device-1: Intel Mobile 945GM/GMS 943/940GML Express Integrated Graphics
vendor: Lenovo ThinkPad R60/T60/X60 series driver: i915 v: kernel
bus ID: 00:02.0 chip ID: 8086:27a2
Display: x11 server: X.Org 1.20.11 driver: loaded: intel
unloaded: fbdev,modesetting,vesa resolution: 1400x1050~60Hz s-dpi: 96
OpenGL: renderer: Mesa DRI Intel 945GM x86/MMX/SSE2 v: 1.4 Mesa 20.3.5
direct render: Yes
Describe the issue
I am playing Minetest with undersampling on and when I activate wireframe mode I can see only the backfaces of the wireframe geometry being rendered and not the front faces. This happens every time, reliably. I can easily reproduce it as long as the undersampling
variable in minetest.conf
is set to an integer larger than 1.
Using a trace made with qapitrace
I found that GL_CULL_FACE_MODE
is set to GL_BACK
and still the front faces are culled.
Replaying the apitrace file on Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07)
seems to cull the back faces.
I suspected that rendering to fbo might invert the culling order somehow. When activating culling in the fbotexture
test program from mesa-demos-8.5.0
the back faces are correctly culled though.
Regression
I have no idea if this ever worked correctly.
Screenshots/video files (if applicable)
Rendering of apitrace call 39533 on my GPU (first image) vs GT2 (second image):
Rendering of apitrace call 40262 on my GPU (first image) vs GT2 (second image):
Any extra information would be greatly appreciated
I am going to attach an apitrace to this issue if I am convinced it will not leak any private information.