http://bugs.winehq.org/show_bug.cgi?id=32823
Bug #: 32823 Summary: d3d9/visual triangle tests fail on Mesa 9.0 Product: Wine Version: 1.5.22 Platform: x86 OS/Version: Linux Status: NEW Keywords: download, source Severity: minor Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com Classification: Unclassified
Created attachment 43350 --> http://bugs.winehq.org/attachment.cgi?id=43350 glxinfo
visual.c:8717: Test failed: CCW triangle, twoside FALSE, cull cw, replace, has color 0x00000040, expected 0x00000030 visual.c:8722: Test failed: CCW triangle, twoside TRUE, cull off, incr, has color 0x00000080, expected 0x00000090 visual.c:8724: Test failed: CW triangle, twoside TRUE, cull off, replace, has color 0x00000080, expected 0x00000030 visual.c:8732: Test failed: CCW triangle, twoside TRUE, cull cw, incr, has color 0x00000080, expected 0x00000090
There are some later, potentially related failures: visual.c:13415: Test succeeded inside todo block: Expected color 0xffff0000 at (80, 100), got 0xffff0000. visual.c:13415: Test succeeded inside todo block: Expected color 0xffff0000 at (240, 100), got 0xffff0000. visual.c:13419: Test failed: Expected color 0xff0000ff at (400, 100), got 0xffff0000. visual.c:13419: Test failed: Expected color 0xff0000ff at (560, 100), got 0xffff0000. visual.c:13415: Test succeeded inside todo block: Expected color 0xffff0000 at (80, 450), got 0xffff0000. visual.c:13415: Test succeeded inside todo block: Expected color 0xffff0000 at (240, 450), got 0xffff0000. visual.c:13419: Test failed: Expected color 0xff0000ff at (400, 450), got 0xffff0000. visual.c:13419: Test failed: Expected color 0xff0000ff at (560, 450), got 0xffff0000.
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #1 from Austin English austinenglish@gmail.com 2013-01-26 18:44:41 CST --- Created attachment 43351 --> http://bugs.winehq.org/attachment.cgi?id=43351 +d3d trace
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #2 from Henri Verbeet hverbeet@gmail.com 2013-01-27 04:36:39 CST --- I suspect that's specific to the Intel (i965) driver and not Mesa in general; the d3d tests certainly pass on r600g for me, although I'm running Mesa from git. I think at least the first 4 also used to pass on i915, but it's been a while since I tried. Unfortunately I don't have the necessary hardware to reproduce this one.
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #3 from Austin English austinenglish@gmail.com 2013-02-03 09:59:07 CST --- There's a crash in recent mesa: https://bugs.freedesktop.org/show_bug.cgi?id=60241
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #4 from Austin English austinenglish@gmail.com 2013-02-03 10:47:19 CST --- BTW, I tried on mesa 8.0.5, which also fails in the same way. Any rough idea of a release/tag that might pass?
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #5 from Henri Verbeet hverbeet@gmail.com 2013-02-04 04:50:39 CST --- (In reply to comment #3)
There's a crash in recent mesa: https://bugs.freedesktop.org/show_bug.cgi?id=60241
My first guess would be that it's more of a build system issue. If you didn't try that already, try using git clean to clean up any old files, and do a clean build. I'm also under the impression that --enable-32-bit is broken, and you should be using something like --build=x86_64-pc-linux-gnu --host=i686-pc-linux-gnu instead.
The last version I tried before going to FOSDEM is 22233da1ee4b59663966169759960c00c033d0e9. That passed the tests, though that was with r600g.
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #6 from Austin English austinenglish@gmail.com 2013-02-11 10:19:32 CST --- (In reply to comment #5)
(In reply to comment #3)
There's a crash in recent mesa: https://bugs.freedesktop.org/show_bug.cgi?id=60241
My first guess would be that it's more of a build system issue. If you didn't try that already, try using git clean to clean up any old files, and do a clean build. I'm also under the impression that --enable-32-bit is broken, and you should be using something like --build=x86_64-pc-linux-gnu --host=i686-pc-linux-gnu instead.
I was originally building with: #!/bin/bash set -x set -e git clean -fdx CFLAGS="-m32" CXXFLAGS="-m32" ./autogen.sh --with-dri-drivers=i965,i915,swrast --with-gallium-drivers= --enable-32-bit
I tried using --build/host instead: $ ./autogen.sh --build=x86_64-pc-linux-gnu --host=i686-pc-linux-gnu --with-dri-drivers=i965,i915,swrast --with-gallium-drivers=
but that seems to have built 64-bit drivers: ../../../tools/runtest -q -P wine -M d3d9.dll -T ../../.. -p d3d9_test.exe.so visual.c && touch visual.ok libGL: OpenDriver: trying /home/austin/src/mesa/lib/i965_dri.so libGL error: dlopen /home/austin/src/mesa/lib/i965_dri.so failed (/home/austin/src/mesa/lib/i965_dri.so: wrong ELF class: ELFCLASS64) libGL error: unable to load driver: i965_dri.so libGL error: driver pointer missing libGL error: failed to load driver: i965
this is with: [austin@localhost mesa]$ git show commit 8a4d952d1074e648a99e44ed558a6f0f5b4460a7 Author: Vinson Lee vlee@freedesktop.org Date: Thu Jan 31 23:45:13 2013 -0800
r600g: Fix memory leak.
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #7 from Henri Verbeet hverbeet@gmail.com 2013-02-11 10:32:04 CST --- You do still need CFLAGS and CXXFLAGS.
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #8 from Austin English austinenglish@gmail.com 2013-02-11 10:41:32 CST --- (In reply to comment #7)
You do still need CFLAGS and CXXFLAGS.
Ah, righto, thanks. That builds/runs, but crashes in wine: Backtrace: =>0 0xf75cf1d0 __memcpy_ssse3_rep+0x90() in libc.so.6 (0x0032f2c8) 1 0x7e5d4951 d3d9_device_DrawIndexedPrimitiveUP+0x180(iface=0x120198, primitive_type=D3DPT_TRIANGLELIST, min_vertex_idx=0, vertex_count=0x4, primitive_count=0x2, index_data=0x32f32c, index_format=D3DFMT_INDEX16, vertex_data=0x32f530, vertex_stride=0x1c) [/home/austin/wine-git/dlls/d3d9/device.c:2136] in d3d9 (0x0032f2c8) 2 0x7ed20170 lighting_test+0x159f(device=<is not available>) [/home/austin/wine-git/dlls/d3d9/tests/visual.c:367] in d3d9_test (0x0032f5b8) 3 0x7ed5d6aa func_visual+0x629() [/home/austin/wine-git/dlls/d3d9/tests/visual.c:14103] in d3d9_test (0x0032fd38)
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #9 from Austin English austinenglish@gmail.com 2013-02-11 10:41:49 CST --- Created attachment 43514 --> http://bugs.winehq.org/attachment.cgi?id=43514 backtrace
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #10 from Rico kgbricola@web.de 2013-02-11 14:37:04 CST --- With r600 (2.1 Mesa 9.0.1 or 3.0 Mesa 9.2-devel - cb6470775c0139323bf889d2df2facdbc06a2b09)
Those values are kind of random and fail/succeed from time to time: visual.c:13415: Test succeeded inside todo block: Expected color 0xffff0000 at (80, 100), got 0xffff0000. visual.c:13415: Test succeeded inside todo block: Expected color 0xffff0000 at (240, 100), got 0xffff0000. visual.c:13415: Test succeeded inside todo block: Expected color 0xffff0000 at (80, 450), got 0xffff0000. visual.c:13415: Test succeeded inside todo block: Expected color 0xffff0000 at (240, 450), got 0xffff0000. visual.c:13419: Test failed: Expected color 0xff0000ff at (400, 100), got 0xffff0000. visual.c:13419: Test failed: Expected color 0xff0000ff at (560, 100), got 0xffff0000. visual.c:13419: Test failed: Expected color 0xff0000ff at (400, 450), got 0xffff0000. visual.c:13419: Test failed: Expected color 0xff0000ff at (560, 450), got 0xffff0000. This may look like piglit/fbo-sys-blit error which shows the same behavior here, but I'm not sure if the problem is the same.
Mesa git was build with: LDFLAGS="-m32" CXXFLAGS="-m32" CPPFLAGS="-m32" ./autogen.sh --enable-32-bit --with-dri-drivers="" --with-gallium-drivers="r600,swrast" --enable-texture-float
I couldn't get the errors @visual.c:8717, so it might be intel specific.
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #11 from Rico kgbricola@web.de 2013-02-12 03:11:12 CST --- The tests at line 87xx with driver version (9.0.1) fail, but with 9.2-devel (git-a79ce0c) they succeed here. This is on an Intel i5-520um integrated graphics (Ironlake Mobile).
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #12 from Rico kgbricola@web.de 2013-02-13 03:22:13 CST --- Could you generate a log with MESA_DEBUG=1 LIBGL_DRIVERS_PATH=/home/austin/src/mesa/lib make visual.ok to see why glMapBufferRange failed.
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #13 from Austin English austinenglish@gmail.com 2013-02-13 09:12:05 CST --- Created attachment 43540 --> http://bugs.winehq.org/attachment.cgi?id=43540 MESA_DEBUG=1 LIBGL_DRIVERS_PATH=/home/austin/src/mesa/lib make visual.ok
Mesa warning: couldn't open libtxc_dxtn.so, software DXTn compression/decompression unavailable
Is DXTN support required?
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #14 from Rico kgbricola@web.de 2013-02-13 13:28:28 CST --- (In reply to comment #13)
Is DXTN support required?
No, it's not a requirement, the tests are just skipped in that case.
I think the issue is "Mesa warning: failed to remap *". Imho as long as you don't call the functions all seems to be fine. Looks like your build is broken. I don't got these warnings here. You may attach the build log...
You could also try a 64bit build mesa with a 64bit build wine, does that have the same issue?
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #15 from Austin English austinenglish@gmail.com 2013-02-13 23:21:16 CST --- (In reply to comment #14)
(In reply to comment #13)
Is DXTN support required?
No, it's not a requirement, the tests are just skipped in that case.
I think the issue is "Mesa warning: failed to remap *". Imho as long as you don't call the functions all seems to be fine. Looks like your build is broken. I don't got these warnings here. You may attach the build log...
Will attach.
You could also try a 64bit build mesa with a 64bit build wine, does that have the same issue?
The failures to remap still happen, but I don't get the crash that occurs with 32-bit builds.
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #16 from Austin English austinenglish@gmail.com 2013-02-13 23:22:17 CST --- Created attachment 43552 --> http://bugs.winehq.org/attachment.cgi?id=43552 build log
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #17 from Rico kgbricola@web.de 2013-02-14 04:05:32 CST --- Created attachment 43555 --> http://bugs.winehq.org/attachment.cgi?id=43555 configure && make diff
I built with nearly the same options. I used a prefix. The differences are due to multithreaded build and the prefix.
The only buildsys difference seems to be: checking lex library... none needed checking whether yytext is a pointer... no
The problem may not be the build system, but it may be the hardware, which triggers a different code path?
I'm running on an i5-520UM (which has a GMA HD).
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #18 from Austin English austinenglish@gmail.com 2013-02-14 10:32:20 CST --- #intel-gfx seems to think that it's not a build issue either, when I asked them last night.
My hardware: 00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller]) Subsystem: Acer Incorporated [ALI] Device 071a Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin A routed to IRQ 44 Region 0: Memory at c2000000 (64-bit, non-prefetchable) [size=4M] Region 2: Memory at b0000000 (64-bit, prefetchable) [size=256M] Region 4: I/O ports at 3000 [size=64] Expansion ROM at <unassigned> [disabled] Capabilities: <access denied> Kernel driver in use: i915
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #19 from Rico kgbricola@web.de 2013-02-14 11:59:44 CST --- Created attachment 43557 --> http://bugs.winehq.org/attachment.cgi?id=43557 easy test case
Could you try the attached test case?
Build with "gcc test.c -o test -lX11 -lGL" ("gcc test.c -o test -lX11 -lGL -m32") Run with "MESA_DEBUG=1 ./test" (you may set the lib path for you build)
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #20 from Rico kgbricola@web.de 2013-02-14 12:16:05 CST --- Oh hence, LIBGL_DRIVERS_PATH is wrong, use LD_LIBRARY_PATH ! Your driver doesn't match to the corresponding build. You use your system libs and the just build intel_dri.so, which has different functions locations.
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #21 from Austin English austinenglish@gmail.com 2013-02-14 23:45:48 CST --- (In reply to comment #20)
Oh hence, LIBGL_DRIVERS_PATH is wrong, use LD_LIBRARY_PATH ! Your driver doesn't match to the corresponding build. You use your system libs and the just build intel_dri.so, which has different functions locations.
Just using LD_LIBRARY_PATH fails, but using both works for the testcase: [austin@localhost ~]$ LD_LIBRARY_PATH=/home/austin/src/mesa/lib MESA_DEBUG=1 ./test libGL error: failed to load driver: i965 libGL error: Try again with LIBGL_DEBUG=verbose for more details. libGL error: failed to load driver: swrast libGL error: Try again with LIBGL_DEBUG=verbose for more details. X Error of failed request: BadAlloc (insufficient resources for operation) Major opcode of failed request: 153 (GLX) Minor opcode of failed request: 3 (X_GLXCreateContext) Serial number of failed request: 33 Current serial number in output stream: 35 [austin@localhost ~]$ LIBGL_DRIVERS_PATH=/home/austin/src/mesa/lib LD_LIBRARY_PATH=/home/austin/src/mesa/lib MESA_DEBUG=1 ./test Mesa warning: couldn't open libtxc_dxtn.so, software DXTn compression/decompression unavailable GL_RENDERER = Mesa DRI Intel(R) Ivybridge Mobile GL_VERSION = 3.0 Mesa 9.2-devel (git-8a4d952) GL_VENDOR = Intel Open Source Technology Center
then tried that with d3d9/visual. It still crashes, now in the driver: Backtrace: =>0 0x7e1ddeaf intel_miptree_get_tile_offsets+0x63() in i965_dri.so (0x0032ef78) 1 0x7e2972f1 gen7_update_texture_surface+0x292() in i965_dri.so (0x0032eff8) 2 0x7e28a571 brw_update_texture_surfaces+0x17f() in i965_dri.so (0x0032f038) 3 0x7e2570a3 brw_upload_state+0x240() in i965_dri.so (0x0032f098) 4 0x7e20526c brw_try_draw_prims+0x21d() in i965_dri.so (0x0032f0d8) 5 0x7e2055a3 brw_draw_prims+0x171() in i965_dri.so (0x0032f128) 6 0x7df05ac0 vbo_draw_arrays+0x24c() in libdricore9.2.0.so.1 (0x0032f198) 7 0x7df05b55 vbo_exec_DrawArrays+0x8b() in libdricore9.2.0.so.1 (0x0032f1d8) 8 0x7e35b90a glDrawArrays+0x32() in libgl.so.1 (0x0032f208)
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #22 from Austin English austinenglish@gmail.com 2013-02-14 23:47:03 CST --- Created attachment 43571 --> http://bugs.winehq.org/attachment.cgi?id=43571 LIBGL_DRIVERS_PATH=/home/austin/src/mesa/lib LD_LIBRARY_PATH=/home/austin/src/mesa/lib MESA_DEBUG=1 make visual.ok
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #23 from Rico kgbricola@web.de 2013-02-15 03:43:22 CST --- Which version is this (mesa git commit?).
It looks like http://cgit.freedesktop.org/mesa/mesa/commit/?id=5751d0cb2dd6d1682d2a954e3f0... may solve it?
Could you build mesa with debug symbols? At least you should use "--enable-debug" in configure ...
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #24 from Henri Verbeet hverbeet@gmail.com 2013-02-15 04:01:04 CST --- (In reply to comment #23)
Could you build mesa with debug symbols? At least you should use "--enable-debug" in configure ...
You don't actually want that in general because it adds -O0 as well. It's probably better to just add -g and -DDEBUG to CFLAGS and CXXFLAGS.
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #25 from Austin English austinenglish@gmail.com 2013-02-15 09:53:34 CST --- (In reply to comment #23)
Which version is this (mesa git commit?).
I've been using 8a4d952d1074e648a99e44ed558a6f0f5b4460a7. I wanted to stick with one commit until the build issue was sorted out.
It looks like http://cgit.freedesktop.org/mesa/mesa/commit/?id=5751d0cb2dd6d1682d2a954e3f0... may solve it?
Yes, the crash is gone as of c37992c54d753e732783f712dea2d483450371dd.
However, there are still tests failures: visual.c:11445: Test failed: Expected color 0x0000ff00 at 400,60, got 0x000000ff. visual.c:11445: Test failed: Expected color 0x00ff0000 at 560,60, got 0x000000ff. ... visual.c:13415: Test succeeded inside todo block: Expected color 0xffff0000 at (240, 100), got 0xffff0000. visual.c:13419: Test failed: Expected color 0xff0000ff at (400, 100), got 0xffff0000.
http://bugs.winehq.org/show_bug.cgi?id=32823
--- Comment #26 from Austin English austinenglish@gmail.com 2013-02-20 23:45:20 CST --- With: wine-1.5.24-96-gde85287 mesa: 54d9c8a04a3d79da9a73f4b30d1c30874e05dc58 / snb-magic-14673-g54d9c8a
I only get failures from this line: visual.c:11445: Test failed: Expected color 0x0000ff00 at 400,60, got 0x000000ff.
https://bugs.winehq.org/show_bug.cgi?id=32823
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #27 from Austin English austinenglish@gmail.com --- (In reply to Austin English from comment #26)
With: wine-1.5.24-96-gde85287 mesa: 54d9c8a04a3d79da9a73f4b30d1c30874e05dc58 / snb-magic-14673-g54d9c8a
I only get failures from this line: visual.c:11445: Test failed: Expected color 0x0000ff00 at 400,60, got 0x000000ff.
with mesa-10.0.4-1.20140312.fc20 and wine-1.7.16-158-g2c880e5, the failures are: visual.c:12665: Test failed: Expected color 0x0000ff00 at 400,60, got 0x000000ff. visual.c:12665: Test failed: Expected color 0x00ff0000 at 560,60, got 0x000000ff. visual.c:12665: Test failed: Expected color 0x0000ff00 at 400,180, got 0x000000ff. visual.c:12665: Test failed: Expected color 0x00ff0000 at 560,180, got 0x000000ff. visual.c:12665: Test failed: Expected color 0x0000ff00 at 80,300, got 0x000000ff. visual.c:12665: Test failed: Expected color 0x0000ff00 at 240,300, got 0x000000ff. visual.c:12665: Test failed: Expected color 0x0000ff00 at 400,300, got 0x000000ff. visual.c:12665: Test failed: Expected color 0x00ff0000 at 560,300, got 0x000000ff. visual.c:12665: Test failed: Expected color 0x00ff0000 at 80,420, got 0x000000ff. visual.c:12665: Test failed: Expected color 0x00ff0000 at 240,420, got 0x000000ff. visual.c:12665: Test failed: Expected color 0x00ff0000 at 400,420, got 0x000000ff. visual.c:12665: Test failed: Expected color 0x00ff0000 at 560,420, got 0x000000ff.
which is bug 35862 / mesa bug https://bugs.freedesktop.org/show_bug.cgi?id=77312
on the same hardware, I tried wine-1.5.24-96-gde85287. This to just fails color tests: visual.c:11445: Test failed: Expected color 0x0000ff00 at 400,60, got 0x000000ff. visual.c:11445: Test failed: Expected color 0x00ff0000 at 560,60, got 0x000000ff. visual.c:11445: Test failed: Expected color 0x0000ff00 at 400,180, got 0x000000ff. visual.c:11445: Test failed: Expected color 0x00ff0000 at 560,180, got 0x000000ff. visual.c:11445: Test failed: Expected color 0x0000ff00 at 80,300, got 0x000000ff. visual.c:11445: Test failed: Expected color 0x0000ff00 at 240,300, got 0x000000ff. visual.c:11445: Test failed: Expected color 0x0000ff00 at 400,300, got 0x000000ff. visual.c:11445: Test failed: Expected color 0x00ff0000 at 560,300, got 0x000000ff. visual.c:11445: Test failed: Expected color 0x00ff0000 at 80,420, got 0x000000ff. visual.c:11445: Test failed: Expected color 0x00ff0000 at 240,420, got 0x000000ff. visual.c:11445: Test failed: Expected color 0x00ff0000 at 400,420, got 0x000000ff. visual.c:11445: Test failed: Expected color 0x00ff0000 at 560,420, got 0x000000ff.
so the triangle tests were fixed, in Mesa (UPSTREAM).
https://bugs.winehq.org/show_bug.cgi?id=32823
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED Resolution|FIXED |UPSTREAM
--- Comment #28 from Austin English austinenglish@gmail.com --- Er, UPSTREAM. And Closed.