mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
check for invalid vertex/fragment program in glBegin
This commit is contained in:
parent
04207ab7e2
commit
1ef3d3a758
1 changed files with 9 additions and 0 deletions
|
|
@ -992,6 +992,15 @@ static void GLAPIENTRY _tnl_Begin( GLenum mode )
|
|||
{
|
||||
GET_CURRENT_CONTEXT( ctx );
|
||||
|
||||
if ((ctx->VertexProgram.Enabled
|
||||
&& !ctx->VertexProgram.Current->Instructions) ||
|
||||
(ctx->FragmentProgram.Enabled
|
||||
&& !ctx->FragmentProgram.Current->Instructions)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glBegin (invalid vertex/fragment program)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctx->Driver.CurrentExecPrimitive == GL_POLYGON+1) {
|
||||
TNLcontext *tnl = TNL_CONTEXT(ctx);
|
||||
int i;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue