v3dv/pipeline: default vertex attributes values are not needed for v71
authorAlejandro Piñeiro <apinheiro@igalia.com>
Wed, 28 Jul 2021 10:05:26 +0000 (12:05 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 13 Oct 2023 22:37:42 +0000 (22:37 +0000)
There are not part of the shader state record.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

src/broadcom/vulkan/v3dv_private.h
src/broadcom/vulkan/v3dvx_pipeline.c

index 39354b2..dcdb3ad 100644 (file)
@@ -587,6 +587,9 @@ struct v3dv_device {
     * being float being float, allowing us to reuse the same BO for all
     * pipelines matching this requirement. Pipelines that need integer
     * attributes will create their own BO.
+    *
+    * Note that since v71 the default attribute values are not needed, so this
+    * can be NULL.
     */
    struct v3dv_bo *default_attribute_float;
 
@@ -2267,7 +2270,8 @@ struct v3dv_pipeline {
    unsigned char sha1[20];
 
    /* In general we can reuse v3dv_device->default_attribute_float, so note
-    * that the following can be NULL.
+    * that the following can be NULL. In 7.x this is not used, so it will be
+    * always NULL.
     *
     * FIXME: the content of this BO will be small, so it could be improved to
     * be uploaded to a common BO. But as in most cases it will be NULL, it is
index e235220..4dc6d70 100644 (file)
@@ -665,6 +665,7 @@ v3dX(pipeline_pack_compile_state)(struct v3dv_pipeline *pipeline,
    }
 }
 
+#if V3D_VERSION == 42
 static bool
 pipeline_has_integer_vertex_attrib(struct v3dv_pipeline *pipeline)
 {
@@ -674,11 +675,16 @@ pipeline_has_integer_vertex_attrib(struct v3dv_pipeline *pipeline)
    }
    return false;
 }
+#endif
 
 bool
 v3dX(pipeline_needs_default_attribute_values)(struct v3dv_pipeline *pipeline)
 {
+#if V3D_VERSION == 42
    return pipeline_has_integer_vertex_attrib(pipeline);
+#endif
+
+   return false;
 }
 
 /* @pipeline can be NULL. In that case we assume the most common case. For
@@ -691,6 +697,10 @@ struct v3dv_bo *
 v3dX(create_default_attribute_values)(struct v3dv_device *device,
                                       struct v3dv_pipeline *pipeline)
 {
+#if V3D_VERSION >= 71
+   return NULL;
+#endif
+
    uint32_t size = MAX_VERTEX_ATTRIBS * sizeof(float) * 4;
    struct v3dv_bo *bo;