Bug 36173 - struct renderbuffer's 'format' field never set when using FBO
Summary: struct renderbuffer's 'format' field never set when using FBO
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-12 09:01 UTC by Pierre-Eric Pelloux-Prayer
Modified: 2011-05-21 08:51 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
simple app the exibhits the problem (3.41 KB, text/x-c++src)
2011-04-12 09:01 UTC, Pierre-Eric Pelloux-Prayer
Details
proposed patch (895 bytes, patch)
2011-04-12 09:02 UTC, Pierre-Eric Pelloux-Prayer
Details | Splinter Review

Description Pierre-Eric Pelloux-Prayer 2011-04-12 09:01:08 UTC
Created attachment 45537 [details]
simple app the exibhits the problem

When using glReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, buffer) there's a speed difference between reading back from framebuffer or from an FBO.

Using gdb I found that format field of renderbuffer structure is always equal PIPE_FORMAT_NONE for the FBO which prevents using st_fast_readpixels.

I've built a simple patch which init format field in "st_renderbuffer_alloc_storage" and there is an improvement (a.k.a st_fast_readpixels is used everywhere).

What do you think of this (potential) issue ?

(I'm using git version of Mesa, and r600g)
Comment 1 Pierre-Eric Pelloux-Prayer 2011-04-12 09:02:03 UTC
Created attachment 45538 [details] [review]
proposed patch
Comment 2 Pierre-Eric Pelloux-Prayer 2011-05-20 14:36:25 UTC
Has anyone been able to test the above patch ?
Comment 3 Brian Paul 2011-05-21 08:51:57 UTC
Committed.  I didn't see any fbo regressions with piglit.  I'm surprised this wasn't found a long time ago.  Thanks.


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.