summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2011-11-15 10:22:14 -0800
committerChad Versace <[email protected]>2011-11-22 10:35:42 -0800
commit3b38b33c1648b07e75dc4d8340758171e109c598 (patch)
treea60201d9ca920e1a0fa7730ed6b05361c2c296b9 /src
parent24da7335b22432ef4c2d57cab86e4b8fbe8733d5 (diff)
intel: Remove unneeded params from intel_renderbuffer_set_draw_offset()
Since the renderbuffer tracks the miptree level and layer that it wraps, the 'tex_image' and 'zoffset' params are no longer needed to calculate the draw offsets. Not only are they no longer needed, but their presence would prevent calculating the renderbuffer draw offsets in situations where there were no texture image. Such situations will occur during the HiZ meta-op and during scatter/gather of separate stencil textures. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c16
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.h4
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_image.c4
3 files changed, 10 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 252f2425f2a..dd7adfbb051 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -1045,17 +1045,15 @@ intel_wrap_texture(struct gl_context * ctx,
}
void
-intel_renderbuffer_set_draw_offset(struct intel_renderbuffer *irb,
- struct intel_texture_image *intel_image,
- int zoffset)
+intel_renderbuffer_set_draw_offset(struct intel_renderbuffer *irb)
{
unsigned int dst_x, dst_y;
/* compute offset of the particular 2D image within the texture region */
- intel_miptree_get_image_offset(intel_image->mt,
- intel_image->base.Base.Level,
- intel_image->base.Base.Face,
- zoffset,
+ intel_miptree_get_image_offset(irb->mt,
+ irb->mt_level,
+ 0, /* face, which we ignore */
+ irb->mt_layer,
&dst_x, &dst_y);
irb->draw_x = dst_x;
@@ -1164,7 +1162,7 @@ intel_render_texture(struct gl_context * ctx,
att->Texture->Name, image->Width, image->Height,
irb->Base.RefCount);
- intel_renderbuffer_set_draw_offset(irb, intel_image, att->Zoffset);
+ intel_renderbuffer_set_draw_offset(irb);
intel_image->used_as_render_target = true;
#ifndef I915
@@ -1190,7 +1188,7 @@ intel_render_texture(struct gl_context * ctx,
true);
intel_miptree_copy_teximage(intel, intel_image, new_mt);
- intel_renderbuffer_set_draw_offset(irb, intel_image, att->Zoffset);
+ intel_renderbuffer_set_draw_offset(irb);
intel_miptree_reference(&irb->mt, intel_image->mt);
intel_miptree_release(&new_mt);
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.h b/src/mesa/drivers/dri/intel/intel_fbo.h
index 3a213745e38..6da370dbd26 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.h
+++ b/src/mesa/drivers/dri/intel/intel_fbo.h
@@ -175,9 +175,7 @@ extern void
intel_flip_renderbuffers(struct gl_framebuffer *fb);
void
-intel_renderbuffer_set_draw_offset(struct intel_renderbuffer *irb,
- struct intel_texture_image *intel_image,
- int zoffset);
+intel_renderbuffer_set_draw_offset(struct intel_renderbuffer *irb);
uint32_t
intel_renderbuffer_tile_offsets(struct intel_renderbuffer *irb,
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index 90e409094d5..024490a4115 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -316,8 +316,8 @@ intel_tex_image_s8z24_create_renderbuffers(struct intel_context *intel,
return false;
}
- intel_renderbuffer_set_draw_offset(idrb, image, 0);
- intel_renderbuffer_set_draw_offset(isrb, image, 0);
+ intel_renderbuffer_set_draw_offset(idrb);
+ intel_renderbuffer_set_draw_offset(isrb);
_mesa_reference_renderbuffer(&image->depth_rb, drb);
_mesa_reference_renderbuffer(&image->stencil_rb, srb);