radeon: reverse DBG_NO_HYPERZ logic
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 12 Feb 2014 17:00:17 +0000 (12:00 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 14 Feb 2014 01:55:54 +0000 (20:55 -0500)
Change the flag to DBG_HYPERZ and reverse the logic
so setting the flag enabled the feature.  This disables
hyperz on r600g and radeonsi by default.  It can be
enabled by setting the env var.  There are just too
many issues with certain apps so leave it disabled for
now until we sort out the issues with the problematic
apps.

Bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=58660
https://bugs.freedesktop.org/show_bug.cgi?id=64471
https://bugs.freedesktop.org/show_bug.cgi?id=66352
https://bugs.freedesktop.org/show_bug.cgi?id=68799
https://bugs.freedesktop.org/show_bug.cgi?id=72685
https://bugs.freedesktop.org/show_bug.cgi?id=73088
https://bugs.freedesktop.org/show_bug.cgi?id=74428
https://bugs.freedesktop.org/show_bug.cgi?id=74803
https://bugs.freedesktop.org/show_bug.cgi?id=74863
https://bugs.freedesktop.org/show_bug.cgi?id=74892
https://bugzilla.kernel.org/show_bug.cgi?id=70411

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: "10.1" "10.0" <mesa-stable@lists.freedesktop.org>
Acked-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/radeon/r600_pipe_common.h
src/gallium/drivers/radeon/r600_texture.c

index 796f0f5066af34264c69c4ecb4d06cf56eb7f89d..8ea192ac405e08cb5a9bb8076db495b4848020c5 100644 (file)
@@ -584,8 +584,8 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws)
                rscreen->b.debug_flags |= DBG_COMPUTE;
        if (debug_get_bool_option("R600_DUMP_SHADERS", FALSE))
                rscreen->b.debug_flags |= DBG_FS | DBG_VS | DBG_GS | DBG_PS | DBG_CS;
-       if (!debug_get_bool_option("R600_HYPERZ", TRUE))
-               rscreen->b.debug_flags |= DBG_NO_HYPERZ;
+       if (debug_get_bool_option("R600_HYPERZ", FALSE))
+               rscreen->b.debug_flags |= DBG_HYPERZ;
        if (!debug_get_bool_option("R600_LLVM", TRUE))
                rscreen->b.debug_flags |= DBG_NO_LLVM;
 
index 7af8124eb345dcba07a9472f99bf90070204c74c..dbca157f04a5d9b76f97c1b873c720c5d1736e92 100644 (file)
@@ -137,7 +137,7 @@ static const struct debug_named_value common_debug_options[] = {
        { "ps", DBG_PS, "Print pixel shaders" },
        { "cs", DBG_CS, "Print compute shaders" },
 
-       { "nohyperz", DBG_NO_HYPERZ, "Disable Hyper-Z" },
+       { "hyperz", DBG_HYPERZ, "Enable Hyper-Z" },
        /* GL uses the word INVALIDATE, gallium uses the word DISCARD */
        { "noinvalrange", DBG_NO_DISCARD_RANGE, "Disable handling of INVALIDATE_RANGE map flags" },
 
index 7193a0f156e3e6728dbc2dd4975a13d4f7ef8f2d..2fbc6a3907a50a0ba4fcde02ac5b91a8257414b1 100644 (file)
@@ -83,7 +83,7 @@
 #define DBG_PS                 (1 << 11)
 #define DBG_CS                 (1 << 12)
 /* features */
-#define DBG_NO_HYPERZ          (1 << 13)
+#define DBG_HYPERZ             (1 << 13)
 #define DBG_NO_DISCARD_RANGE   (1 << 14)
 /* The maximum allowed bit is 15. */
 
index 356e0af35b74602fc27c1cd0b97c0594eea079a7..2cfab512357944a954657d449cc08702bb795072 100644 (file)
@@ -596,7 +596,7 @@ r600_texture_create_object(struct pipe_screen *screen,
        if (rtex->is_depth) {
                if (!(base->flags & (R600_RESOURCE_FLAG_TRANSFER |
                                     R600_RESOURCE_FLAG_FLUSHED_DEPTH)) &&
-                   !(rscreen->debug_flags & DBG_NO_HYPERZ)) {
+                   (rscreen->debug_flags & DBG_HYPERZ)) {
 
                        r600_texture_allocate_htile(rscreen, rtex);
                }