[Mesa-dev] [PATCH 1/3] Fallback to software render if there is no miptree for an image
Will Dyson
will.dyson at gmail.com
Tue May 18 12:09:57 PDT 2010
This can happen when checking if a software fallback for a higher level
operation (such as GenerateMipmap) is needed.
---
src/mesa/drivers/dri/radeon/radeon_fbo.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c
index 6398605..5174850 100644
--- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
+++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
@@ -506,9 +506,10 @@ radeon_render_texture(GLcontext * ctx,
ASSERT(newImage);
- if (newImage->Border != 0) {
- /* Fallback on drawing to a texture with a border, which won't have a
- * miptree.
+ radeon_image = (radeon_texture_image *)newImage;
+
+ if (!radeon_image->mt || newImage->Border != 0) {
+ /* Fallback on drawing to a texture without a miptree.
*/
_mesa_reference_renderbuffer(&att->Renderbuffer, NULL);
_mesa_render_texture(ctx, fb, att);
@@ -539,7 +540,6 @@ radeon_render_texture(GLcontext * ctx,
rrb->base.RefCount);
/* point the renderbufer's region to the texture image region */
- radeon_image = (radeon_texture_image *)newImage;
if (rrb->bo != radeon_image->mt->bo) {
if (rrb->bo)
radeon_bo_unref(rrb->bo);
--
1.7.1
More information about the mesa-dev
mailing list