radeonsi: add an environment variable that forces EQAA for MSAA allocations
[mesa.git] / src / gallium / drivers / radeonsi / si_state.c
index e133bf28589361960a902abb9841f41f6aa76cf8..c7585b285e92b77d8f4a7c86ce892e798a479f11 100644 (file)
@@ -2119,6 +2119,7 @@ static boolean si_is_format_supported(struct pipe_screen *screen,
                                      unsigned sample_count,
                                      unsigned usage)
 {
+       struct si_screen *sscreen = (struct si_screen *)screen;
        unsigned retval = 0;
 
        if (target >= PIPE_MAX_TEXTURE_TYPES) {
@@ -2142,6 +2143,10 @@ static boolean si_is_format_supported(struct pipe_screen *screen,
                case 8:
                        break;
                case 16:
+                       /* Allow resource_copy_region with nr_samples == 16. */
+                       if (sscreen->eqaa_force_coverage_samples == 16 &&
+                           !util_format_is_depth_or_stencil(format))
+                               return true;
                        if (format == PIPE_FORMAT_NONE)
                                return true;
                        else