diff options
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_screen.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_screen.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index 252d356c187..c122c46221e 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -157,14 +157,15 @@ intelDRI2Flush(__DRIdrawable *drawable) { GET_CURRENT_CONTEXT(ctx); struct intel_context *intel = intel_context(ctx); + struct brw_context *brw = brw_context(ctx); if (intel == NULL) return; - intel_resolve_for_dri2_flush(intel, drawable); + intel_resolve_for_dri2_flush(brw, drawable); intel->need_throttle = true; if (intel->batch.used) - intel_batchbuffer_flush(intel); + intel_batchbuffer_flush(brw); if (INTEL_DEBUG & DEBUG_AUB) { aub_dump_bmp(ctx); @@ -283,14 +284,14 @@ intel_allocate_image(int dri_format, void *loaderPrivate) * Sets up a DRIImage structure to point to our shared image in a region */ static void -intel_setup_image_from_mipmap_tree(struct intel_context *intel, __DRIimage *image, +intel_setup_image_from_mipmap_tree(struct brw_context *brw, __DRIimage *image, struct intel_mipmap_tree *mt, GLuint level, GLuint zoffset) { unsigned int draw_x, draw_y; uint32_t mask_x, mask_y; - intel_miptree_make_shareable(intel, mt); + intel_miptree_make_shareable(brw, mt); intel_miptree_check_level_layer(mt, level, zoffset); @@ -376,19 +377,19 @@ intel_create_image_from_renderbuffer(__DRIcontext *context, int renderbuffer, void *loaderPrivate) { __DRIimage *image; - struct intel_context *intel = context->driverPrivate; + struct brw_context *brw = context->driverPrivate; + struct gl_context *ctx = &brw->intel.ctx; struct gl_renderbuffer *rb; struct intel_renderbuffer *irb; - rb = _mesa_lookup_renderbuffer(&intel->ctx, renderbuffer); + rb = _mesa_lookup_renderbuffer(ctx, renderbuffer); if (!rb) { - _mesa_error(&intel->ctx, - GL_INVALID_OPERATION, "glRenderbufferExternalMESA"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glRenderbufferExternalMESA"); return NULL; } irb = intel_renderbuffer(rb); - intel_miptree_make_shareable(intel, irb->mt); + intel_miptree_make_shareable(brw, irb->mt); image = calloc(1, sizeof *image); if (image == NULL) return NULL; @@ -414,7 +415,8 @@ intel_create_image_from_texture(__DRIcontext *context, int target, void *loaderPrivate) { __DRIimage *image; - struct intel_context *intel = context->driverPrivate; + struct brw_context *brw = context->driverPrivate; + struct intel_context *intel = &brw->intel; struct gl_texture_object *obj; struct intel_texture_object *iobj; GLuint face = 0; @@ -453,7 +455,7 @@ intel_create_image_from_texture(__DRIcontext *context, int target, image->internal_format = obj->Image[face][level]->InternalFormat; image->format = obj->Image[face][level]->TexFormat; image->data = loaderPrivate; - intel_setup_image_from_mipmap_tree(intel, image, iobj->mt, level, zoffset); + intel_setup_image_from_mipmap_tree(brw, image, iobj->mt, level, zoffset); image->dri_format = intel_dri_format(image->format); image->has_depthstencil = iobj->mt->stencil_mt? true : false; if (image->dri_format == MESA_FORMAT_NONE) { |