diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2013-09-27 10:40:57 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2013-10-13 00:10:43 -0700 |
commit | 90511faedddff834ab1f6d92f4d5d25a3c32bd82 (patch) | |
tree | bdeabd1744f6a94f396cfc358d0e25abc67502ec /src/mesa/drivers/dri/i965/intel_context.c | |
parent | 0fb525b87ceae543d581a5755ca547b54c58aa76 (diff) |
i965: Pull most driconf option handling into a centralized function.
Using a helper function clarifies the context initialization code.
I would've liked to completely centralize it, but moving the optionCache
code from intelInitExtensions into here would've required setting flags
in the context, which seems like a waste.
v2: Rebase for the introduction of disable_derivative_optimization.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_context.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_context.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index 430967b5242..a5805ec8909 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -367,9 +367,6 @@ intelInitContext(struct brw_context *brw, unsigned *dri_ctx_error) { struct gl_context *ctx = &brw->ctx; - __DRIscreen *sPriv = driContextPriv->driScreenPriv; - struct intel_screen *intelScreen = sPriv->driverPrivate; - int bo_reuse_mode; /* GLX uses DRI2 invalidate events to handle window resizing. * Unfortunately, EGL does not - libEGL is written in XCB (not Xlib), @@ -386,9 +383,6 @@ intelInitContext(struct brw_context *brw, memset(&ctx->TextureFormatSupported, 0, sizeof(ctx->TextureFormatSupported)); - driParseConfigFiles(&brw->optionCache, &intelScreen->optionCache, - sPriv->myNum, "i965"); - /* Estimate the size of the mappable aperture into the GTT. There's an * ioctl to get the whole GTT size, but not one to get the mappable subset. * It turns out it's basically always 256MB, though some ancient hardware @@ -404,15 +398,6 @@ intelInitContext(struct brw_context *brw, */ brw->max_gtt_map_object_size = gtt_size / 4; - bo_reuse_mode = driQueryOptioni(&brw->optionCache, "bo_reuse"); - switch (bo_reuse_mode) { - case DRI_CONF_BO_REUSE_DISABLED: - break; - case DRI_CONF_BO_REUSE_ALL: - intel_bufmgr_gem_enable_reuse(brw->bufmgr); - break; - } - /* Initialize the software rasterizer and helper modules. * * As of GL 3.1 core, the gen4+ driver doesn't need the swrast context for @@ -443,28 +428,6 @@ intelInitContext(struct brw_context *brw, intel_fbo_init(brw); - if (!driQueryOptionb(&brw->optionCache, "hiz")) { - brw->has_hiz = false; - /* On gen6, you can only do separate stencil with HIZ. */ - if (brw->gen == 6) - brw->has_separate_stencil = false; - } - - if (driQueryOptionb(&brw->optionCache, "always_flush_batch")) { - fprintf(stderr, "flushing batchbuffer before/after each draw call\n"); - brw->always_flush_batch = 1; - } - - if (driQueryOptionb(&brw->optionCache, "always_flush_cache")) { - fprintf(stderr, "flushing GPU caches before/after each draw call\n"); - brw->always_flush_cache = 1; - } - - if (driQueryOptionb(&brw->optionCache, "disable_throttling")) { - fprintf(stderr, "disabling flush throttling\n"); - brw->disable_throttling = 1; - } - return true; } |