From: Karol Herbst Date: Mon, 27 Apr 2020 11:07:17 +0000 (+0200) Subject: glspirv: don't cause aborted test runs. X-Git-Tag: upstream/1.3.5~852^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a54f2f6f542fa1c78b932627c6a8fac1f6e7e147;p=platform%2Fupstream%2FVK-GL-CTS.git glspirv: don't cause aborted test runs. These test also need checks in their deinit, and one missing init function. Components: OpenGL VK-GL-CTS Issue: 2498 Affects: KHR-GL45.gl_spirv.spirv_glsl_to_spirv* Change-Id: I374c0980f68daf418c15b03625e12d4e78271076 --- diff --git a/external/openglcts/modules/gl/gl4cGlSpirvTests.cpp b/external/openglcts/modules/gl/gl4cGlSpirvTests.cpp index 7b6679c72..85806e9d0 100644 --- a/external/openglcts/modules/gl/gl4cGlSpirvTests.cpp +++ b/external/openglcts/modules/gl/gl4cGlSpirvTests.cpp @@ -622,6 +622,8 @@ void SpirvModulesPositiveTest::init() /** Stub de-init method */ void SpirvModulesPositiveTest::deinit() { + if (!m_context.getContextInfo().isExtensionSupported("GL_ARB_gl_spirv")) + return; const Functions& gl = m_context.getRenderContext().getFunctions(); if (m_fbo) @@ -796,6 +798,9 @@ SpirvShaderBinaryMultipleShaderObjectsTest::SpirvShaderBinaryMultipleShaderObjec /** Stub init method */ void SpirvShaderBinaryMultipleShaderObjectsTest::init() { + if (!m_context.getContextInfo().isExtensionSupported("GL_ARB_gl_spirv")) + TCU_THROW(NotSupportedError, "GL_ARB_gl_spirv is not supported"); + m_spirv = "OpCapability Shader\n" "%1 = OpExtInstImport \"GLSL.std.450\"\n" "OpMemoryModel Logical GLSL450\n" @@ -1226,6 +1231,9 @@ void SpirvModulesErrorVerificationTest::init() /** Stub de-init method */ void SpirvModulesErrorVerificationTest::deinit() { + if (!m_context.getContextInfo().isExtensionSupported("GL_ARB_gl_spirv")) + return; + const Functions& gl = m_context.getRenderContext().getFunctions(); gl.deleteTextures(1, &m_textureId); @@ -2378,6 +2386,8 @@ void SpirvGlslToSpirVSpecializationConstantsTest::init() /** Stub de-init method */ void SpirvGlslToSpirVSpecializationConstantsTest::deinit() { + if (!m_context.getContextInfo().isExtensionSupported("GL_ARB_gl_spirv")) + return; const Functions& gl = m_context.getRenderContext().getFunctions(); if (m_fbo)