aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2020-05-16 16:44:27 +0200
committerMarge Bot <[email protected]>2020-05-19 07:52:13 +0000
commit723ae8177e88a8a129b664371da46c0c9d004866 (patch)
treeff516fe3853c6d9be11711c45c05b1405e9c860e /src
parent7ae4b7938e80c71b3b06f9eab26c7cab46a5d308 (diff)
r600/sfn: Fix clip vertex output as possible stream variable
Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Reviewed-by: Dave Airlie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r600/sfn/sfn_vertexstageexport.cpp5
-rw-r--r--src/gallium/drivers/r600/sfn/sfn_vertexstageexport.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/sfn/sfn_vertexstageexport.cpp b/src/gallium/drivers/r600/sfn/sfn_vertexstageexport.cpp
index 097c424a6a0..061097359ba 100644
--- a/src/gallium/drivers/r600/sfn/sfn_vertexstageexport.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_vertexstageexport.cpp
@@ -234,7 +234,8 @@ bool VertexStageExportForFS::emit_clip_vertices(const nir_variable *out_var, nir
m_proc.sh_info().cc_dist_mask = 0xff;
m_proc.sh_info().clip_dist_write = 0xff;
- GPRVector clip_vertex = m_proc.vec_from_nir_with_fetch_constant(instr->src[1], 0xf, {0,1,2,3});
+ m_clip_vertex = m_proc.vec_from_nir_with_fetch_constant(instr->src[1], 0xf, {0,1,2,3});
+ m_proc.add_param_output_reg(out_var->data.driver_location, &m_clip_vertex);
for (int i = 0; i < 4; ++i)
m_proc.sh_info().output[out_var->data.driver_location].write_mask |= 1 << i;
@@ -246,7 +247,7 @@ bool VertexStageExportForFS::emit_clip_vertices(const nir_variable *out_var, nir
int ochan = i & 3;
AluInstruction *ir = nullptr;
for (int j = 0; j < 4; j++) {
- ir = new AluInstruction(op2_dot4_ieee, clip_dist[oreg].reg_i(j), clip_vertex.reg_i(j),
+ ir = new AluInstruction(op2_dot4_ieee, clip_dist[oreg].reg_i(j), m_clip_vertex.reg_i(j),
PValue(new UniformValue(512 + i, j, R600_BUFFER_INFO_CONST_BUFFER)),
(j == ochan) ? EmitInstruction::write : EmitInstruction::empty);
m_proc.emit_instruction(ir);
diff --git a/src/gallium/drivers/r600/sfn/sfn_vertexstageexport.h b/src/gallium/drivers/r600/sfn/sfn_vertexstageexport.h
index 7e2ca620be6..a48f9d34153 100644
--- a/src/gallium/drivers/r600/sfn/sfn_vertexstageexport.h
+++ b/src/gallium/drivers/r600/sfn/sfn_vertexstageexport.h
@@ -27,6 +27,7 @@ protected:
std::map<unsigned, unsigned> m_param_map;
int m_cur_clip_pos;
int m_cur_param;
+ GPRVector m_clip_vertex;
};
class VertexStageExportForFS : public VertexStageExportBase