Bug 28623 - [r300g] ETQW: Invalid index buffer range.
Summary: [r300g] ETQW: Invalid index buffer range.
Status: RESOLVED INVALID
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r300 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-20 06:04 UTC by almos
Modified: 2011-01-15 14:20 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
backtrace (2.38 KB, text/plain)
2010-06-20 06:24 UTC, almos
Details
etqw_crash_fix.patch (565 bytes, patch)
2010-12-25 11:13 UTC, almos
Details | Splinter Review

Description almos 2010-06-20 06:04:54 UTC
A short while after a game is started, et:qw crashes.
Comment 1 almos 2010-06-20 06:24:56 UTC
Created attachment 36378 [details]
backtrace
Comment 2 almos 2010-06-20 10:29:48 UTC
my gpu is an rv350 (radeon 9600xt)
Comment 3 Marek Olšák 2010-06-22 04:38:49 UTC
It doesn't add up. The "start" parameter in draw_elements is 117825309, it's impossible for the index buffer to be so large. I might add some validation in the draw function for it not to crash, but that would just hide problems elsewhere.
Comment 4 Marek Olšák 2010-06-22 16:44:46 UTC
Could you try current mesa git?
Comment 5 Marek Olšák 2010-07-31 08:21:34 UTC
No feedback, closing.
Comment 6 almos 2010-07-31 15:29:26 UTC
I'm sorry for not responding. I now tried with current git (version
5fa1af0905ef2f513fe296f1d8e658dbdf24dd74), and it still prints
r300: Invalid index buffer range. Skipping rendering.
upon certain objects entering the view (like the giant walker, the cupboards in the houses and in the tunnel etc.).
Comment 7 Tom Stellard 2010-10-29 17:27:47 UTC
Is this still an issue with Mesa 7.9 or the latest version from git?
Comment 8 almos 2010-10-30 07:14:46 UTC
Yes, the problem still exists. It doesn't crash; though, because Marek added a hack that disables rendering instead of crashing.
Comment 9 Marek Olšák 2010-12-17 04:34:24 UTC
Does this problem still exist?
Comment 10 almos 2010-12-17 04:42:43 UTC
Yes, and it currently makes the game completely unplayable.
Comment 11 almos 2010-12-25 11:13:21 UTC
Created attachment 41442 [details] [review]
etqw_crash_fix.patch

The attached hack may not be correct, but it fixes this problem. When drawing light halos around lamps, etqw calls glDrawElements() as it was issuing a vertex array: indices is a pointer to the buffer rather than an offset to the vbo. The real bug may be in etqw (is it allowed to issue a vertex array while a vbo is bound?) or in the way mesa detects the difference between a vertex array and a vbo. Or in the head of the one who designed glDrawElements() this way...
Comment 12 Marek Olšák 2010-12-25 13:10:19 UTC
Could you possibly bring this issue and the patch to the mesa-dev mailing list? I can't comment on something I can't reproduce and this seems to be quite special. Maybe the Mesa maintainers will know what is going on. I don't think that patch is going to be accepted, but at least it's a good starting point.
Comment 13 almos 2010-12-25 15:03:54 UTC
OK, I subscribed to mesa-dev, and will post this issue shortly.

Meanwhile, to increase reproducibility: I'm testing with the demo, which is
ETQW 1.4.12343.12343  linux-x86 Jan 16 2008 10:19:41
Maybe the retail version does not trigger this crash (?)
Comment 14 Marek Olšák 2010-12-25 15:49:05 UTC
I use exactly the same version.
Comment 15 almos 2010-12-26 06:20:19 UTC
I now purged and reinstalled the game (with the same installer as before, which has the correct md5sum), and the problem is gone (and so is #32652). I forgot to keep a copy of the previous install, though, so I don't know what's happened.
Comment 16 almos 2011-01-15 14:20:15 UTC
Now this problem appeared again, and I was able to investigate it.
In .etqwctl/base/etqwconfig.cfg the correct setting is
seta r_useIndexBuffers "1"
and the incorrect is "0". I still don't know why, when, or how this was changed automatically.


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.