hasvk: Black pixels with 8xMSAA and fast clears on Intel(R) HD Graphics 4400 (HSW GT2)
When rendering a triangle on a fast-cleared 8x multisampled texture with sample shading disabled, the triangle has black pixels around itself when reading the texture. I created a test program for showcasing this issue. The generated image looks like this when resolved:
Green is the clear color. The white triangle is rendered with sample shading, but it doesn't affect this image. On the other hand, when reading sample 0 of all pixels in the image, it looks like this:
The red triangle has black pixels around it, and the white triangle would if it didn't use sample shading. This is pretty weird because the implementation of vkCmdResolveImage
basically uses texelFetch
just like the test program. Furthermore, when we read sample 0 of all pixels in a copy of the image, it looks like this:
The black pixels are gone.
This issue only occurs when using a fast clear, so it can be solved by disabling nonzero fast clears on 8x multisampled surfaces, but I want to investigate this a bit further before doing that.