summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-02-02 09:49:44 -0800
committerJason Ekstrand <[email protected]>2015-02-02 10:18:42 -0800
commit2cebaac479d49cd6df4e97b466ba14bab3f30db1 (patch)
treeaf1da09683811510bc37f6c772db6d3131df11d2 /src/mesa/drivers
parentaf8fd694d4946493553aac310cc1ce5fa1f765e5 (diff)
i965: Don't use tiled_memcpy to download from RGBX or BGRX surfaces
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88841 Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/intel_pixel_read.c7
-rw-r--r--src/mesa/drivers/dri/i965/intel_tex_image.c7
2 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_read.c b/src/mesa/drivers/dri/i965/intel_pixel_read.c
index f3ab05ccbb8..df22a637dce 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_read.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_read.c
@@ -132,6 +132,13 @@ intel_readpixels_tiled_memcpy(struct gl_context * ctx,
if (rb->NumSamples > 1)
return false;
+ /* We can't handle copying from RGBX or BGRX because the tiled_memcpy
+ * function doesn't set the last channel to 1.
+ */
+ if (rb->Format == MESA_FORMAT_B8G8R8X8_UNORM ||
+ rb->Format == MESA_FORMAT_R8G8B8X8_UNORM)
+ return false;
+
if (!intel_get_memcpy(rb->Format, format, type, &mem_copy, &cpp))
return false;
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
index 53efbbb2f74..6eebfc4bd4b 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
@@ -392,6 +392,13 @@ intel_gettexsubimage_tiled_memcpy(struct gl_context *ctx,
packing->Invert)
return false;
+ /* We can't handle copying from RGBX or BGRX because the tiled_memcpy
+ * function doesn't set the last channel to 1.
+ */
+ if (texImage->TexFormat == MESA_FORMAT_B8G8R8X8_UNORM ||
+ texImage->TexFormat == MESA_FORMAT_R8G8B8X8_UNORM)
+ return false;
+
if (!intel_get_memcpy(texImage->TexFormat, format, type, &mem_copy, &cpp))
return false;