Skip to content

anv: Implement more conservative rasterization features

We can implement under-estimation and FullyCoveredEXT with a little shader magic. For under-estimation, we insert a discard at the top of the shader which discards if we aren't fully covered. This isn't as efficient as it would be if the hardware could do this for us but it's pretty easy to make work.

For FullyCoveredEXT, we smash inner coverage on and compare the coverage mask with the full sample mask. Then, because we just stomped inner coverage we have to fix up gl_SampleMaskIn.

While I'm pretty sure this MR should work, there are zero tests in the CTS for built-ins in combination with conservative rasterization. I've filed a CTS issue (Khronos internal 2868). We shouldn't land this until tests exist.

Merge request reports