}
/* number of gpr == the last gpr used in any alu */
for (i = 0; i < 3; i++) {
- if (nalu->src[i].sel >= bc->ngpr && nalu->src[i].sel < 124) {
+ if (nalu->src[i].sel >= bc->ngpr && nalu->src[i].sel < 123) {
bc->ngpr = nalu->src[i].sel + 1;
}
if (nalu->src[i].sel == V_SQ_ALU_SRC_LITERAL)
r600_bytecode_special_constants(nalu->src[i].value,
&nalu->src[i].sel);
}
- if (nalu->dst.write && nalu->dst.sel >= bc->ngpr && nalu->dst.sel < 124) {
+ if (nalu->dst.write && nalu->dst.sel >= bc->ngpr && nalu->dst.sel < 123) {
bc->ngpr = nalu->dst.sel + 1;
}
list_addtail(&nalu->list, &bc->cf_last->alu);
namespace r600 {
-
+// We sacrifice 123 for dummy dests
+static const int g_registers_end = 123;
static const int g_clause_local_start = 124;
-static const int g_clause_local_end = 126;
+static const int g_clause_local_end = 128;
/* ALU op2 instructions 17:7 top three bits always zero. */
enum EAluOp {
AssamblerVisitor::copy_dst(r600_bytecode_alu_dst& dst, const Register& d, bool write)
{
if (write && d.sel() > g_clause_local_end) {
- R600_ERR("shader_from_nir: Don't support more then 124 GPRs + 2 claus "
+ R600_ERR("shader_from_nir: Don't support more then 123 GPRs + 4 clause "
"local, but try using %d\n",
d.sel());
m_result = false;
void
EncodeSourceVisitor::visit(const Register& value)
{
- assert(value.sel() < g_clause_local_end && "Only have 124 reisters + 4 clause local");
+ assert(value.sel() < g_clause_local_end && "Only have 123 reisters + 4 clause local");
}
void
if (group.priority > 0)
color = 0;
- while (color < 124) {
+ while (color < g_registers_end) {
/* Find the coloring for the first channel */
bool color_in_use = false;
int comp = start_comp;
break;
}
- if (color == 124)
+ if (color == g_registers_end)
return false;
}
int color = 0;
- while (color < 124) {
+ while (color < g_registers_end) {
bool color_in_use = false;
for (auto adj : adjecency) {
if (live_ranges[adj].m_color == color) {
r.m_color = color;
break;
}
- if (color == 124)
+ if (color == g_registers_end)
return false;
}
}
uint32_t m_nowrite_idx;
RegisterVec4 m_dummy_dest_pinned{
- 126, pin_chan, {0, 1, 2, 3}
+ g_registers_end, pin_chan, {0, 1, 2, 3}
};
ChannelCounts m_channel_counts;
uint32_t m_required_array_registers{0};