panfrost: Add UBO push data structure
Will be used to generalize RMU on Midgard and also to support Bifrost's FAU (which is essentially the same thing). Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973>
This commit is contained in:
parent
ed810eb0a0
commit
d4dccea0ba
|
@ -78,6 +78,25 @@ struct panfrost_sysvals {
|
|||
struct hash_table_u64 *sysval_to_id;
|
||||
};
|
||||
|
||||
/* Technically Midgard could go up to 92 in a pathological case but we don't
|
||||
* take advantage of that. Likewise Bifrost's FAU encoding can address 128
|
||||
* words but actual implementations (G72, G76) are capped at 64 */
|
||||
|
||||
#define PAN_MAX_PUSH 64
|
||||
|
||||
/* Architectural invariants (Midgard and Bifrost): UBO must be <= 2^16 bytes so
|
||||
* an offset to a word must be < 2^16. There are less than 2^8 UBOs */
|
||||
|
||||
struct panfrost_ubo_word {
|
||||
uint16_t ubo;
|
||||
uint16_t offset;
|
||||
};
|
||||
|
||||
struct panfrost_ubo_push {
|
||||
unsigned count;
|
||||
struct panfrost_ubo_word words[PAN_MAX_PUSH];
|
||||
};
|
||||
|
||||
void
|
||||
panfrost_nir_assign_sysvals(struct panfrost_sysvals *ctx, void *memctx, nir_shader *shader);
|
||||
|
||||
|
@ -100,6 +119,10 @@ typedef struct {
|
|||
unsigned sysval_count;
|
||||
unsigned sysvals[MAX_SYSVAL_COUNT];
|
||||
|
||||
/* UBOs to push to Register Mapped Uniforms (Midgard) or Fast Access
|
||||
* Uniforms (Bifrost) */
|
||||
struct panfrost_ubo_push push;
|
||||
|
||||
int first_tag;
|
||||
|
||||
struct util_dynarray compiled;
|
||||
|
|
Loading…
Reference in New Issue