v3d: emit TILE_BINNING_MODE_CFG and TILE_RENDERING_MODE_CFG_COMMON for v71

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
This commit is contained in:
Alejandro Piñeiro 2021-10-20 14:31:10 +02:00 committed by Marge Bot
parent 4dfe17a762
commit da11be4bdf
2 changed files with 26 additions and 3 deletions

View 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

View 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
}