aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCourtney Goeltzenleuchter <[email protected]>2013-12-13 12:12:52 -0700
committerChad Versace <[email protected]>2013-12-30 14:57:48 -0800
commit85784fd832f34c9a8ab48a162dc82eb50f9c6d12 (patch)
treea0eeae80faf6f12984f6c87d718eb87e684cc33d
parent77c74c647be7d387d1f94e4a64ce44646a5b7ccd (diff)
i965: Add XRGB to intel_texsubimage_tiled_memcpy()
MESA_FORMAT_XRGB8888 is equivalent to MESA_FORMAT_ARGB8888 in terms of storage on the device, so okay to use this optimized copy routine. This series builds on work from Frank Henigman to optimize the process of uploading a texture to the GPU. This series adds support for MESA_XRGB_8888 and full miptrees where were found to be common activities in the Smokin' Guns game. The issue was found while profiling the app but that part is not benchmarked. Smokin-Guns uses mipmap textures with an internal format of GL_RGB (MESA_XRGB_8888 in the driver). These changes need a performance tool to run against to show how they improve execution performance for specific texture formats. Using this benchmark I've measured the following improvement on my Ivybridge Intel(R) Xeon(R) CPU E3-1225 V2 @ 3.20GHz. 1024x1024 texture size internal-format Before (MB/sec) XRGB (MB/sec) GL_RGBA 628.15 627.15 GL_RGB 265.95 456.35 512x512 texture size internal-format Before (MB/sec) XRGB (MB/sec) GL_RGBA 600.23 597.00 GL_RGB 255.50 440.62 256x256 texture size internal-format Before (MB/sec) XRGB (MB/sec) GL_RGBA 489.08 487.80 GL_RGB 229.03 376.63 Benchmark has been sent to mesa-dev list: teximage Signed-off-by: Courtney Goeltzenleuchter <[email protected]> Reviewed-by: Chad Versace <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/intel_tex_subimage.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
index a72d31304d7..f7adfef1a86 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
@@ -577,7 +577,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;