[Mesa-dev] [PATCH 3/3] i965/gen4: Add support for single layer in alignment workaround

Matt Turner mattst88 at gmail.com
Wed Jun 14 01:49:55 UTC 2017


On Fri, Jun 9, 2017 at 7:04 AM, Topi Pohjolainen
<topi.pohjolainen at gmail.com> wrote:
> On gen < 6 one doesn't have level or layer specifiers available
> for render and depth targets. In order to support rendering to
> specific level/layer, driver needs to manually offset the surface
> to the desired slice.
> There are, however, alignment restrictions to respect as well and
> in come cases the only option is to use temporary single slice
> surface which driver copies after rendering to the full miptree.
>
> Current alignment workaround introduces new texture images which
> are added to the parent texture object. Texture validation later
> on copies the additional levels back to the surface that contains
> the full mipmap.
> This only works for non-arrayed surfaces and driver currently
> creates new arrayed images in vain - individual layers within the
> newly created are still unaligned the same as before.
>
> This patch drops this mechanism and instead attaches single
> temporary slice into the render buffer. This gets immediately
> copied back to the mipmapped and/or arrayed surface just after
> the render is done.
>
> Sitting on top of earlier series cleaning up the depth buffer
> state, this patch additionally fixes the following piglit tests:
>
>     ext_texture_array.copyteximage 2d_array.g45m64
>     ext_texture_array.copyteximage 1d_array.g45m64
>     arb_framebuffer_object.fbo-blit-stretch.g33m64
>     ext_framebuffer_object.fbo-cubemap.g965m64
>     arb_framebuffer_object.fbo-generatemipmap-cubemap.g965m64
>     arb_texture_cube_map.copyteximage cube.g965m64
>     ext_texture_array.copyteximage 1d_array.g965m64
>     ext_texture_array.copyteximage 2d_array.g965m64
>     ext_texture_array.fbo-array.g965m64
>     ext_texture_array.gen-mipmap.g965m64
>     ext_texture_array.fbo-generatemipmap-array.g965m64
>     arb_pixel_buffer_object.texsubimage array pbo.g965m64
>     ext_texture_array.copyteximage 2d_array.ilkm64
>     ext_texture_array.copyteximage 1d_array.ilkm64
>     arb_texture_cube_map.copyteximage cube.ilkm64

Thank you for listing the fixed tests. Please run sort on the list to
make it easier to read.


More information about the mesa-dev mailing list