summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.pick_status.json2
-rw-r--r--src/gallium/drivers/panfrost/pan_screen.c12
2 files changed, 11 insertions, 3 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 61e4b000f8e..6ec49adb942 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1048,7 +1048,7 @@
"description": "panfrost: Use PIPE_CAP_VERTEX_ATTRIB_ELEMENT_ALIGNED_ONLY",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "e03622e50fcebbcc32b2fd403b1a729c73cb49d5"
},
diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c
index b17e2809e19..50037663279 100644
--- a/src/gallium/drivers/panfrost/pan_screen.c
+++ b/src/gallium/drivers/panfrost/pan_screen.c
@@ -213,8 +213,16 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_QUERY_TIMESTAMP:
return is_gl3;
- /* TODO: Where does this req come from in practice? */
- case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
+ /* The hardware requires element alignment for data conversion to work
+ * as expected. If data conversion is not required, this restriction is
+ * lifted on Midgard at a performance penalty. We conservatively
+ * require element alignment for vertex buffers, using u_vbuf to
+ * translate to match the hardware requirement.
+ *
+ * This is less heavy-handed than the 4BYTE_ALIGNED_ONLY caps, which
+ * would needlessly require alignment even for 8-bit formats.
+ */
+ case PIPE_CAP_VERTEX_ATTRIB_ELEMENT_ALIGNED_ONLY:
return 1;
case PIPE_CAP_MAX_TEXTURE_2D_SIZE: