From: Slawomir Cygan Date: Thu, 1 Dec 2016 18:05:49 +0000 (+0100) Subject: GL44-CTS.khr_debug: do not call missing functions and properly create texture X-Git-Tag: upstream/0.1.0~547 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39a971aa5ea2d7b433750e502aa4e24bb617da57;p=platform%2Fupstream%2FVK-GL-CTS.git GL44-CTS.khr_debug: do not call missing functions and properly create texture glCreateBuffers was introduced by DSA in GL45, however this test can run also in GL44 mode. Do not call it. Additionaly add glBindTexture call before glIsTexture, so texture is properly created before check. Changed tests: GL44-CTS.khr_debug.* Components: OpenGL VK-GL-CTS Issue: 27 Change-Id: I8397bc10f64194cc7bce32f67260066b8101a3f6 --- diff --git a/external/openglcts/modules/gl/gl4cKHRDebugTests.cpp b/external/openglcts/modules/gl/gl4cKHRDebugTests.cpp index c58adf7..64e3531 100644 --- a/external/openglcts/modules/gl/gl4cKHRDebugTests.cpp +++ b/external/openglcts/modules/gl/gl4cKHRDebugTests.cpp @@ -519,6 +519,7 @@ tcu::TestNode::IterateResult APIErrorsTest::iterate() GLuint texture_id = 0; GLuint invalid_id = 1; m_gl->genTextures(1, &texture_id); + m_gl->bindTexture(GL_TEXTURE_2D, texture_id); GLU_EXPECT_NO_ERROR(m_gl->getError(), "GenTextures"); try @@ -874,12 +875,21 @@ tcu::TestNode::IterateResult LabelsTest::iterate() * * @return ID of created resource **/ -GLuint LabelsTest::createBuffer(const Functions* gl, const glu::RenderContext*) +GLuint LabelsTest::createBuffer(const Functions* gl, const glu::RenderContext* rc) { GLuint id = 0; - gl->createBuffers(1, &id); - GLU_EXPECT_NO_ERROR(gl->getError(), "CreateBuffers"); + if (glu::contextSupports(rc->getType(), glu::ApiType::core(4, 5))) + { + gl->createBuffers(1, &id); + GLU_EXPECT_NO_ERROR(gl->getError(), "CreateBuffers"); + } + else + { + gl->genBuffers(1, &id); + gl->bindBuffer(GL_ARRAY_BUFFER, id); + GLU_EXPECT_NO_ERROR(gl->getError(), "GenBuffers"); + } return id; }