return m_proc.lookup_register_index(dst);
}
-PValue EmitInstruction::get_temp_register(int channel)
+PGPRValue EmitInstruction::get_temp_register(int channel)
{
return m_proc.get_temp_register(channel);
}
int allocate_temp_register();
- PValue get_temp_register(int channel = -1);
+ PGPRValue get_temp_register(int channel = -1);
GPRVector get_temp_vec4();
// forwards from ShaderFromNirProcessor
#include "sfn_emitinstruction.h"
#include "sfn_instruction_gds.h"
+#include "sfn_value_gpr.h"
namespace r600 {
GPRVector make_dest(const nir_intrinsic_instr* instr);
- PValue m_atomic_update;
+ PGPRValue m_atomic_update;
bool m_require_rat_return_address;
GPRVector m_rat_return_address;
bool m_keep_alive;
};
+using PGPRValue = std::shared_ptr<GPRValue>;
+
class GPRVector : public Value {
public:
using Swizzle = std::array<uint32_t,4>;
return from_nir(v.src, component, v.swizzle[component]);
}
-PValue ValuePool::get_temp_register(int channel)
+PGPRValue ValuePool::get_temp_register(int channel)
{
/* Skip to next register to get the channel we want */
if (channel >= 0) {
current_temp_reg_index = allocate_temp_register();
next_temp_reg_comp = 0;
}
- return PValue(new GPRValue(current_temp_reg_index, next_temp_reg_comp++));
+ return std::make_shared<GPRValue>(current_temp_reg_index, next_temp_reg_comp++);
}
GPRVector ValuePool::get_temp_vec4()
PValue literal(uint32_t value);
- PValue get_temp_register(int channel = -1);
+ PGPRValue get_temp_register(int channel = -1);
GPRVector get_temp_vec4();