v3d/v3dv: drop manual log2_tile_width/height asserts.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Move the log2_tile_width/height asserts to pack header functions.

Reviewed-by: Iago Toral Quiroga itoral@igalia.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40108>
This commit is contained in:
Daivik Bhatia 2026-02-26 06:15:36 +05:30 committed by Marge Bot
parent 4a5123241f
commit bb02e4bc5c
5 changed files with 5 additions and 32 deletions

View file

@ -522,6 +522,11 @@ class Parser(object):
print("static inline void\n%s_pack(__gen_user_data *data, uint8_t * restrict cl,\n%sconst struct %s * restrict values)\n{" %
(name, ' ' * (len(name) + 6), name))
if name in ("V3D71_TILE_BINNING_MODE_CFG",
"V3D71_TILE_RENDERING_MODE_CFG_COMMON"):
print(" assert(values->log2_tile_width == values->log2_tile_height ||")
print(" values->log2_tile_width == values->log2_tile_height + 1);")
group.emit_pack_function(0)
print("}\n")

View file

@ -97,12 +97,6 @@ v3dX(job_emit_binning_prolog)(struct v3dv_job *job,
#if V3D_VERSION >= 71
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
}
@ -977,12 +971,6 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)
#if V3D_VERSION >= 71
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) {

View file

@ -65,12 +65,6 @@ emit_rcl_prologue(struct v3dv_job *job,
#if V3D_VERSION >= 71
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;
}

View file

@ -74,13 +74,6 @@ v3dX(start_binning)(struct v3d_context *v3d, struct v3d_job *job)
config.log2_tile_width = log2_tile_size(job->tile_desc.width);
config.log2_tile_height = log2_tile_size(job->tile_desc.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

View file

@ -769,13 +769,6 @@ v3dX(emit_rcl)(struct v3d_job *job)
#if V3D_VERSION >= 71
config.log2_tile_width = log2_tile_size(job->tile_desc.width);
config.log2_tile_height = log2_tile_size(job->tile_desc.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
}