mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 03:38:06 +02:00
pan/bi: Add special indices
For fixed registers, uniforms, and constants, which bypass the usual SSA mechanism to map well to the ISA. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>
This commit is contained in:
parent
c42002d26f
commit
a2c1265dd3
1 changed files with 19 additions and 0 deletions
|
|
@ -202,6 +202,25 @@ typedef struct {
|
|||
#define BIR_NO_ARG (0)
|
||||
#define BIR_IS_REG (1)
|
||||
|
||||
/* If high bits are set, instead of SSA/registers, we have specials indexed by
|
||||
* the low bits if necessary.
|
||||
*
|
||||
* Fixed register: do not allocate register, do not collect $200.
|
||||
* Uniform: access a uniform register given by low bits.
|
||||
* Constant: access the specified constant
|
||||
* Zero: special cased to avoid wasting a constant
|
||||
*/
|
||||
|
||||
#define BIR_INDEX_REGISTER (1 << 31)
|
||||
#define BIR_INDEX_UNIFORM (1 << 30)
|
||||
#define BIR_INDEX_CONSTANT (1 << 29)
|
||||
#define BIR_INDEX_ZERO (1 << 28)
|
||||
|
||||
/* Keep me synced please so we can check src & BIR_SPECIAL */
|
||||
|
||||
#define BIR_SPECIAL ((BIR_INDEX_REGISTER | BIR_INDEX_UNIFORM) | \
|
||||
(BIR_INDEX_CONSTANT | BIR_INDEX_ZERO)
|
||||
|
||||
static inline unsigned
|
||||
bir_ssa_index(nir_ssa_def *ssa)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue