Mesa (master): r300g: fix resource_copy_region for DXT SRGB formats

Marek Olšák mareko at kemper.freedesktop.org
Fri Jan 28 16:18:32 UTC 2011


Module: Mesa
Branch: master
Commit: 0029979eee6ef537592c7bb6b6005fa2ef0729da
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0029979eee6ef537592c7bb6b6005fa2ef0729da

Author: Marek Olšák <maraeo at gmail.com>
Date:   Fri Jan 28 17:15:22 2011 +0100

r300g: fix resource_copy_region for DXT SRGB formats

---

 src/gallium/drivers/r300/r300_blit.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index d0eb21c..69f8115 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -426,13 +426,13 @@ static void r300_resource_copy_region(struct pipe_context *pipe,
         }
     }
 
-    if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB ||
-        (!pipe->screen->is_format_supported(pipe->screen,
+    if (desc->layout == UTIL_FORMAT_LAYOUT_PLAIN &&
+        (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB ||
+         !pipe->screen->is_format_supported(pipe->screen,
                                             old_format, src->target,
                                             src->nr_samples,
                                             PIPE_BIND_RENDER_TARGET |
-                                            PIPE_BIND_SAMPLER_VIEW, 0) &&
-         desc->layout == UTIL_FORMAT_LAYOUT_PLAIN)) {
+                                            PIPE_BIND_SAMPLER_VIEW, 0))) {
         switch (util_format_get_blocksize(old_format)) {
             case 1:
                 new_format = PIPE_FORMAT_I8_UNORM;




More information about the mesa-commit mailing list