From: Jarkko Pöyry Date: Tue, 3 Mar 2015 20:15:21 +0000 (-0800) Subject: Do not query non-existent texture level in TEXTURE_FIXED_SAMPLE_LOCATIONS test. X-Git-Tag: upstream/0.1.0~1922^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a3ca3ec3be857645c3811984738ffe92941bf7d8;p=platform%2Fupstream%2FVK-GL-CTS.git Do not query non-existent texture level in TEXTURE_FIXED_SAMPLE_LOCATIONS test. Bug: 19578475 Change-Id: I657dd59e667d8948151dbf1c08bf7f4f535ca992 --- diff --git a/modules/gles31/functional/es31fTextureLevelStateQueryTests.cpp b/modules/gles31/functional/es31fTextureLevelStateQueryTests.cpp index 0b9d0a231..f5924ee19 100644 --- a/modules/gles31/functional/es31fTextureLevelStateQueryTests.cpp +++ b/modules/gles31/functional/es31fTextureLevelStateQueryTests.cpp @@ -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);