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 but not GK208 nor GK104.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
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);