[Mesa-dev] [PATCH] intel: Fix render-to-texture in non-FinishRenderTexture cases.
Kenneth Graunke
kenneth at whitecape.org
Thu May 9 11:13:46 PDT 2013
On 05/07/2013 03:53 PM, Eric Anholt wrote:
> With EGL_KHR_gl_renderbuffer_iamge, we have the ability to render to
> 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.
>
> This change doesn't turn the other emit_mi_flushes (such as intel_blit.c
> operations) into render_cache_set operations yet, as that would increase the
> size of our set and we expect that those operations get immediately flushed
> anyway.
>
> No statistically significant performance difference in cairo-gl (n=53/54, slow
> turbo outliers removed), despite spending ~1% CPU in these set operations.
>
> Fixes piglit EGL_KHR_gl_renderbuffer_image/renderbuffer-texture.
Fixes es3conform's egl_image test.
Tested-by: Kenneth Graunke <kenneth at whitecape.org>
More information about the mesa-dev
mailing list