From: Corentin Noël Date: Fri, 27 Aug 2021 12:03:34 +0000 (+0200) Subject: gl4cMapBufferAlignmentTests: ensure that the GL_ARB_buffer_storage extension is present X-Git-Tag: upstream/1.3.5~442 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f736452c4cc042174df69b48a4bb5cbc5d71e2f2;p=platform%2Fupstream%2FVK-GL-CTS.git gl4cMapBufferAlignmentTests: ensure that the GL_ARB_buffer_storage extension is present This make sure that we won't call gl.bufferStorage if this isn't possible. Affects: KHR-GL43.map_buffer_alignment.functional Components: OpenGL Signed-off-by: Corentin Noël Change-Id: Icdcfeba5144543ee3d8c762618ff1b7d8752f502 --- diff --git a/external/openglcts/modules/gl/gl4cMapBufferAlignmentTests.cpp b/external/openglcts/modules/gl/gl4cMapBufferAlignmentTests.cpp index 88d950c..0f22393 100644 --- a/external/openglcts/modules/gl/gl4cMapBufferAlignmentTests.cpp +++ b/external/openglcts/modules/gl/gl4cMapBufferAlignmentTests.cpp @@ -28,6 +28,7 @@ #include "gl4cMapBufferAlignmentTests.hpp" +#include "gluContextInfo.hpp" #include "gluDefs.hpp" #include "glwEnums.hpp" #include "glwFunctions.hpp" @@ -104,6 +105,7 @@ public: /* Nothing to be done */ } + void init(); /** Execute test * * @return tcu::TestNode::STOP @@ -150,6 +152,14 @@ struct BufferEnums GLenum m_max_size; }; +void Functional::init(void) +{ + if (!m_context.getContextInfo().isExtensionSupported("GL_ARB_buffer_storage")) + { + TCU_THROW(NotSupportedError, "GL_ARB_buffer_storage not supported"); + } +} + /** Execute test * * @return tcu::TestNode::STOP