/* GL_ARB_robustness */
consts->ResetStrategy = GL_NO_RESET_NOTIFICATION_ARB;
+ /* GL_KHR_robustness */
+ consts->RobustAccess = GL_FALSE;
+
/* ES 3.0 or ARB_ES3_compatibility */
consts->MaxElementIndex = 0xffffffffu;
/* check that we don't exceed the size of various bitfields */
assert(VARYING_SLOT_MAX <=
- (8 * sizeof(ctx->VertexProgram._Current->Base.OutputsWritten)));
+ (8 * sizeof(ctx->VertexProgram._Current->info.outputs_written)));
assert(VARYING_SLOT_MAX <=
- (8 * sizeof(ctx->FragmentProgram._Current->Base.InputsRead)));
+ (8 * sizeof(ctx->FragmentProgram._Current->info.inputs_read)));
/* shader-related checks */
assert(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxLocalParams <= MAX_PROGRAM_LOCAL_PARAMS);
_mesa_reference_framebuffer(&ctx->DrawBuffer, NULL);
_mesa_reference_framebuffer(&ctx->ReadBuffer, NULL);
- _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current, NULL);
- _mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current, NULL);
- _mesa_reference_vertprog(ctx, &ctx->VertexProgram._TnlProgram, NULL);
+ _mesa_reference_program(ctx, &ctx->VertexProgram.Current, NULL);
+ _mesa_reference_program(ctx, &ctx->VertexProgram._Current, NULL);
+ _mesa_reference_program(ctx, &ctx->VertexProgram._TnlProgram, NULL);
- _mesa_reference_tesscprog(ctx, &ctx->TessCtrlProgram._Current, NULL);
- _mesa_reference_tesseprog(ctx, &ctx->TessEvalProgram._Current, NULL);
- _mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current, NULL);
+ _mesa_reference_program(ctx, &ctx->TessCtrlProgram._Current, NULL);
+ _mesa_reference_program(ctx, &ctx->TessEvalProgram._Current, NULL);
+ _mesa_reference_program(ctx, &ctx->GeometryProgram._Current, NULL);
- _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, NULL);
- _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL);
- _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._TexEnvProgram, NULL);
+ _mesa_reference_program(ctx, &ctx->FragmentProgram.Current, NULL);
+ _mesa_reference_program(ctx, &ctx->FragmentProgram._Current, NULL);
+ _mesa_reference_program(ctx, &ctx->FragmentProgram._TexEnvProgram, NULL);
_mesa_reference_vao(ctx, &ctx->Array.VAO, NULL);
_mesa_reference_vao(ctx, &ctx->Array.DefaultVAO, NULL);
if (!newCtx) {
_glapi_set_dispatch(NULL); /* none current */
+ if (curCtx) {
+ _mesa_reference_framebuffer(&curCtx->WinSysDrawBuffer, NULL);
+ _mesa_reference_framebuffer(&curCtx->WinSysReadBuffer, NULL);
+ }
}
else {
_glapi_set_dispatch(newCtx->CurrentDispatch);