Mesa (master): panfrost: Don't count the special vertex/instance ID attributes on Bifrost

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Mar 11 15:22:41 UTC 2021


Module: Mesa
Branch: master
Commit: b0f968cf5c99710b0e204ac59e87314f5cdbc60f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b0f968cf5c99710b0e204ac59e87314f5cdbc60f

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Fri Mar  5 13:22:27 2021 +0100

panfrost: Don't count the special vertex/instance ID attributes on Bifrost

On Bifrost the vertex/instance ID are preloaded in special registers,
no need to add special attribute entries.

Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9517>

---

 src/panfrost/lib/pan_shader.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/panfrost/lib/pan_shader.c b/src/panfrost/lib/pan_shader.c
index 88179ce85bf..13b6e4c203f 100644
--- a/src/panfrost/lib/pan_shader.c
+++ b/src/panfrost/lib/pan_shader.c
@@ -156,12 +156,12 @@ pan_shader_compile(const struct panfrost_device *dev,
 
                 bool vertex_id = BITSET_TEST(s->info.system_values_read,
                                              SYSTEM_VALUE_VERTEX_ID);
-                if (vertex_id)
+                if (vertex_id && !pan_is_bifrost(dev))
                         info->attribute_count = MAX2(info->attribute_count, PAN_VERTEX_ID + 1);
 
                 bool instance_id = BITSET_TEST(s->info.system_values_read,
                                                SYSTEM_VALUE_INSTANCE_ID);
-                if (instance_id)
+                if (instance_id && !pan_is_bifrost(dev))
                         info->attribute_count = MAX2(info->attribute_count, PAN_INSTANCE_ID + 1);
 
                 info->vs.writes_point_size =



More information about the mesa-commit mailing list