[Mesa-dev] [PATCH] intel: Fix render-to-texture in non-FinishRenderTexture cases.

Eric Anholt eric at anholt.net
Wed May 8 09:59:01 PDT 2013


Ian Romanick <idr at freedesktop.org> writes:

> On 05/07/2013 03:53 PM, Eric Anholt wrote:
>> With EGL_KHR_gl_renderbuffer_iamge, we have the ability to render to
>                                 ^^^^^
> image
>
>> renderbuffers that are also textures, so the core Mesa FinishRenderTexture
>> hook doesn't get called.  That hook also wasn't called in various cases
>> within the driver where we'd update texture contents using the render
>> cache (like glCopyTexSubImage) that resulted in
>> intel_batchbuffer_emit_mi_flush().
>>
>> To fix it, track a set of rendered-to BOs in our context, which is
>> cleared at batch wrap or emit_mi_flush time, and do an emit_mi_flush if
>> one of our textures is in that set.
>
> That sounds like an optimal (if complex) solution for the EGLimage. 
> When Ken described the bug to me, I was envisioning a simpler fix:  if a 
> renderbuffer is attached to an EGLimage, use FinishRenderTexture.  Out 
> of curiosity, do you think that would have also worked?  It seems like 
> that would be cheaper in the non-EGLimage case, though it doesn't sound 
> like it matters.

When would you do that?  After every draw call?  There's no signal that
"now's the time it's going to be used as a texture".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130508/cad90086/attachment.pgp>


More information about the mesa-dev mailing list