From: Kenneth Graunke Date: Thu, 4 Jul 2013 17:30:01 +0000 (-0700) Subject: i965: Move intel_context::driContext to brw_context. X-Git-Tag: mesa-9.2.1~370 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F08%2F7408%2F1;p=platform%2Fupstream%2Fmesa.git i965: Move intel_context::driContext to brw_context. Signed-off-by: Kenneth Graunke Acked-by: Chris Forbes Acked-by: Paul Berry Acked-by: Anuj Phogat --- diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 27554cb..69a3e03 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -1223,6 +1223,8 @@ struct brw_context int max_entries; double report_time; } shader_time; + + __DRIcontext *driContext; }; /*====================================================================== diff --git a/src/mesa/drivers/dri/i965/intel_buffers.c b/src/mesa/drivers/dri/i965/intel_buffers.c index a89c902..b5fb338 100644 --- a/src/mesa/drivers/dri/i965/intel_buffers.c +++ b/src/mesa/drivers/dri/i965/intel_buffers.c @@ -58,7 +58,6 @@ intelDrawBuffer(struct gl_context * ctx, GLenum mode) { if (ctx->DrawBuffer && _mesa_is_winsys_fbo(ctx->DrawBuffer)) { struct brw_context *const brw = brw_context(ctx); - struct intel_context *const intel = intel_context(ctx); const bool was_front_buffer_rendering = brw->is_front_buffer_rendering; brw->is_front_buffer_rendering = (mode == GL_FRONT_LEFT) @@ -69,7 +68,7 @@ intelDrawBuffer(struct gl_context * ctx, GLenum mode) * (including the fake front) before we start rendering again. */ if (!was_front_buffer_rendering && brw->is_front_buffer_rendering) - dri2InvalidateDrawable(intel->driContext->driDrawablePriv); + dri2InvalidateDrawable(brw->driContext->driDrawablePriv); } } @@ -79,7 +78,6 @@ intelReadBuffer(struct gl_context * ctx, GLenum mode) { if (ctx->DrawBuffer && _mesa_is_winsys_fbo(ctx->DrawBuffer)) { struct brw_context *const brw = brw_context(ctx); - struct intel_context *const intel = intel_context(ctx); const bool was_front_buffer_reading = brw->is_front_buffer_reading; brw->is_front_buffer_reading = mode == GL_FRONT_LEFT || mode == GL_FRONT; @@ -89,7 +87,7 @@ intelReadBuffer(struct gl_context * ctx, GLenum mode) * (including the fake front) before we start reading again. */ if (!was_front_buffer_reading && brw->is_front_buffer_reading) - dri2InvalidateDrawable(intel->driContext->driReadablePriv); + dri2InvalidateDrawable(brw->driContext->driReadablePriv); } } diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index 10daa58..9ba6d6c 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -129,7 +129,7 @@ intel_flush_front(struct gl_context *ctx) { struct brw_context *brw = brw_context(ctx); struct intel_context *intel = intel_context(ctx); - __DRIcontext *driContext = intel->driContext; + __DRIcontext *driContext = brw->driContext; __DRIdrawable *driDrawable = driContext->driDrawablePriv; __DRIscreen *const screen = intel->intelScreen->driScrnPriv; @@ -243,8 +243,7 @@ intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable) void intel_prepare_render(struct brw_context *brw) { - struct intel_context *intel = &brw->intel; - __DRIcontext *driContext = intel->driContext; + __DRIcontext *driContext = brw->driContext; __DRIdrawable *drawable; drawable = driContext->driDrawablePriv; @@ -474,7 +473,7 @@ intelInitContext(struct brw_context *brw, } driContextPriv->driverPrivate = intel; - intel->driContext = driContextPriv; + brw->driContext = driContextPriv; intel->driFd = sPriv->fd; intel->gen = intelScreen->gen; diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i965/intel_context.h index 2894eea..a8530e5 100644 --- a/src/mesa/drivers/dri/i965/intel_context.h +++ b/src/mesa/drivers/dri/i965/intel_context.h @@ -129,7 +129,6 @@ struct intel_context int driFd; - __DRIcontext *driContext; struct intel_screen *intelScreen; };