diff options
author | Eric Anholt <[email protected]> | 2013-05-10 11:51:01 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-05-17 13:04:05 -0700 |
commit | e98c39c109f9b38d6bb97e3890382fdf66c25176 (patch) | |
tree | 3f51aa191af6052243787b0b10e1a4d581a64583 /src/mesa/state_tracker/st_cb_fbo.c | |
parent | 7b085d1bfa7630571e04a7d630765d3e5ed63e25 (diff) |
mesa: Track the TexImage being rendered to in the gl_renderbuffer.
We keep having to pass the attachments around with our gl_renderbuffers
because that's the only way to find what the gl_renderbuffer actually
refers to. This is a step toward removing that (though drivers still need
the Zoffset as well).
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_fbo.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_fbo.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index aa245d3fc0e..db4728b3237 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -394,7 +394,6 @@ st_render_texture(struct gl_context *ctx, struct st_renderbuffer *strb = st_renderbuffer(rb); struct pipe_resource *pt; struct st_texture_object *stObj; - const struct gl_texture_image *texImage; struct pipe_surface surf_tmpl; if (!st_finalize_texture(ctx, pipe, att->Texture)) @@ -403,9 +402,6 @@ st_render_texture(struct gl_context *ctx, pt = st_get_texobj_resource(att->Texture); assert(pt); - /* get pointer to texture image we're rendeing to */ - texImage = _mesa_get_attachment_teximage(att); - /* get the texture for the texture object */ stObj = st_texture_object(att->Texture); @@ -503,7 +499,7 @@ st_validate_attachment(struct gl_context *ctx, return GL_FALSE; format = stObj->pt->format; - texFormat = _mesa_get_attachment_teximage_const(att)->TexFormat; + texFormat = att->Renderbuffer->TexImage->TexFormat; /* If the encoding is sRGB and sRGB rendering cannot be enabled, * check for linear format support instead. |