mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 00:49:04 +02:00
pan/bi: Constify BIR manipulation
For use in Valhall packing. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026>
This commit is contained in:
parent
0149dee377
commit
e6fdbb85bc
3 changed files with 11 additions and 11 deletions
|
|
@ -154,7 +154,7 @@ bi_${mod}_as_str(enum bi_${mod} ${mod})
|
|||
</%def>
|
||||
|
||||
void
|
||||
bi_print_instr(bi_instr *I, FILE *fp)
|
||||
bi_print_instr(const bi_instr *I, FILE *fp)
|
||||
{
|
||||
bi_foreach_dest(I, d) {
|
||||
if (bi_is_null(I->dest[d])) break;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include "compiler.h"
|
||||
|
||||
bool
|
||||
bi_has_arg(bi_instr *ins, bi_index arg)
|
||||
bi_has_arg(const bi_instr *ins, bi_index arg)
|
||||
{
|
||||
if (!ins)
|
||||
return false;
|
||||
|
|
@ -63,7 +63,7 @@ bi_is_regfmt_16(enum bi_register_format fmt)
|
|||
}
|
||||
|
||||
static unsigned
|
||||
bi_count_staging_registers(bi_instr *ins)
|
||||
bi_count_staging_registers(const bi_instr *ins)
|
||||
{
|
||||
enum bi_sr_count count = bi_opcode_props[ins->op].sr_count;
|
||||
unsigned vecsize = ins->vecsize + 1; /* XXX: off-by-one */
|
||||
|
|
@ -84,7 +84,7 @@ bi_count_staging_registers(bi_instr *ins)
|
|||
}
|
||||
|
||||
unsigned
|
||||
bi_count_read_registers(bi_instr *ins, unsigned s)
|
||||
bi_count_read_registers(const bi_instr *ins, unsigned s)
|
||||
{
|
||||
if (s == 0 && bi_opcode_props[ins->op].sr_read)
|
||||
return bi_count_staging_registers(ins);
|
||||
|
|
@ -93,7 +93,7 @@ bi_count_read_registers(bi_instr *ins, unsigned s)
|
|||
}
|
||||
|
||||
unsigned
|
||||
bi_count_write_registers(bi_instr *ins, unsigned d)
|
||||
bi_count_write_registers(const bi_instr *ins, unsigned d)
|
||||
{
|
||||
if (d == 0 && bi_opcode_props[ins->op].sr_write) {
|
||||
/* TODO: this special case is even more special, TEXC has a
|
||||
|
|
@ -108,7 +108,7 @@ bi_count_write_registers(bi_instr *ins, unsigned d)
|
|||
}
|
||||
|
||||
unsigned
|
||||
bi_writemask(bi_instr *ins, unsigned d)
|
||||
bi_writemask(const bi_instr *ins, unsigned d)
|
||||
{
|
||||
unsigned mask = BITFIELD_MASK(bi_count_write_registers(ins, d));
|
||||
unsigned shift = ins->dest[d].offset;
|
||||
|
|
|
|||
|
|
@ -796,15 +796,15 @@ bi_next_block(bi_block *block)
|
|||
|
||||
/* BIR manipulation */
|
||||
|
||||
bool bi_has_arg(bi_instr *ins, bi_index arg);
|
||||
unsigned bi_count_read_registers(bi_instr *ins, unsigned src);
|
||||
unsigned bi_count_write_registers(bi_instr *ins, unsigned dest);
|
||||
bool bi_has_arg(const bi_instr *ins, bi_index arg);
|
||||
unsigned bi_count_read_registers(const bi_instr *ins, unsigned src);
|
||||
unsigned bi_count_write_registers(const bi_instr *ins, unsigned dest);
|
||||
bool bi_is_regfmt_16(enum bi_register_format fmt);
|
||||
unsigned bi_writemask(bi_instr *ins, unsigned dest);
|
||||
unsigned bi_writemask(const bi_instr *ins, unsigned dest);
|
||||
bi_clause * bi_next_clause(bi_context *ctx, bi_block *block, bi_clause *clause);
|
||||
bool bi_side_effects(enum bi_opcode op);
|
||||
|
||||
void bi_print_instr(bi_instr *I, FILE *fp);
|
||||
void bi_print_instr(const bi_instr *I, FILE *fp);
|
||||
void bi_print_slots(bi_registers *regs, FILE *fp);
|
||||
void bi_print_tuple(bi_tuple *tuple, FILE *fp);
|
||||
void bi_print_clause(bi_clause *clause, FILE *fp);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue