vbo/dlist: only use merged primitives when it's ok to do so
Merging primitives generates incorrect gl_PrimitiveID[In] values. So make merged primitives construction non-destructive and fallback to drawing with original primitives if a program reads gl_PrimitiveId. This commit adds _mesa_update_primitive_id_is_unused modeled after _mesa_update_allow_draw_out_of_order to update ctx->_PrimitiveIDIsUnused each time shaders are updated. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7078>
This commit is contained in:
@@ -1294,6 +1294,7 @@ _mesa_initialize_context(struct gl_context *ctx,
|
||||
}
|
||||
|
||||
ctx->FirstTimeCurrent = GL_TRUE;
|
||||
ctx->_PrimitiveIDIsUnused = true;
|
||||
|
||||
return GL_TRUE;
|
||||
|
||||
|
Reference in New Issue
Block a user