summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-07-04 10:30:01 -0700
committerKenneth Graunke <[email protected]>2013-07-09 14:09:20 -0700
commita1d94cdb00b66a283a6098dd0dbfe6d23d7ab7b5 (patch)
treeaaf7ee8699bac6cb2776e73400884f9759046a76 /src
parenta9d33dbbdd0d58240e9c15181237a9ac7f99932d (diff)
i965: Move intel_context::driContext to brw_context.
Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h2
-rw-r--r--src/mesa/drivers/dri/i965/intel_buffers.c6
-rw-r--r--src/mesa/drivers/dri/i965/intel_context.c7
-rw-r--r--src/mesa/drivers/dri/i965/intel_context.h1
4 files changed, 7 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 27554cb8b66..69a3e03dbaf 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 a89c902b07b..b5fb33831f3 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 10daa58db09..9ba6d6ca80e 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 2894eea881d..a8530e5cb92 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;
};