From b26bba4ca4bef013a48a683507a7617755e7b861 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sun, 4 Sep 2016 00:34:47 -0700 Subject: [PATCH] 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) --- modules/gles31/functional/es31fSampleVariableTests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ void SampleMaskCountCase::preDraw (void) // 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"); -- 2.7.4