summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2014-07-17 14:40:23 -0700
committerJason Ekstrand <[email protected]>2014-07-17 18:20:09 -0700
commitf14d217f5c72651b9f24a83b11ace16837db4603 (patch)
tree830dbef4170ca1214501e110f12621a5f1c3fe08 /src/mesa/drivers/dri/i965
parent765f4b8c046dc01f7141097e9335360f2ad6a24f (diff)
Add support for RGBA8 and RGBX8 textures in intel_texsubimage_tiled_memcpy
Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/intel_tex_subimage.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
index 04cbc4c5aee..c73cf10f588 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
@@ -585,6 +585,17 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
} else if (format == GL_RGBA) {
mem_copy = rgba8_copy;
}
+ } else if ((texImage->TexFormat == MESA_FORMAT_R8G8B8A8_UNORM) ||
+ (texImage->TexFormat == MESA_FORMAT_R8G8B8X8_UNORM)) {
+ cpp = 4;
+ if (format == GL_BGRA) {
+ /* Copying from RGBA to BGRA is the same as BGRA to RGBA so we can
+ * use the same function.
+ */
+ mem_copy = rgba8_copy;
+ } else if (format == GL_RGBA) {
+ mem_copy = memcpy;
+ }
}
if (!mem_copy)
return false;