summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2024-01-06 17:57:26 -0500
committerEric Engestrom <eric@engestrom.ch>2024-01-09 19:37:45 +0000
commitee4740fe2987342db4d67e4f6a6879ed999ac643 (patch)
treeaa198da6f9c16b78db24cdae8217afb496929607
parent6c3a6a9c0f07585bfe02ada590f73bcf360eb9ac (diff)
downloadmesa-ee4740fe2987342db4d67e4f6a6879ed999ac643.tar.gz
mesa-ee4740fe2987342db4d67e4f6a6879ed999ac643.tar.bz2
mesa-ee4740fe2987342db4d67e4f6a6879ed999ac643.zip
glthread: don't unroll draws using user VBOs with GLES
The unrolling uses glBegin, which is unsupported by GLES and the GL dispatch fails. Fixes: 50d791ca73e52c6 - glthread: add a vertex upload path that unrolls indices for glDrawElements Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26916> (cherry picked from commit 56b4d199a05ef8f9d73ad3215b27238231a477fb)
-rw-r--r--.pick_status.json2
-rw-r--r--src/mesa/main/glthread_draw.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 2393eb9c9bf..17bc59da44a 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -224,7 +224,7 @@
"description": "glthread: don't unroll draws using user VBOs with GLES",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "50d791ca73e52c678cee8a84e607ff810d834689",
"notes": null
diff --git a/src/mesa/main/glthread_draw.c b/src/mesa/main/glthread_draw.c
index b747493aba7..e1d0611d762 100644
--- a/src/mesa/main/glthread_draw.c
+++ b/src/mesa/main/glthread_draw.c
@@ -813,7 +813,8 @@ should_convert_to_begin_end(struct gl_context *ctx, unsigned count,
* Others prevent syncing, such as disallowing buffer objects because we
* can't map them without syncing.
*/
- return util_is_vbo_upload_ratio_too_large(count, num_upload_vertices) &&
+ return ctx->API == API_OPENGL_COMPAT &&
+ util_is_vbo_upload_ratio_too_large(count, num_upload_vertices) &&
instance_count == 1 && /* no instancing */
vao->CurrentElementBufferName == 0 && /* only user indices */
!ctx->GLThread._PrimitiveRestart && /* no primitive restart */