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

src/gallium/drivers/v3d/v3dx_draw.c
src/gallium/drivers/v3d/v3dx_rcl.c

index b63ac83..c90fa5a 100644 (file)
@@ -96,7 +96,21 @@ v3dX(start_binning)(struct v3d_context *v3d, struct v3d_job *job)
 
         assert(!job->msaa || !job->double_buffer);
 #if V3D_VERSION >= 71
-        unreachable("HW generation 71 not supported yet.");
+        cl_emit(&job->bcl, TILE_BINNING_MODE_CFG, config) {
+                config.width_in_pixels = job->draw_width;
+                config.height_in_pixels = job->draw_height;
+
+                config.log2_tile_width = log2_tile_size(job->tile_width);
+                config.log2_tile_height = log2_tile_size(job->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 V3D_VERSION >= 40 && V3D_VERSION <= 42
index 88a453a..fbec1a0 100644 (file)
@@ -24,8 +24,9 @@
 #include "util/format/u_format.h"
 #include "util/macros.h"
 #include "v3d_context.h"
-#include "broadcom/common/v3d_tiling.h"
 #include "broadcom/common/v3d_macros.h"
+#include "broadcom/common/v3d_tiling.h"
+#include "broadcom/common/v3d_util.h"
 #include "broadcom/cle/v3dx_pack.h"
 
 #define PIPE_CLEAR_COLOR_BUFFERS (PIPE_CLEAR_COLOR0 |                   \
@@ -789,7 +790,15 @@ v3dX(emit_rcl)(struct v3d_job *job)
                 config.maximum_bpp_of_all_render_targets = job->internal_bpp;
 #endif
 #if V3D_VERSION >= 71
-                unreachable("HW generation 71 not supported yet.");
+                config.log2_tile_width = log2_tile_size(job->tile_width);
+                config.log2_tile_height = log2_tile_size(job->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
 
         }