aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/intel_tex.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-07-02 23:17:14 -0700
committerKenneth Graunke <[email protected]>2013-07-09 14:08:53 -0700
commitca437579b3974b91a5298707c459908a628c1098 (patch)
tree294ac2ad5aa080554c23ebb79552e50b23fbcf31 /src/mesa/drivers/dri/i965/intel_tex.c
parent86f2711722dc10c25c2fabc09d8bd020a1ba6029 (diff)
i965: Pass brw_context to functions rather than intel_context.
This makes brw_context available in every function that used intel_context. This makes it possible to start migrating fields from intel_context to brw_context. Surprisingly, this actually removes some code, as functions that use OUT_BATCH don't need to declare "intel"; they just use "brw." 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/mesa/drivers/dri/i965/intel_tex.c')
-rw-r--r--src/mesa/drivers/dri/i965/intel_tex.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tex.c b/src/mesa/drivers/dri/i965/intel_tex.c
index 8d077188117..df128e7a759 100644
--- a/src/mesa/drivers/dri/i965/intel_tex.c
+++ b/src/mesa/drivers/dri/i965/intel_tex.c
@@ -60,6 +60,7 @@ static GLboolean
intel_alloc_texture_image_buffer(struct gl_context *ctx,
struct gl_texture_image *image)
{
+ struct brw_context *brw = brw_context(ctx);
struct intel_context *intel = intel_context(ctx);
struct intel_texture_image *intel_image = intel_texture_image(image);
struct gl_texture_object *texobj = image->TexObject;
@@ -90,7 +91,7 @@ intel_alloc_texture_image_buffer(struct gl_context *ctx,
__FUNCTION__, texobj, image->Level,
image->Width, image->Height, image->Depth, intel_texobj->mt);
} else {
- intel_image->mt = intel_miptree_create_for_teximage(intel, intel_texobj,
+ intel_image->mt = intel_miptree_create_for_teximage(brw, intel_texobj,
intel_image,
false);
@@ -140,7 +141,7 @@ intel_map_texture_image(struct gl_context *ctx,
GLubyte **map,
GLint *stride)
{
- struct intel_context *intel = intel_context(ctx);
+ struct brw_context *brw = brw_context(ctx);
struct intel_texture_image *intel_image = intel_texture_image(tex_image);
struct intel_mipmap_tree *mt = intel_image->mt;
@@ -157,7 +158,7 @@ intel_map_texture_image(struct gl_context *ctx,
if (tex_image->TexObject->Target == GL_TEXTURE_CUBE_MAP)
slice = tex_image->Face;
- intel_miptree_map(intel, mt, tex_image->Level, slice, x, y, w, h, mode,
+ intel_miptree_map(brw, mt, tex_image->Level, slice, x, y, w, h, mode,
(void **)map, stride);
}
@@ -165,14 +166,14 @@ static void
intel_unmap_texture_image(struct gl_context *ctx,
struct gl_texture_image *tex_image, GLuint slice)
{
- struct intel_context *intel = intel_context(ctx);
+ struct brw_context *brw = brw_context(ctx);
struct intel_texture_image *intel_image = intel_texture_image(tex_image);
struct intel_mipmap_tree *mt = intel_image->mt;
if (tex_image->TexObject->Target == GL_TEXTURE_CUBE_MAP)
slice = tex_image->Face;
- intel_miptree_unmap(intel, mt, tex_image->Level, slice);
+ intel_miptree_unmap(brw, mt, tex_image->Level, slice);
}
void