mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
pan/desc: Add layer_offset field to pan_tiler_context::valhall
Compared to Bifrost, Valhall slightly improved layered rendering in
that you no longer need one IDVS job per layer. But they didn't quite
unleash things, because tiler descriptors still have a limited amount
of layers they can deal with, forcing us to emit more than one IDVS/tiler
descriptor per draw call if the number of layer exceeds this limit.
In order to specify where the starting point, a
{layer_offset,internal_layer_index} field has been added, so we need to
extend pan_tiler_context to pass this information and let the common
logic adjust the framebuffer internal_layer_index accordingly.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Tested-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31227>
This commit is contained in:
parent
6224a1e4d1
commit
8822f5949c
2 changed files with 7 additions and 1 deletions
|
|
@ -823,7 +823,8 @@ GENX(pan_emit_fbd)(const struct pan_fb_info *fb, unsigned layer_idx,
|
|||
* layer_idx only takes 8-bits, we might use the extra 56-bits we have
|
||||
* in frame_argument to pass other information to the fragment shader at
|
||||
* some point. */
|
||||
cfg.internal_layer_index = layer_idx;
|
||||
assert(layer_idx >= tiler_ctx->valhall.layer_offset);
|
||||
cfg.internal_layer_index = layer_idx - tiler_ctx->valhall.layer_offset;
|
||||
cfg.frame_argument = layer_idx;
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,6 +72,11 @@ struct pan_tiler_context {
|
|||
union {
|
||||
struct {
|
||||
mali_ptr desc;
|
||||
/* A tiler descriptor can only handle a limited amount of layers.
|
||||
* If the number of layers is bigger than this, several tiler
|
||||
* descriptors will be issued, each with a different layer_offset.
|
||||
*/
|
||||
uint8_t layer_offset;
|
||||
} valhall;
|
||||
struct {
|
||||
mali_ptr desc;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue