functions->GetSamplePosition = gen6_get_sample_position;
}
-void
+static void
brw_initialize_context_constants(struct brw_context *brw)
{
struct gl_context *ctx = &brw->ctx;
int max_samples;
const int *msaa_modes = intel_supported_msaa_modes(brw->intelScreen);
const int clamp_max_samples =
- brw->optionCache.info != NULL ?
- driQueryOptioni(&brw->optionCache, "clamp_max_samples") : -1;
+ driQueryOptioni(&brw->optionCache, "clamp_max_samples");
if (clamp_max_samples < 0) {
max_samples = msaa_modes[0];
ctx->Extensions.EXT_shader_integer_mix = ctx->Const.GLSLVersion >= 130;
ctx->Extensions.EXT_timer_query = true;
- if (brw->bufmgr) {
- if (brw->gen == 5 || can_write_oacontrol(brw)) {
- ctx->Extensions.AMD_performance_monitor = true;
- ctx->Extensions.INTEL_performance_query = true;
- }
+ if (brw->gen == 5 || can_write_oacontrol(brw)) {
+ ctx->Extensions.AMD_performance_monitor = true;
+ ctx->Extensions.INTEL_performance_query = true;
}
}
if (brw->gen >= 6) {
ctx->Extensions.ARB_blend_func_extended =
- brw->optionCache.info == NULL ||
!driQueryOptionb(&brw->optionCache, "disable_blend_func_extended");
ctx->Extensions.ARB_conditional_render_inverted = true;
ctx->Extensions.ARB_draw_buffers_blend = true;
ctx->Extensions.EXT_transform_feedback = true;
ctx->Extensions.OES_depth_texture_cube_map = true;
- /* Test if the kernel has the ioctl. */
- if (brw->intelScreen->hw_has_timestamp)
- ctx->Extensions.ARB_timer_query = true;
+ ctx->Extensions.ARB_timer_query = brw->intelScreen->hw_has_timestamp;
/* Only enable this in core profile because other parts of Mesa behave
* slightly differently when the extension is enabled.
ctx->Extensions.ARB_texture_compression_bptc = true;
ctx->Extensions.ARB_texture_view = true;
- if (brw->bufmgr &&
- can_do_pipelined_register_writes(brw)) {
+ if (can_do_pipelined_register_writes(brw)) {
ctx->Extensions.ARB_draw_indirect = true;
ctx->Extensions.ARB_transform_feedback2 = true;
ctx->Extensions.ARB_transform_feedback3 = true;
if (ctx->API != API_OPENGL_CORE)
ctx->Extensions.ARB_color_buffer_float = true;
- if (ctx->Mesa_DXTn ||
- (brw->optionCache.info != NULL &&
- driQueryOptionb(&brw->optionCache, "force_s3tc_enable")))
+ if (ctx->Mesa_DXTn || driQueryOptionb(&brw->optionCache, "force_s3tc_enable"))
ctx->Extensions.EXT_texture_compression_s3tc = true;
ctx->Extensions.ANGLE_texture_compression_dxt = true;
compiler->device = device;
- compiler->brw->optionCache.info = NULL;
- compiler->brw->bufmgr = NULL;
compiler->brw->gen = devinfo->gen;
compiler->brw->is_g4x = devinfo->is_g4x;
compiler->brw->is_baytrail = devinfo->is_baytrail;
ctx = &compiler->brw->ctx;
_mesa_init_shader_object_functions(&ctx->Driver);
- _mesa_init_constants(&ctx->Const, API_OPENGL_CORE);
-
- /* Set dd::NewShader */
- brwInitFragProgFuncs(&ctx->Driver);
-
+ /* brw_select_clip_planes() needs this for bogus reasons. */
ctx->_Shader = &compiler->pipeline;
- compiler->brw->precompile = false;
-
return compiler;
fail: