Bug 48787

Summary: [regression bisected] Doom3 generates DrawElements warnings, doesn't draw
Product: Mesa Reporter: Ian Romanick <idr>
Component: Drivers/DRI/swrastAssignee: Mathias Fröhlich <Mathias.Froehlich>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Ian Romanick 2012-04-16 15:20:22 UTC
Retail Doom3 on swrast (classic, I haven't tried softpipe or llvmpipe) generates an endless stream of messages like

Mesa warning: glDrawElements() index=895 is out of bounds (max=4)
Mesa warning: glDrawElements() index=39 is out of bounds (max=4)
Mesa warning: glDrawElements() index=39 is out of bounds (max=4)
Mesa warning: glDrawElements() index=196 is out of bounds (max=4)
Mesa warning: glDrawElements() index=571 is out of bounds (max=4)
Mesa warning: glDrawElements() index=17 is out of bounds (max=4)
Mesa warning: glDrawElements() index=67 is out of bounds (max=4)
Mesa warning: glDrawElements() index=38 is out of bounds (max=4)
Mesa warning: glDrawElements() index=1606 is out of bounds (max=4)

I have bisected this to:

commit 7a1e941ebee43cb97a2c77fd2269999b202308a2
Author: Mathias Fröhlich <Mathias.Froehlich@web.de>
Date:   Thu Dec 29 13:10:01 2011 +0100

    mesa: Fix and speedup gl_array_object::_MaxElement computation.
    
    Use a bitmask approach to compute gl_array_object::_MaxElement.
    To make this work correctly depending on the shader type actually used,
    make use of the newly introduced typed bitmask getters.
    With this change I gain about 5% draw time on some osgviewer examples.
    
    Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
    Reviewed-by: Brian Paul <brianp@vmware.com>
Comment 1 Mathias Fröhlich 2018-04-25 06:52:13 UTC
The VAO _MaxElement computations, including the warning in question, have been removed with commit 26ee6f23a9aec6b1f392baa0e3f1f2c62c038a57.

I do not have doom3 available here to test, but I strongly guess that this should make the warning vanish finally.

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.