ir3: add assert to detect getting reg file of const/imm
ir3_reg_file_offset should only be called for actual registers, not for const or immediate values. However, this did happens accidentally for tracking WAR hazards in ir3_legalize. While that case has been fixed, better to prevent such cases in the future. Signed-off-by: Job Noorman <jnoorman@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30611>
This commit is contained in:
@@ -1483,6 +1483,7 @@ static inline unsigned
|
|||||||
ir3_reg_file_offset(const struct ir3_register *reg, unsigned num,
|
ir3_reg_file_offset(const struct ir3_register *reg, unsigned num,
|
||||||
bool mergedregs, enum ir3_reg_file *file)
|
bool mergedregs, enum ir3_reg_file *file)
|
||||||
{
|
{
|
||||||
|
assert(!(reg->flags & (IR3_REG_IMMED | IR3_REG_CONST)));
|
||||||
unsigned size = reg_elem_size(reg);
|
unsigned size = reg_elem_size(reg);
|
||||||
if (!is_reg_gpr(reg)) {
|
if (!is_reg_gpr(reg)) {
|
||||||
*file = IR3_FILE_NONGPR;
|
*file = IR3_FILE_NONGPR;
|
||||||
|
Reference in New Issue
Block a user