Fix sample_mask_in.bit_count_per_two_samples tests for 2x MSAA.
The dEQP-GLES31.functional.shaders.sample_variables.sample_mask_in.
bit_count_per_two_samples.multisample_{texture,renderbuffer}_{1,2}
tests report:
Verifying gl_SampleMaskIn.
Fragment shader may be invoked [ceil(numSamples/2), numSamples] times.
=> gl_SampleMaskIn should have the number of bits set in range
[1, numSamples - ceil(numSamples/2) + 1]:
which suggests that maxBitCount should be ceil(2/2) + 1 = 1 + 1 = 2.
However, it then says:
Setting minBitCount = 1, maxBitCount = 1.
Having two bits should be acceptable for 2x MSAA.
This patch drops the special case for 1x/2x MSAA, making them work
like all the other MSAA levels.
Change-Id: Ie615c82150588dab53226dc46670182a29d85ef5
(cherry picked from commit 724519b8fda9c2a92d646c3dfd1478e0daa282e9)
(cherry picked from commit ea5589c748c0f399e478a570f9cc3c063fe55bf1)
diff --git a/modules/gles31/functional/es31fSampleVariableTests.cpp b/modules/gles31/functional/es31fSampleVariableTests.cpp
index bfd04e5..0570508 100644
--- a/modules/gles31/functional/es31fSampleVariableTests.cpp
+++ b/modules/gles31/functional/es31fSampleVariableTests.cpp
@@ -1340,7 +1340,7 @@
// Worst case: all but one shader invocations get one sample, one shader invocation the rest of the samples
const int minInvocationCount = ((m_numTargetSamples + 1) / 2);
const int minBitCount = 1;
- const int maxBitCount = (m_numTargetSamples <= 2) ? (1) : (m_numTargetSamples - ((minInvocationCount-1) * minBitCount));
+ const int maxBitCount = m_numTargetSamples - ((minInvocationCount-1) * minBitCount);
if (maxLoc == -1)
throw tcu::TestError("Location of u_maxBitCount was -1");