diff options
author | Eric Anholt <[email protected]> | 2013-05-10 12:17:52 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-05-17 13:04:05 -0700 |
commit | a5b0452400dd6c2fd2a0921584f6fcee915a8b62 (patch) | |
tree | c5fcb6595066e70304bd2c32349947b0bbe7b5c8 | |
parent | e98c39c109f9b38d6bb97e3890382fdf66c25176 (diff) |
mesa: Make FinishRenderTexture just take the renderbuffer being finished.
Now that the rb has a reference to the teximage, we didn't need anything
else out of the attachment.
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_fbo.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_fbo.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_fbo.c | 5 | ||||
-rw-r--r-- | src/mesa/main/dd.h | 2 | ||||
-rw-r--r-- | src/mesa/main/fbobject.c | 6 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_fbo.c | 5 | ||||
-rw-r--r-- | src/mesa/swrast/s_texrender.c | 4 | ||||
-rw-r--r-- | src/mesa/swrast/swrast.h | 2 |
8 files changed, 14 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index bf8e48d779b..69f862930d6 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -617,11 +617,9 @@ intel_render_texture(struct gl_context * ctx, * Called by Mesa when rendering to a texture is done. */ static void -intel_finish_render_texture(struct gl_context * ctx, - struct gl_renderbuffer_attachment *att) +intel_finish_render_texture(struct gl_context * ctx, struct gl_renderbuffer *rb) { struct intel_context *intel = intel_context(ctx); - struct gl_renderbuffer *rb = att->Renderbuffer; DBG("Finish render %s texture\n", _mesa_get_format_name(rb->Format)); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c index f997ac888f9..25543e458b4 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c @@ -263,9 +263,9 @@ nouveau_render_texture(struct gl_context *ctx, struct gl_framebuffer *fb, static void nouveau_finish_render_texture(struct gl_context *ctx, - struct gl_renderbuffer_attachment *att) + struct gl_renderbuffer *rb) { - texture_dirty(att->Texture); + texture_dirty(rb->TexImage->TexObject); } void diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c index 1fdcf056562..63bc7e8ab64 100644 --- a/src/mesa/drivers/dri/radeon/radeon_fbo.c +++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c @@ -850,10 +850,9 @@ radeon_render_texture(struct gl_context * ctx, } static void -radeon_finish_render_texture(struct gl_context * ctx, - struct gl_renderbuffer_attachment *att) +radeon_finish_render_texture(struct gl_context *ctx, struct gl_renderbuffer *rb) { - struct gl_texture_image *image = att->Renderbuffer->TexImage; + struct gl_texture_image *image = rb->TexImage; radeon_texture_image *radeon_image = (radeon_texture_image *)image; if (radeon_image) diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index adace3b70a9..13c7a83d4bb 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -625,7 +625,7 @@ struct dd_function_table { struct gl_framebuffer *fb, struct gl_renderbuffer_attachment *att); void (*FinishRenderTexture)(struct gl_context *ctx, - struct gl_renderbuffer_attachment *att); + struct gl_renderbuffer *rb); void (*ValidateFramebuffer)(struct gl_context *ctx, struct gl_framebuffer *fb); /*@}*/ diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 070fb8c5356..7c134212c91 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -327,7 +327,7 @@ _mesa_remove_attachment(struct gl_context *ctx, /* tell driver that we're done rendering to this texture. */ if (rb && rb->NeedsFinishRenderTexture) - ctx->Driver.FinishRenderTexture(ctx, att); + ctx->Driver.FinishRenderTexture(ctx, rb); if (att->Type == GL_TEXTURE) { ASSERT(att->Texture); @@ -410,7 +410,7 @@ _mesa_set_texture_attachment(struct gl_context *ctx, struct gl_renderbuffer *rb = att->Renderbuffer; if (rb && rb->NeedsFinishRenderTexture) - ctx->Driver.FinishRenderTexture(ctx, att); + ctx->Driver.FinishRenderTexture(ctx, rb); if (att->Texture == texObj) { /* re-attaching same texture */ @@ -1886,7 +1886,7 @@ check_end_texture_render(struct gl_context *ctx, struct gl_framebuffer *fb) struct gl_renderbuffer_attachment *att = fb->Attachment + i; struct gl_renderbuffer *rb = att->Renderbuffer; if (rb && rb->NeedsFinishRenderTexture) { - ctx->Driver.FinishRenderTexture(ctx, att); + ctx->Driver.FinishRenderTexture(ctx, rb); } } } diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index db4728b3237..826722be862 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -449,10 +449,9 @@ st_render_texture(struct gl_context *ctx, * Called via ctx->Driver.FinishRenderTexture. */ static void -st_finish_render_texture(struct gl_context *ctx, - struct gl_renderbuffer_attachment *att) +st_finish_render_texture(struct gl_context *ctx, struct gl_renderbuffer *rb) { - struct st_renderbuffer *strb = st_renderbuffer(att->Renderbuffer); + struct st_renderbuffer *strb = st_renderbuffer(rb); if (!strb) return; diff --git a/src/mesa/swrast/s_texrender.c b/src/mesa/swrast/s_texrender.c index 643f2bc2c24..751d7767b91 100644 --- a/src/mesa/swrast/s_texrender.c +++ b/src/mesa/swrast/s_texrender.c @@ -92,12 +92,12 @@ _swrast_render_texture(struct gl_context *ctx, void _swrast_finish_render_texture(struct gl_context *ctx, - struct gl_renderbuffer_attachment *att) + struct gl_renderbuffer *rb) { /* do nothing */ /* The renderbuffer texture wrapper will get deleted by the * normal mechanism for deleting renderbuffers. */ (void) ctx; - (void) att; + (void) rb; } diff --git a/src/mesa/swrast/swrast.h b/src/mesa/swrast/swrast.h index e437c0a2459..359a985fdea 100644 --- a/src/mesa/swrast/swrast.h +++ b/src/mesa/swrast/swrast.h @@ -270,7 +270,7 @@ _swrast_render_texture(struct gl_context *ctx, extern void _swrast_finish_render_texture(struct gl_context *ctx, - struct gl_renderbuffer_attachment *att); + struct gl_renderbuffer *rb); /** |