Bug 24533 - Wrong pitch used for render-to-texture
Summary: Wrong pitch used for render-to-texture
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/r300 (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-14 13:38 UTC by Owen Taylor
Modified: 2009-10-15 08:35 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch as described (1.32 KB, patch)
2009-10-14 13:38 UTC, Owen Taylor
Details | Splinter Review

Description Owen Taylor 2009-10-14 13:38:04 UTC
Created attachment 30415 [details] [review]
Patch as described

Currently the pitch used for the render-buffer created to wrap a texture is:

 texImage->Width * rrb->cpp;

But the pitch we need to use is the pitch from the miptree. And in fact, we want to use the pitch of the texture level we are rendering to.

The attached patch does this; I've only tested with rendering to level 0, and I think there might be another bug for rendering to levels other than 0 - it would seem that we need to set rrb->base.Width/Height to be the width/height of the level as well.

Patch is against 7.6 branch, but HEAD looks identical.
Comment 1 Alex Deucher 2009-10-15 08:35:23 UTC
pushed:
3f30b0709b5a71915df336194f9f805e4c306cef


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.