Do not query non-existent texture level in TEXTURE_FIXED_SAMPLE_LOCATIONS test.
authorJarkko Pöyry <jpoyry@google.com>
Tue, 3 Mar 2015 20:15:21 +0000 (12:15 -0800)
committerJarkko Pöyry <jpoyry@google.com>
Tue, 3 Mar 2015 20:15:21 +0000 (12:15 -0800)
Bug: 19578475
Change-Id: I657dd59e667d8948151dbf1c08bf7f4f535ca992

modules/gles31/functional/es31fTextureLevelStateQueryTests.cpp

index 0b9d0a2..f5924ee 100644 (file)
@@ -1030,7 +1030,7 @@ public:
 private:
        bool checkTextureState (glu::CallLogWrapper& gl, const TextureGenerationSpec& spec)
        {
-               const int queryLevel    = 0;
+               const int queryLevel    = (spec.levels.empty()) ? (0) : (spec.levels[0].level);
                const int refValue              = (spec.levels.empty()) ? (1) : ((spec.fixedSamplePos) ? (1) : (0));
 
                return verifyTextureLevelParameterEqual(gl, spec.queryTarget, queryLevel, GL_TEXTURE_FIXED_SAMPLE_LOCATIONS, refValue, m_type);