aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2020-05-16 20:39:45 +0200
committerMarge Bot <[email protected]>2020-05-19 07:52:14 +0000
commit9f942a8e7c72c720bc7d4669a15fa4d37dd7ce7c (patch)
tree891e15f976205bb56b0e3499976add5f26e81076 /src/gallium/drivers/r600
parent723ae8177e88a8a129b664371da46c0c9d004866 (diff)
r600/sfn: Fix splitting constants that come from different kcache banks.
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/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp b/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp
index 35da6d4ef4d..e63fa973c17 100644
--- a/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp
@@ -191,13 +191,13 @@ void EmitAluInstruction::split_constants(const nir_alu_instr& instr)
return;
int nconst = 0;
- std::array<PValue,4> c;
+ std::array<const UniformValue *,4> c;
std::array<int,4> idx;
for (unsigned i = 0; i < op_info->num_inputs; ++i) {
PValue src = from_nir(instr.src[i], 0);
assert(src);
if (src->type() == Value::kconst) {
- c[nconst] = src;
+ c[nconst] = static_cast<const UniformValue *>(src.get());
idx[nconst++] = i;
}
@@ -206,11 +206,12 @@ void EmitAluInstruction::split_constants(const nir_alu_instr& instr)
return;
unsigned sel = c[0]->sel();
+ unsigned kcache = c[0]->kcache_bank();
sfn_log << SfnLog::reg << "split " << nconst << " constants, sel[0] = " << sel; ;
for (int i = 1; i < nconst; ++i) {
sfn_log << "sel[" << i << "] = " << c[i]->sel() << "\n";
- if (c[i]->sel() != sel) {
+ if (c[i]->sel() != sel || c[i]->kcache_bank() != kcache) {
load_uniform(instr.src[idx[i]]);
}
}