v3dv: emit TILE_BINNING_MODE_CFG and TILE_RENDERING_MODE_CFG_COMMON for v71
authorAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 20 Jul 2021 12:00:44 +0000 (14:00 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 13 Oct 2023 22:37:42 +0000 (22:37 +0000)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

src/broadcom/vulkan/v3dvx_cmd_buffer.c
src/broadcom/vulkan/v3dvx_meta_common.c

index b958e63..7837b46 100644 (file)
@@ -94,7 +94,14 @@ v3dX(job_emit_binning_prolog)(struct v3dv_job *job,
       config.maximum_bpp_of_all_render_targets = tiling->internal_bpp;
 #endif
 #if V3D_VERSION >= 71
-      unreachable("HW generation 71 not supported yet.");
+      config.log2_tile_width = log2_tile_size(tiling->tile_width);
+      config.log2_tile_height = log2_tile_size(tiling->tile_height);
+      /* FIXME: ideally we would like next assert on the packet header (as is
+       * general, so also applies to GL). We would need to expand
+       * gen_pack_header for that.
+       */
+      assert(config.log2_tile_width == config.log2_tile_height ||
+             config.log2_tile_width == config.log2_tile_height + 1);
 #endif
    }
 
@@ -843,7 +850,14 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)
       config.maximum_bpp_of_all_render_targets = tiling->internal_bpp;
 #endif
 #if V3D_VERSION >= 71
-      unreachable("HW generation 71 not supported yet.");
+      config.log2_tile_width = log2_tile_size(tiling->tile_width);
+      config.log2_tile_height = log2_tile_size(tiling->tile_height);
+      /* FIXME: ideallly we would like next assert on the packet header (as is
+       * general, so also applies to GL). We would need to expand
+       * gen_pack_header for that.
+       */
+      assert(config.log2_tile_width == config.log2_tile_height ||
+             config.log2_tile_width == config.log2_tile_height + 1);
 #endif
 
       if (ds_attachment_idx != VK_ATTACHMENT_UNUSED) {
index 2db07ea..e4084d8 100644 (file)
@@ -62,7 +62,14 @@ emit_rcl_prologue(struct v3dv_job *job,
       config.maximum_bpp_of_all_render_targets = tiling->internal_bpp;
 #endif
 #if V3D_VERSION >= 71
-      unreachable("Hardware generation 71 not supported yet.");
+      config.log2_tile_width = log2_tile_size(tiling->tile_width);
+      config.log2_tile_height = log2_tile_size(tiling->tile_height);
+      /* FIXME: ideallly we would like next assert on the packet header (as is
+       * general, so also applies to GL). We would need to expand
+       * gen_pack_header for that.
+       */
+      assert(config.log2_tile_width == config.log2_tile_height ||
+             config.log2_tile_width == config.log2_tile_height + 1);
 #endif
       config.internal_depth_type = fb->internal_depth_type;
    }