panfrost: Assign primitive_size.pointer only if writes_point_size() returns true
authorBoris Brezillon <boris.brezillon@collabora.com>
Thu, 5 Mar 2020 16:24:39 +0000 (17:24 +0100)
committerBoris Brezillon <boris.brezillon@collabora.com>
Tue, 10 Mar 2020 11:47:33 +0000 (12:47 +0100)
commita0402f79601c69089cc3cefab51adab9c3331669
treef5cf87253b7558affe418f25bb203ef9ad7073bc
parent24db276d11976905b2e8a44965c684bb48c3d49f
panfrost: Assign primitive_size.pointer only if writes_point_size() returns true

Checking vs->writes_point_size is not enough, as we might have a vertex
shader writing point size, but a primitive that's not MALI_POINT. That
currently works because emit_varying_descriptor() is called before the
primitive_size.constant field is update, but let's make the logic more
robust, just in case things are re-ordered at some point.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
src/gallium/drivers/panfrost/pan_context.c
src/gallium/drivers/panfrost/pan_context.h
src/gallium/drivers/panfrost/pan_varyings.c