Mesa (master): glhd: Grab is_format_supported warning from r300g.

Corbin Simpson csimpson at kemper.freedesktop.org
Wed Jun 23 00:12:50 PDT 2010


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

Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date:   Tue Jun 22 22:39:53 2010 -0700

glhd: Grab is_format_supported warning from r300g.

---

 src/gallium/drivers/galahad/glhd_screen.c |    4 ++++
 src/gallium/drivers/r300/r300_screen.c    |    6 ------
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/galahad/glhd_screen.c b/src/gallium/drivers/galahad/glhd_screen.c
index 33cf9d2..bcc37cb 100644
--- a/src/gallium/drivers/galahad/glhd_screen.c
+++ b/src/gallium/drivers/galahad/glhd_screen.c
@@ -99,6 +99,10 @@ galahad_screen_is_format_supported(struct pipe_screen *_screen,
    struct galahad_screen *glhd_screen = galahad_screen(_screen);
    struct pipe_screen *screen = glhd_screen->screen;
 
+   if (target >= PIPE_MAX_TEXTURE_TYPES) {
+      glhd_warn("Received bogus texture target %d", target);
+   }
+
    return screen->is_format_supported(screen,
                                       format,
                                       target,
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 8f7c96b..d3d36a7 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -269,12 +269,6 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
                             format == PIPE_FORMAT_R16G16B16_FLOAT ||
                             format == PIPE_FORMAT_R16G16B16A16_FLOAT;
 
-    if (target >= PIPE_MAX_TEXTURE_TYPES) {
-        fprintf(stderr, "r300: Implementation error: Received bogus texture "
-            "target %d in %s\n", target, __FUNCTION__);
-        return FALSE;
-    }
-
     switch (sample_count) {
         case 0:
         case 1:



More information about the mesa-commit mailing list