[Mesa-dev] [PATCH 0/5] i965: ASTC5x5 workaround

Rogovin, Kevin kevin.rogovin at intel.com
Fri Dec 1 19:13:21 UTC 2017


Hi,

 For ANV I do not know as I have not really poked into its code. For i965, this patch series handles the situation as to what to do if a draw of dispatch compute accesses both an ASTC5x5 texture and a texture with an auxiliary buffer. It does this by checking if there are both such textures and ASTC5x5 textures in the list of currently bound textures. If the answer is yes, then it resolves all such auxiliary requiring textures that use an auxiliary buffer so that the sampler does not need them when it reads from the surfaces. The resolve stuff is handled in the function brw_astc5x5_perform_wa(() in brw_context.c of the first patch, the checking is handled in the 3rd patch by modifying brw_tex_validate() in intel_tex_validate.c. The 4'th and 5'th patches are deceptively small since all they do is add a call to brw_astc5x5_perform_wa(() in brw_draw.c and brw_compute.c respectively. The 4th patch also has a small addition to prevent surface state for sampler state to have the auxiliary surface given in the call.

As to how to do similar auto-resolve and tweak of state on ANV, I need to dive quite deep into the code to see how to do it.

-Kevin

-----Original Message-----
From: Matt Turner [mailto:mattst88 at gmail.com] 
Sent: Friday, December 1, 2017 8:25 PM
To: Rogovin, Kevin <kevin.rogovin at intel.com>
Cc: Ilia Mirkin <imirkin at alum.mit.edu>; mesa-dev at lists.freedesktop.org
Subject: Re: [Mesa-dev] [PATCH 0/5] i965: ASTC5x5 workaround

On Fri, Dec 1, 2017 at 10:06 AM, Rogovin, Kevin <kevin.rogovin at intel.com> wrote:
> Hi,
>
>  Yes ANV will need something like this as well. If the GPU samples from both an ASTC5x5 texture and one with an aux buffer without a texture cache invalidate between such accesses, then the GPU hangs, which in turn makes the system unresponsive for a few seconds until the kernel resets the GPU; then an ioctl will fail in i965 which means things are very bad usually and (for me atleast on my system with how I build mesa) the application crashes.

I think his question is -- is there anything we can do about the case where a single shader program samples ASTC5x5 and a texture with an aux buffer? Presumably there's no way to invalidate the texture cache during a shader program, so what can you do?


More information about the mesa-dev mailing list