summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorWill Dyson <will.dyson@gmail.com>2010-05-25 01:10:19 -0400
committerAlex Deucher <alexdeucher@gmail.com>2010-05-26 18:17:28 -0400
commitf49da110a81cc964100efa6a09e0fcdc7a35a935 (patch)
tree29f918a3a4f558ef2c2c8c33509b17f507f71bc5 /src/mesa/drivers
parent76034aaf655134c71e1ec619085c46251d037720 (diff)
Fallback to software render if there is no miptree for an image
This can happen when checking if a software fallback for a higher level operation (such as GenerateMipmap) is needed. Signed-off-by: Maciej Cencora <m.cencora@gmail.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_fbo.c8
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 6398605835..517485091a 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);