[Bug 38452] ETQW: Renders garbage in some places

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugs.freedesktop.org/show_bug.cgi?id=38452

--- Comment #3 from Vadim <ptpzz@xxxxxxxxx> 2011-06-22 09:04:10 PDT ---
(In reply to comment #2)
> On my system, the patch causes the display to simply stop updating when trying
> to reproduce the bug. Look away from the area in the game causing the bug and
> the screen starts updating again.

It's exactly the expected behaviour.

> Are you sure you have diagnosed this correctly and that the bug is in the game?
> Because none of the other Mesa drivers I have tried shows this behaviour (i965,
> r300g).

Probably the game settings were adjusted by some auto-detect features in the
game while you have been testing with different drivers. Have you used the same
game installation with the same settings for testing? Also, have you tried
replaying your own trace file with different drivers?

Of course, it's possible that I've missed something. You could check it if you
are familiar with opengl. Open your trace with qapitrace and set filter:
Trace->Options->Only show the following events-> type "glDrawEle|glBindBuf" -
this will show only important events. Then select Edit->Go to call->674429. You
will see the following call: "glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER, 1024)".
So the game still uses index buffers for something and this call binds buffer
1024 as the index buffer. And then you could see that after binding the index
buffer there are calls to glDrawElements - they should do the rendering. When
the index buffer is bound, last parameter of glDrawElements is interpreted by
gl as the offset in the buffer. And when the index buffer is not bound, last
parameter should be the pointer to data in the memory. In the first
DrawElements call after binding the index buffer you could see the value
"0x9b46d720". Obviously, it is not valid value for the offset in the buffer
(buffer 1024 is ~2mb in size at this moment). It looks like a pointer, so it
seems the game engine is passing pointers to glDrawElements as if no index
buffer is bound. So the game should either unbind the index buffer or never
bind it at all before using DrawElements calls with pointers. And this also
explains why setting "r_useIndexBuffers" to 1 helps - if the game will always
use index buffers for rendering, then such situation will be impossible.

The bug is reproducible here with r600g (garbage or freeze), swrastg (crash),
and catalyst 11.5 (garbage or freeze). I'm using demo and you are using full
game, so some differences are possible, but afaics its not the case.

I think r_useIndexBuffers=0 was intended only for ancient low-end hw and was
tested with lowest settings only. If it is default on some configurations for
modern hw, then I think it is just autodetection fail in the game.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux