diff options
author | Eric Anholt <[email protected]> | 2013-05-10 12:36:43 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-05-17 13:04:04 -0700 |
commit | c810e67c55a8a2965b730317873fbdcc186a7514 (patch) | |
tree | d8fc5963c608f2cdcc9adcf348075f469a37fc4d /src/mesa/drivers/dri/radeon | |
parent | 6166ffeaf70e96e3f94417f8db79ba2440462178 (diff) |
mesa: Make gl_renderbuffers backed by EGL images use FinishRenderTexture.
This is the opportunity that radeon and intel drivers rely on for flushing
render targets that may get reused as textures. Before EGL, that only
happened for GL_TEXTURE attachments.
Fixes piglits:
KHR_gl_renderbuffer_image/renderbuffer-texture
OES_EGL_image/renderbuffer-texture
NOTE: This is a candidate for the 9.1 branch.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_fbo.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c index 5f996c52b67..e546a6b365c 100644 --- a/src/mesa/drivers/dri/radeon/radeon_fbo.c +++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c @@ -597,6 +597,7 @@ radeon_image_target_renderbuffer_storage(struct gl_context *ctx, rb->Format = image->format; rb->_BaseFormat = _mesa_base_fbo_format(&radeon->glCtx, image->internal_format); + rb->NeedsFinishRenderTexture = GL_TRUE; } /** @@ -883,10 +884,11 @@ radeon_finish_render_texture(struct gl_context * ctx, struct gl_renderbuffer_attachment *att) { struct gl_texture_object *tex_obj = att->Texture; - struct gl_texture_image *image = - tex_obj->Image[att->CubeMapFace][att->TextureLevel]; - radeon_texture_image *radeon_image = (radeon_texture_image *)image; - + radeon_texture_image *radeon_image = NULL; + + if (tex_obj) + radeon_image = (radeon_texture_image *)_mesa_get_attachment_teximage(att); + if (radeon_image) radeon_image->used_as_render_target = GL_FALSE; |