etnaviv: rs: add support for 64bpp clears
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Tue, 16 Jul 2019 18:14:00 +0000 (20:14 +0200)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Mon, 19 Aug 2019 20:36:45 +0000 (22:36 +0200)
Starting with HALTI2 the RS supports 64bpp clears.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Philipp Zabel <philipp.zabel@gmail.com>
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
src/gallium/drivers/etnaviv/etnaviv_rs.c

index 0979607cdc24926f2571d75160930b635b1e70c8..0ac9b67f5f3091286cef5f125efb5bf8af21734d 100644 (file)
@@ -262,17 +262,15 @@ etna_rs_gen_clear_surface(struct etna_context *ctx, struct etna_surface *surf,
    case 32:
       format = RS_FORMAT_A8R8G8B8;
       break;
+   case 64:
+      assert(ctx->specs.halti >= 2);
+      format = RS_FORMAT_64BPP_CLEAR;
+      break;
    default:
-      format = ETNA_NO_MATCH;
+      unreachable("bpp not supported for clear by RS");
       break;
    }
 
-   if (format == ETNA_NO_MATCH) {
-      BUG("etna_rs_gen_clear_surface: Unhandled clear fmt %s", util_format_name(surf->base.format));
-      format = RS_FORMAT_A8R8G8B8;
-      assert(0);
-   }
-
    /* use tiled clear if width is multiple of 16 */
    bool tiled_clear = (surf->surf.padded_width & ETNA_RS_WIDTH_MASK) == 0 &&
                       (surf->surf.padded_height & ETNA_RS_HEIGHT_MASK) == 0;