mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 18:00:13 +01:00
mesa: In core profile, refuse to draw unless a VAO is bound.
Core profile requires a non-default VAO to be bound. Currently, calls to glVertexAttribPointer raise INVALID_OPERATION unless a VAO is bound, and we never actually get any vertex data set. Trying to draw without any vertex data can only cause problems. In i965, it causes a crash. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76400 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Cc: mesa-stable@lists.freedesktop.org
This commit is contained in:
parent
29bcc73d4d
commit
1afe335925
1 changed files with 4 additions and 1 deletions
|
|
@ -125,8 +125,11 @@ check_valid_to_render(struct gl_context *ctx, const char *function)
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case API_OPENGL_COMPAT:
|
|
||||||
case API_OPENGL_CORE:
|
case API_OPENGL_CORE:
|
||||||
|
if (ctx->Array.VAO == ctx->Array.DefaultVAO)
|
||||||
|
return GL_FALSE;
|
||||||
|
/* fallthrough */
|
||||||
|
case API_OPENGL_COMPAT:
|
||||||
{
|
{
|
||||||
const struct gl_shader_program *vsProg =
|
const struct gl_shader_program *vsProg =
|
||||||
ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX];
|
ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX];
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue