[Mesa-dev] [PATCH] gm107/ir: avoid combining geometry shader stores at 0x60
Ilia Mirkin
imirkin at alum.mit.edu
Tue Jan 7 02:56:36 UTC 2020
This corresponds to gl_PrimitiveID and gl_Layer. When both of these are
stored in a single AST.64 or AST.128 operation, then it appears as
though the whole store fails. Fixes the recently extended
glsl-1.50-transform-feedback-builtins piglit, and also
gtf30.GL3Tests.transform_feedback.transform_feedback_builtins.
The issue was reproduced on GM107 and GP108.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
.../drivers/nouveau/codegen/nv50_ir_peephole.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
index 673fcd187ca..2f46b0e886a 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
@@ -2804,6 +2804,16 @@ MemoryOpt::combineSt(Record *rec, Instruction *st)
if (prog->getType() == Program::TYPE_COMPUTE && rec->rel[0])
return false;
+ // There's really no great place to put this in a generic manner. Seemingly
+ // wide stores at 0x60 don't work in GS shaders on SM50+. Don't combine
+ // those.
+ if (prog->getTarget()->getChipset() >= NVISA_GM107_CHIPSET &&
+ prog->getType() == Program::TYPE_GEOMETRY &&
+ st->getSrc(0)->reg.file == FILE_SHADER_OUTPUT &&
+ rec->rel[0] == NULL &&
+ MIN2(offRc, offSt) == 0x60)
+ return false;
+
// remove any existing load/store records for the store being merged into
// the existing record.
purgeRecords(st, DATA_FILE_COUNT);
--
2.24.1
More information about the mesa-dev
mailing list