Mesa (main): r600/sfn: Fix streamout with non-zero component write
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Jul 23 14:23:01 UTC 2022
Module: Mesa
Branch: main
Commit: dcfb047e11922730afd280fe7364a14036efeff6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dcfb047e11922730afd280fe7364a14036efeff6
Author: Gert Wollny <gert.wollny at collabora.com>
Date: Fri Jul 22 16:30:39 2022 +0200
r600/sfn: Fix streamout with non-zero component write
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>
---
src/gallium/drivers/r600/sfn/sfn_shader_gs.cpp | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/gallium/drivers/r600/sfn/sfn_shader_gs.cpp b/src/gallium/drivers/r600/sfn/sfn_shader_gs.cpp
index 52ebc184871..c2ef2ba93a9 100644
--- a/src/gallium/drivers/r600/sfn/sfn_shader_gs.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_shader_gs.cpp
@@ -256,16 +256,15 @@ bool GeometryShader::store_output(nir_intrinsic_instr* instr)
AluInstr *ir = nullptr;
if (m_streamout_data[location]) {
- auto value = m_streamout_data[location]->value();
+ const auto& value = m_streamout_data[location]->value();
auto tmp = value_factory().temp_vec4(pin_group);
-
for (unsigned i = 0; i < 4 - shift; ++i) {
if (!(write_mask & (1 << i)))
continue;
- if (value[i]->chan() < 4) {
- ir = new AluInstr(op1_mov, tmp[i], value[src_swz[i]], AluInstr::write);
- } else if (out_value[i]->chan() < 4) {
- ir = new AluInstr(op1_mov, tmp[i], out_value[i], AluInstr::write);
+ if (out_value[i + shift]->chan() < 4) {
+ ir = new AluInstr(op1_mov, tmp[i + shift], out_value[i + shift], AluInstr::write);
+ } else if (value[i]->chan() < 4) {
+ ir = new AluInstr(op1_mov, tmp[i + shift], value[i], AluInstr::write);
} else
continue;
emit_instruction(ir);
More information about the mesa-commit
mailing list