r600/sfn: fix storing shader output array locations
When lowering gl_Clipertex the driver_location may no longer correspond
to the array index, so fill the array by counting the array index up
according to outputs that need to be handled by the state setup.
Fixes: 3340c7ce35
r600/sfn: lower CLIPVERTEX to clip planes
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>
This commit is contained in:
parent
2e03dd1bef
commit
982effcd4e
|
@ -1290,9 +1290,9 @@ void Shader::get_shader_info(r600_shader *sh_info)
|
|||
{
|
||||
sh_info->ninput = m_inputs.size();
|
||||
int lds_pos = 0;
|
||||
int output_array_array_loc = 0;
|
||||
int input_array_array_loc = 0;
|
||||
for (auto& [index, info] : m_inputs) {
|
||||
r600_shader_io& io = sh_info->input[output_array_array_loc++];
|
||||
r600_shader_io& io = sh_info->input[input_array_array_loc++];
|
||||
|
||||
io.sid = info.sid();
|
||||
io.gpr = info.gpr();
|
||||
|
@ -1316,9 +1316,10 @@ void Shader::get_shader_info(r600_shader *sh_info)
|
|||
sh_info->nlds = lds_pos;
|
||||
sh_info->noutput = m_outputs.size();
|
||||
sh_info->num_loops = m_nloops;
|
||||
int output_array_array_loc = 0;
|
||||
|
||||
for (auto& [index, info] : m_outputs) {
|
||||
r600_shader_io& io = sh_info->output[index];
|
||||
r600_shader_io& io = sh_info->output[output_array_array_loc++];
|
||||
io.sid = info.sid();
|
||||
io.gpr = info.gpr();
|
||||
io.spi_sid = info.spi_sid();
|
||||
|
|
Loading…
Reference in New Issue