mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
r600/sfn: Add option to get a temp value for a specific channel
Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5963>
This commit is contained in:
parent
258618815b
commit
aca99e6fc9
2 changed files with 8 additions and 2 deletions
|
|
@ -151,8 +151,14 @@ PValue ValuePool::from_nir(const nir_alu_src &v, unsigned component)
|
|||
return from_nir(v.src, component, v.swizzle[component]);
|
||||
}
|
||||
|
||||
PValue ValuePool::get_temp_register()
|
||||
PValue ValuePool::get_temp_register(int channel)
|
||||
{
|
||||
/* Skip to next register to get the channel we want */
|
||||
if (next_temp_reg_comp <= channel)
|
||||
next_temp_reg_comp = channel;
|
||||
else
|
||||
next_temp_reg_comp = 4;
|
||||
|
||||
if (next_temp_reg_comp > 3) {
|
||||
current_temp_reg_index = allocate_temp_register();
|
||||
next_temp_reg_comp = 0;
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ public:
|
|||
|
||||
PValue literal(uint32_t value);
|
||||
|
||||
PValue get_temp_register();
|
||||
PValue get_temp_register(int channel = -1);
|
||||
|
||||
GPRVector get_temp_vec4();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue