Summary: | PrimitiveRestartNV inside a render list causes a crash | ||
---|---|---|---|
Product: | Mesa | Reporter: | Olivier Lauffenburger <o.lauffenburger> |
Component: | Mesa core | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | mesa-dev |
Severity: | major | ||
Priority: | medium | ||
Version: | 17.0 | ||
Hardware: | x86-64 (AMD64) | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Olivier Lauffenburger
2017-06-16 08:50:54 UTC
I have replaced the content of save_PrimitiveRestartNV() by the following code to make it work: static void GLAPIENTRY _save_PrimitiveRestartNV(void) { GLenum curPrim; GET_CURRENT_CONTEXT(ctx); /* get current primitive mode */ struct vbo_save_context *save = &vbo_context(ctx)->save; if (save->prim_count == 0) return; const GLuint i = save->prim_count - 1; curPrim = save->prim[i].mode; /* restart primitive */ CALL_End(GET_DISPATCH(), ()); vbo_save_NotifyBegin(ctx, (curPrim | VBO_SAVE_PRIM_WEAK | VBO_SAVE_PRIM_NO_CURRENT_UPDATE)); } Contrarily to what is stated, ctx->Driver.CurrentSavePrimitive is not correctly set before _save_PrimitiveRestartNV() is called, whence this intricate code to get the current primitive mode... I've committed a patch based on your suggestion (commit f5c8bb1e00f358e05ed21f8ed69c9fc3803bf95f) plus an patch for another failure case (commit 9ac55e8219e1f6abeab3c779c8fe710c2bc25f2b). Closing this bug. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.