ctx->Const.MaxColorTextureSamples = 8;
ctx->Const.MaxDepthTextureSamples = 8;
ctx->Const.MaxIntegerSamples = 8;
+ ctx->Const.MaxProgramTextureGatherComponents = 4;
}
ctx->Const.MinLineWidth = 1.0;
}
bool
-brwCreateContext(int api,
+brwCreateContext(gl_api api,
const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
unsigned major_version,
mesaVis, driContextPriv,
sharedContextPrivate, &functions,
error)) {
- ralloc_free(brw);
+ intelDestroyContext(driContextPriv);
return false;
}
if (!brw->hw_ctx) {
fprintf(stderr, "Gen6+ requires Kernel 3.6 or later.\n");
- ralloc_free(brw);
+ intelDestroyContext(driContextPriv);
return false;
}
}
brw_draw_init( brw );
brw->precompile = driQueryOptionb(&brw->optionCache, "shader_precompile");
+ brw->disable_derivative_optimization =
+ driQueryOptionb(&brw->optionCache, "disable_derivative_optimization");
- ctx->Const.ContextFlags = 0;
- if ((flags & __DRI_CTX_FLAG_FORWARD_COMPATIBLE) != 0)
- ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT;
-
- ctx->Debug.DebugOutput = GL_FALSE;
if ((flags & __DRI_CTX_FLAG_DEBUG) != 0) {
- ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_DEBUG_BIT;
- ctx->Debug.DebugOutput = GL_TRUE;
-
/* Turn on some extra GL_ARB_debug_output generation. */
brw->perf_debug = true;
}
_mesa_initialize_dispatch_tables(ctx);
_mesa_initialize_vbo_vtxfmt(ctx);
+ if (ctx->Extensions.AMD_performance_monitor) {
+ brw_init_performance_monitors(brw);
+ }
+
return true;
}