mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-23 23:48:18 +02:00
panvk/csf: Allow 256 layers per tiler descriptor on v14+
v14+ supports up to 256 layers in a single tiler descriptor. This comes with the limitation that only one tiler descriptor is allowed per render pass. Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41640>
This commit is contained in:
parent
860a416b2d
commit
5bbde670dd
4 changed files with 18 additions and 1 deletions
|
|
@ -34,7 +34,11 @@ struct panvk_sync_scope {
|
|||
|
||||
#define MAX_VBS 16
|
||||
#define MAX_RTS 8
|
||||
#if PAN_ARCH >= 14
|
||||
#define MAX_LAYERS_PER_TILER_DESC 256
|
||||
#else
|
||||
#define MAX_LAYERS_PER_TILER_DESC 8
|
||||
#endif
|
||||
|
||||
struct panvk_cs_sync32 {
|
||||
uint32_t seqno;
|
||||
|
|
|
|||
|
|
@ -942,6 +942,18 @@ calc_render_descs_size(struct panvk_cmd_buffer *cmdbuf)
|
|||
uint32_t td_count = DIV_ROUND_UP(cmdbuf->state.gfx.render.layer_count,
|
||||
MAX_LAYERS_PER_TILER_DESC);
|
||||
|
||||
/* v14+ supports a maximum of one tiler descriptor.
|
||||
* This should be enough since the driver reports maxFramebufferLayers
|
||||
* and maxMultiviewViewCount lower or equal to MAX_LAYERS_PER_TILER_DESC. */
|
||||
assert(PAN_ARCH < 14 || td_count <= 1);
|
||||
static_assert(
|
||||
PAN_ARCH < 14 || MAX_FRAMEBUFFER_LAYERS <= MAX_LAYERS_PER_TILER_DESC,
|
||||
"MAX_FRAMEBUFFER_LAYERS must be <= max amount of layers a Tiler descriptor can index");
|
||||
static_assert(
|
||||
PAN_ARCH < 14 ||
|
||||
PAN_MAX_MULTIVIEW_VIEW_COUNT <= MAX_LAYERS_PER_TILER_DESC,
|
||||
"PAN_MAX_MULTIVIEW_VIEW_COUNT must be <= max amount of layers a Tiler descriptor can index");
|
||||
|
||||
return (calc_fbd_size(cmdbuf) * fbd_count) +
|
||||
(td_count * pan_size(TILER_CONTEXT));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#include "pan_props.h"
|
||||
|
||||
#define MAX_VBS 16
|
||||
#define MAX_FRAMEBUFFER_LAYERS 256
|
||||
|
||||
struct panvk_cmd_buffer;
|
||||
|
||||
|
|
|
|||
|
|
@ -918,7 +918,7 @@ panvk_per_arch(get_physical_device_properties)(
|
|||
.subPixelInterpolationOffsetBits = 8,
|
||||
.maxFramebufferWidth = (1 << 14),
|
||||
.maxFramebufferHeight = (1 << 14),
|
||||
.maxFramebufferLayers = 256,
|
||||
.maxFramebufferLayers = MAX_FRAMEBUFFER_LAYERS,
|
||||
.framebufferColorSampleCounts = sample_counts,
|
||||
.framebufferDepthSampleCounts = sample_counts,
|
||||
.framebufferStencilSampleCounts = sample_counts,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue