Skip to content

Commit

Permalink
Fix stencil+MSAA
Browse files Browse the repository at this point in the history
True integer types don't support MSAA, so the blitter never had support
for MSAA on true integer types. In Vulkan, VK_FORMAT_S8_UINT is a UINT
format, so it's considered a true integer type, but it must still support
MSAA.

Added support for MSAA on true integer types in the blitter so fix all
related tests with SwANGLE:
dEQP-GLES3.functional.depth_stencil_clear.*
dEQP-GLES3.functional.fragment_ops.*
dEQP-GLES3.functional.rasterizer_discard.*

Bug: angleproject:4044
Change-Id: I8e04f434f0f671999aaef23cf24cc6684fd0fc16
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/37548
Presubmit-Ready: Alexis Hétu <sugoi@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
  • Loading branch information
sugoi1 committed Oct 24, 2019
1 parent 09b5079 commit f8df30f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/Device/Blitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,12 @@ namespace sw

if(hasConstantColorI)
{
write(constantColorI, d, state);
for(int s = 0; s < state.destSamples; s++)
{
write(constantColorI, d, state);

d += *Pointer<Int>(blit + OFFSET(BlitData, dSliceB));
}
}
else if(hasConstantColorF)
{
Expand All @@ -1479,7 +1484,12 @@ namespace sw

// When both formats are true integer types, we don't go to float to avoid losing precision
Int4 color = readInt4(s, state);
write(color, d, state);
for(int s = 0; s < state.destSamples; s++)
{
write(color, d, state);

d += *Pointer<Int>(blit + OFFSET(BlitData,dSliceB));
}
}
else
{
Expand Down

0 comments on commit f8df30f

Please sign in to comment.