glsl: Fix subscripted arrays with no XFB packing

We need to duplicate the subscripted members even if they happen to be
aligned, since the other elements may be passed into the consumer
shader. Fixes on Panfrost:

dEQP-GLES3.functional.transform_feedback.array_element.interleaved.lines.highp_float

Note: the test did pass on main previously due to an elaborate set of
driver hacks. I don't believe the old behaviour was correct regardless.

Only Panfrost is affected by this change and the next, as every other
driver sets PIPE_CAP_PACKED_STREAM_OUTPUT.

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10778>
This commit is contained in:
Alyssa Rosenzweig
2020-08-27 08:21:40 -04:00
committed by Marge Bot
parent 7efa5f3c80
commit 538ab8c571
2 changed files with 5 additions and 7 deletions

View File

@@ -130,9 +130,9 @@ public:
return !this->next_buffer_separator && !this->skip_components;
}
bool is_aligned(unsigned dmul, unsigned offset) const
bool subscripted() const
{
return (dmul * (this->array_subscript + offset)) % 4 == 0;
return this->is_subscripted;
}
const char *name() const