r600g: do not require MSAA renderbuffer support if not asked for
authorMarek Olšák <maraeo@gmail.com>
Sat, 8 Sep 2012 13:50:30 +0000 (15:50 +0200)
committerMarek Olšák <maraeo@gmail.com>
Fri, 14 Sep 2012 03:55:00 +0000 (05:55 +0200)
to allow stencil-only sampler-only formats (like X24S8)

NOTE: This is a candidate for the stable branches.

src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_state.c

index 8235c719f6b720615e14af6286a039346efa643d..816e7df414577158e7841caabd612343af7bf0a5 100644 (file)
@@ -643,13 +643,6 @@ boolean evergreen_is_format_supported(struct pipe_screen *screen,
                default:
                        return FALSE;
                }
-
-               /* require render-target support for multisample resources */
-               if (util_format_is_depth_or_stencil(format)) {
-                       usage |= PIPE_BIND_DEPTH_STENCIL;
-               } else {
-                       usage |= PIPE_BIND_RENDER_TARGET;
-               }
        }
 
        if ((usage & PIPE_BIND_SAMPLER_VIEW) &&
index e299a8bd208daaec5ba5bfb8cda3232025b0ce88..e092cf498089e2cb5cf71e29c6a56ae02af8873b 100644 (file)
@@ -592,6 +592,10 @@ boolean r600_is_format_supported(struct pipe_screen *screen,
                    format == PIPE_FORMAT_R11G11B10_FLOAT)
                        return FALSE;
 
+               /* MSAA integer colorbuffers hang. */
+               if (util_format_is_pure_integer(format))
+                       return FALSE;
+
                switch (sample_count) {
                case 2:
                case 4:
@@ -600,15 +604,6 @@ boolean r600_is_format_supported(struct pipe_screen *screen,
                default:
                        return FALSE;
                }
-
-               /* require render-target support for multisample resources */
-               if (util_format_is_depth_or_stencil(format)) {
-                       usage |= PIPE_BIND_DEPTH_STENCIL;
-               } else if (util_format_is_pure_integer(format)) {
-                       return FALSE; /* no integer textures */
-               } else {
-                       usage |= PIPE_BIND_RENDER_TARGET;
-               }
        }
 
        if ((usage & PIPE_BIND_SAMPLER_VIEW) &&