Bug 27521

Summary: corrupted rendering with vbo + kms + rv515 (hits Blender 2.50!)
Product: Mesa Reporter: Wiktor Janas <wixorpeek>
Component: Drivers/DRI/r300Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: pedretti.fabio
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: program triggering the bug (compile with -std=c99)
Blender's OpenGL call trace from BuGLe

Description Wiktor Janas 2010-04-07 12:04:35 UTC
Created attachment 34773 [details]
program triggering the bug (compile with -std=c99)

Environment:
  - Debian Linux, vanilla kernel 2.6.33,
  - mesa 7.7.1-1,
  - radeon ddx 1:6.12.192-2 (changelog says: pull from upstream master up to commit 5c256808)
  - libdrm 2.4.18-3
  - Radeon x1300 (xorg says: 1002:7142:1043:0162 ATI Technologies Inc RV515 PRO [Radeon X1300/X1550 Series] rev 0, ...)

When using Blender's 2.50 VBO rendering mode, some mesh faces are not drawn. The rendering is otherwise clean and correct. This occurs iff both VBO and KMS are enabled.

Using BuGLe (http://www.opengl.org/sdk/tools/BuGLe) i have obtained trace of opengl calls made by Blender (attached) and created a minimal program need to reproduce the bug. It should render rotating gray cube with slight orange silhouette. Program's source is attached, see comments there for details.

AFAIR the bug was already sitting there when I first tried KMS, which was around October 18.

In the other news, if VBO is large, I get this on the console:
*********************************WARN_ONCE*********************************
File r300_draw.c function r300TryDrawPrims line 671
Rendering was 7 commands larger than predicted size. We might overflow  command buffer.
***************************************************************************
This does not depend on KMS being enabled or not. 242406 indices and 40803 vertices are sufficient to reproduce this, but it's not strict lower bound.
Comment 1 Wiktor Janas 2010-04-07 12:05:43 UTC
Created attachment 34774 [details]
Blender's OpenGL call trace from BuGLe
Comment 2 Michel Dänzer 2010-04-08 01:12:28 UTC
I can confirm the problem with the r300 driver.

The test program works fine with the r300g driver.
Comment 3 Wiktor Janas 2010-04-09 05:07:59 UTC
Indeed, gallium version works for me too. However, it has some serious texture problems - basically anything Blender draws using textures is garbage. Blender can be used without vbo, but not without textures.

Is the vbo bug going to be fixed in non-gallium version?
Comment 4 Maciej Cencora 2010-04-09 12:29:30 UTC
I've pushed a fix on mesa_7_7_branch (a5489649593427e47b039ad0d4a98cbb4e547f69).
Thanks for the report and testcase!
Comment 5 Rafał Miłecki 2010-04-09 22:41:12 UTC
(In reply to comment #4)
> I've pushed a fix on mesa_7_7_branch
> (a5489649593427e47b039ad0d4a98cbb4e547f69).
> Thanks for the report and testcase!

Thanks for fix! ;)

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.