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 <kenneth@whitecape.org>
This commit is contained in:
parent
e98c39c109
commit
a5b0452400
|
@ -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));
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
/*@}*/
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue