[Mesa-dev] [PATCH 1/2] i965: add XRGB to tiled_memcpy
Courtney Goeltzenleuchter
courtney at lunarg.com
Thu Nov 7 13:22:29 PST 2013
MESA_FORMAT_XRGB8888 is equivalent to MESA_FORMAT_ARGB8888 in terms
of storage on the device, so okay to use this optimized copy routine.
Signed-off-by: Courtney Goeltzenleuchter <courtney at LunarG.com>
---
src/mesa/drivers/dri/i965/intel_tex_subimage.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
index 0384bcc..b1826fa 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
@@ -571,7 +571,8 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
(texImage->TexFormat == MESA_FORMAT_A8 && format == GL_ALPHA)) {
cpp = 1;
mem_copy = memcpy;
- } else if (texImage->TexFormat == MESA_FORMAT_ARGB8888) {
+ } else if ((texImage->TexFormat == MESA_FORMAT_ARGB8888)
+ || (texImage->TexFormat == MESA_FORMAT_XRGB8888)) {
cpp = 4;
if (format == GL_BGRA) {
mem_copy = memcpy;
--
1.8.1.2
More information about the mesa-dev
mailing list