pan/bi: Add pcrel_idx to bi_clause

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/8354>
This commit is contained in:
Alyssa Rosenzweig 2021-02-05 18:16:45 -05:00 committed by Marge Bot
parent 649e45234f
commit 2096359cf9
2 changed files with 6 additions and 0 deletions

View file

@ -101,6 +101,9 @@ bi_print_clause(bi_clause *clause, FILE *fp)
if (clause->staging_barrier)
fprintf(fp, " osrb");
if (clause->pcrel_idx != ~0)
fprintf(fp, " pcrel(%u)", clause->pcrel_idx);
fprintf(fp, "\n");
for (unsigned i = 0; i < clause->tuple_count; ++i)

View file

@ -455,6 +455,9 @@ typedef struct {
uint64_t constants[8];
unsigned constant_count;
/* Index of a constant to be PC-relative */
unsigned pcrel_idx;
/* Branches encode a constant offset relative to the program counter
* with some magic flags. By convention, if there is a branch, its
* constant will be last. Set this flag to indicate this is required.