Bug 101088 - `gallium: remove pipe_index_buffer and set_index_buffer` causes glitches and crash in gallium nine
Summary: `gallium: remove pipe_index_buffer and set_index_buffer` causes glitches and ...
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
Depends on:
Reported: 2017-05-18 11:46 UTC by raffarti
Modified: 2017-05-23 22:42 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

winedbg backtrace (1.20 KB, text/plain)
2017-05-18 12:29 UTC, raffarti

Description raffarti 2017-05-18 11:46:31 UTC
commit 330d0607ed60fd3edca192e54b4246310f06652f `gallium: remove pipe_index_buffer and set_index_buffer` causes glitches and crash in 32bit build with `-O3` optimization level. Can't test 64bit.
Comment 1 raffarti 2017-05-18 12:03:17 UTC
`-O2` was looking fine, but turns out it's just a little more stable. Less glitches and fewer crashes, but still broken.
Comment 2 raffarti 2017-05-18 12:29:59 UTC
Created attachment 131405 [details]
winedbg backtrace

winedbg crashes at startup with memory corruption
Comment 3 raffarti 2017-05-18 13:05:03 UTC
Sorry previously attached backtrace is invalid, please ignore it.
Comment 4 Axel Davy 2017-05-21 23:18:38 UTC
Should be fixed by

Please confirm.
Comment 5 raffarti 2017-05-22 07:06:00 UTC
Sorry but I can't manage to apply this patch, which branch/commit it's supposed to be applied on? (tried on master)

patching file src/gallium/state_trackers/nine/device9.c
Hunk #1 succeeded at 2915 with fuzz 1 (offset -12 lines).
patching file src/gallium/state_trackers/nine/indexbuffer9.c
Hunk #1 FAILED at 49.
Hunk #2 FAILED at 73.
2 out of 2 hunks FAILED -- saving rejects to file src/gallium/state_trackers/nine/indexbuffer9.c.rej
patching file src/gallium/state_trackers/nine/indexbuffer9.h
patching file src/gallium/state_trackers/nine/nine_state.c
Hunk #1 FAILED at 1575.
Hunk #2 FAILED at 2540.
Hunk #3 FAILED at 2561.
Hunk #4 succeeded at 2606 with fuzz 2.
Hunk #5 succeeded at 2622 with fuzz 2.
3 out of 5 hunks FAILED -- saving rejects to file src/gallium/state_trackers/nine/nine_state.c.rej
Comment 6 Axel Davy 2017-05-22 07:11:32 UTC
It applies well for me on master.

You can also find the patch here:
Comment 7 raffarti 2017-05-22 07:15:58 UTC
ah, I'm on git://anongit.freedesktop.org/mesa/mesa , I'll try iXit then
Comment 8 raffarti 2017-05-22 09:01:23 UTC
it won't compile due to some issue with llvm (5.0 master branch, which was fine for mesa repo), which version should I use?
Comment 9 Hleb Valoshka 2017-05-22 12:52:21 UTC
Hi Axel,

I've tested your patch with Unigine Heaven, HL2 mod Metastasis and STALKER: Shadows of Chernobyl. Everything is fine, no glitches, no crashes.
Comment 10 raffarti 2017-05-23 09:21:20 UTC
Alright, there was some weird issue with my local repo, I can confirm everything is working on my end too.
Comment 11 Axel Davy 2017-05-23 22:42:17 UTC
Fixed by: 7e04ae74d44105dca8190fc2fdd2ab8581cbe698

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.