mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 13:50:11 +01:00
brw: Add brw_reg::is_grf
v2: Add a function comment. Suggested by Caio. Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38315>
This commit is contained in:
parent
fa8b0b6bbb
commit
c0fb93506b
2 changed files with 12 additions and 2 deletions
|
|
@ -704,8 +704,7 @@ try_copy_propagate(brw_shader &s, brw_inst *inst,
|
||||||
|
|
||||||
const struct intel_device_info *devinfo = s.devinfo;
|
const struct intel_device_info *devinfo = s.devinfo;
|
||||||
|
|
||||||
assert(entry->src.file == VGRF || entry->src.file == UNIFORM ||
|
assert(entry->src.is_grf());
|
||||||
entry->src.file == ATTR || entry->src.file == FIXED_GRF);
|
|
||||||
|
|
||||||
/* Avoid propagating a LOAD_PAYLOAD instruction into another if there is a
|
/* Avoid propagating a LOAD_PAYLOAD instruction into another if there is a
|
||||||
* good chance that we'll be able to eliminate the latter through register
|
* good chance that we'll be able to eliminate the latter through register
|
||||||
|
|
|
||||||
|
|
@ -233,6 +233,17 @@ typedef struct brw_reg {
|
||||||
bool is_ip() const { return brw_reg_is_arf(*this, BRW_ARF_IP); }
|
bool is_ip() const { return brw_reg_is_arf(*this, BRW_ARF_IP); }
|
||||||
bool is_address() const;
|
bool is_address() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* These are all the things that will eventually become FIXED_GRF. The
|
||||||
|
* things that will live in regular registers can, for the most part, be
|
||||||
|
* treated the same by optimization passes.
|
||||||
|
*/
|
||||||
|
bool is_grf() const
|
||||||
|
{
|
||||||
|
return file == FIXED_GRF || file == VGRF || file == ATTR ||
|
||||||
|
file == UNIFORM;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned address_slot(unsigned byte_offset) const;
|
unsigned address_slot(unsigned byte_offset) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue