diff options
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_pixel_read.c | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_tex_image.c | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_read.c b/src/mesa/drivers/dri/i965/intel_pixel_read.c index 347f88077ea..10d14623fe1 100644 --- a/src/mesa/drivers/dri/i965/intel_pixel_read.c +++ b/src/mesa/drivers/dri/i965/intel_pixel_read.c @@ -134,10 +134,11 @@ intel_readpixels_tiled_memcpy(struct gl_context * ctx, return false; /* We can't handle copying from RGBX or BGRX because the tiled_memcpy - * function doesn't set the last channel to 1. + * function doesn't set the last channel to 1. Note this checks BaseFormat + * rather than TexFormat in case the RGBX format is being simulated with an + * RGBA format. */ - if (rb->Format == MESA_FORMAT_B8G8R8X8_UNORM || - rb->Format == MESA_FORMAT_R8G8B8X8_UNORM) + if (rb->_BaseFormat == GL_RGB) return false; if (!intel_get_memcpy(rb->Format, format, type, &mem_copy, &cpp, diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c index 393ab48d9f7..5d32a4ce650 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_image.c +++ b/src/mesa/drivers/dri/i965/intel_tex_image.c @@ -398,10 +398,11 @@ intel_gettexsubimage_tiled_memcpy(struct gl_context *ctx, return false; /* We can't handle copying from RGBX or BGRX because the tiled_memcpy - * function doesn't set the last channel to 1. + * function doesn't set the last channel to 1. Note this checks BaseFormat + * rather than TexFormat in case the RGBX format is being simulated with an + * RGBA format. */ - if (texImage->TexFormat == MESA_FORMAT_B8G8R8X8_UNORM || - texImage->TexFormat == MESA_FORMAT_R8G8B8X8_UNORM) + if (texImage->_BaseFormat == GL_RGB) return false; if (!intel_get_memcpy(texImage->TexFormat, format, type, &mem_copy, &cpp, |