From: Courtney Goeltzenleuchter Date: Fri, 17 Aug 2018 13:55:58 +0000 (-0600) Subject: Rename CAPABILITY_CREATE_SURFACE_PLATFORM X-Git-Tag: upstream/1.3.5~2263 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c9e22d20a45f8f36f47e1d38e701b73f1c2f571;p=platform%2Fupstream%2FVK-GL-CTS.git Rename CAPABILITY_CREATE_SURFACE_PLATFORM Changing CAPABILITY_CREATE_SURFACE_PLATFORM to CAPABILITY_CREATE_SURFACE_PLATFORM_EXTENSION so that it better reflects that this is the extension capability being referred to not the EGL 1.5 capability (to be added in a separate CL). Affects: dEQP-EGL.functional.create_surface.* Components: Framework, AOSP VK-GL-CTS issue: 1178 Change-Id: I563b45931bfab116f0e718ec44fb6ee892cce5ce --- diff --git a/framework/egl/egluNativePixmap.cpp b/framework/egl/egluNativePixmap.cpp index 64b1195..1f7177f 100644 --- a/framework/egl/egluNativePixmap.cpp +++ b/framework/egl/egluNativePixmap.cpp @@ -41,10 +41,10 @@ EGLNativePixmapType NativePixmap::getLegacyNative (void) throw tcu::NotSupportedError("eglu::NativePixmap doesn't support eglCreatePixmapSurface()", DE_NULL, __FILE__, __LINE__); } -void* NativePixmap::getPlatformNative (void) +void* NativePixmap::getPlatformExtension (void) { - TCU_CHECK_INTERNAL((m_capabilities & CAPABILITY_CREATE_SURFACE_PLATFORM) == 0); - throw tcu::NotSupportedError("eglu::NativePixmap doesn't support eglCreatePlatformPixmapSurface()", DE_NULL, __FILE__, __LINE__); + TCU_CHECK_INTERNAL((m_capabilities & CAPABILITY_CREATE_SURFACE_PLATFORM_EXTENSION) == 0); + throw tcu::NotSupportedError("eglu::NativePixmap doesn't support eglCreatePlatformPixmapSurfaceEXT()", DE_NULL, __FILE__, __LINE__); } void NativePixmap::readPixels (tcu::TextureLevel*) diff --git a/framework/egl/egluNativePixmap.hpp b/framework/egl/egluNativePixmap.hpp index 8c8ac79..2d3e087 100644 --- a/framework/egl/egluNativePixmap.hpp +++ b/framework/egl/egluNativePixmap.hpp @@ -43,9 +43,9 @@ class NativePixmap public: enum Capability { - CAPABILITY_CREATE_SURFACE_LEGACY = (1<<0), //!< EGL surface can be created with eglCreatePixmapSurface() - CAPABILITY_CREATE_SURFACE_PLATFORM = (1<<1), //!< EGL surface can be created with eglCreatePlatformPixmapSurface() - CAPABILITY_READ_PIXELS = (1<<2) + CAPABILITY_CREATE_SURFACE_LEGACY = (1<<0), //!< EGL surface can be created with eglCreatePixmapSurface() + CAPABILITY_CREATE_SURFACE_PLATFORM_EXTENSION = (1<<1), //!< EGL surface can be created with eglCreatePlatformPixmapSurfaceEXT() + CAPABILITY_READ_PIXELS = (1<<2) }; virtual ~NativePixmap (void) {} @@ -54,7 +54,7 @@ public: virtual eglw::EGLNativePixmapType getLegacyNative (void); //! Return native pointer that can be used with eglCreatePlatformPixmapSurfaceEXT(). Default implementation throws tcu::NotSupportedError(). - virtual void* getPlatformNative (void); + virtual void* getPlatformExtension (void); // Read pixels from pixmap. Default implementation throws tcu::NotSupportedError() virtual void readPixels (tcu::TextureLevel* dst); diff --git a/framework/egl/egluNativeWindow.cpp b/framework/egl/egluNativeWindow.cpp index c564d9f..8ffa294 100644 --- a/framework/egl/egluNativeWindow.cpp +++ b/framework/egl/egluNativeWindow.cpp @@ -41,10 +41,10 @@ EGLNativeWindowType NativeWindow::getLegacyNative (void) throw tcu::NotSupportedError("eglu::NativeWindow doesn't support eglCreateWindowSurface()", DE_NULL, __FILE__, __LINE__); } -void* NativeWindow::getPlatformNative (void) +void* NativeWindow::getPlatformExtension (void) { - TCU_CHECK_INTERNAL((m_capabilities & CAPABILITY_CREATE_SURFACE_PLATFORM) == 0); - throw tcu::NotSupportedError("eglu::NativeWindow doesn't support eglCreatePlatformWindowSurface()", DE_NULL, __FILE__, __LINE__); + TCU_CHECK_INTERNAL((m_capabilities & CAPABILITY_CREATE_SURFACE_PLATFORM_EXTENSION) == 0); + throw tcu::NotSupportedError("eglu::NativeWindow doesn't support eglCreatePlatformWindowSurfaceEXT()", DE_NULL, __FILE__, __LINE__); } tcu::IVec2 NativeWindow::getSurfaceSize (void) const diff --git a/framework/egl/egluNativeWindow.hpp b/framework/egl/egluNativeWindow.hpp index e468a23..fbaf2c1 100644 --- a/framework/egl/egluNativeWindow.hpp +++ b/framework/egl/egluNativeWindow.hpp @@ -75,13 +75,13 @@ class NativeWindow public: enum Capability { - CAPABILITY_CREATE_SURFACE_LEGACY = (1<<0), //!< EGL surface can be created with eglCreateWindowSurface() - CAPABILITY_CREATE_SURFACE_PLATFORM = (1<<1), //!< EGL surface can be created with eglCreatePlatformWindowSurface() - CAPABILITY_GET_SURFACE_SIZE = (1<<2), - CAPABILITY_SET_SURFACE_SIZE = (1<<3), - CAPABILITY_GET_SCREEN_SIZE = (1<<4), - CAPABILITY_READ_SCREEN_PIXELS = (1<<5), - CAPABILITY_CHANGE_VISIBILITY = (1<<6) + CAPABILITY_CREATE_SURFACE_LEGACY = (1<<0), //!< EGL surface can be created with eglCreateWindowSurface() + CAPABILITY_CREATE_SURFACE_PLATFORM_EXTENSION = (1<<1), //!< EGL surface can be created with eglCreatePlatformWindowSurfaceEXT() + CAPABILITY_GET_SURFACE_SIZE = (1<<2), + CAPABILITY_SET_SURFACE_SIZE = (1<<3), + CAPABILITY_GET_SCREEN_SIZE = (1<<4), + CAPABILITY_READ_SCREEN_PIXELS = (1<<5), + CAPABILITY_CHANGE_VISIBILITY = (1<<6) }; virtual ~NativeWindow (void) {} @@ -89,8 +89,8 @@ public: //! Return EGLNativeWindowType that can be used with eglCreateWindowSurface(). Default implementation throws tcu::NotSupportedError(). virtual eglw::EGLNativeWindowType getLegacyNative (void); - //! Return native pointer that can be used with eglCreatePlatformWindowSurface(). Default implementation throws tcu::NotSupportedError(). - virtual void* getPlatformNative (void); + //! Return native pointer that can be used with eglCreatePlatformWindowSurfaceEXT(). Default implementation throws tcu::NotSupportedError(). + virtual void* getPlatformExtension (void); // Process window events. Defaults to dummy implementation, that does nothing. virtual void processEvents (void) {} diff --git a/framework/egl/egluUtil.cpp b/framework/egl/egluUtil.cpp index e7c13fb..8882097 100644 --- a/framework/egl/egluUtil.cpp +++ b/framework/egl/egluUtil.cpp @@ -284,15 +284,15 @@ void terminateDisplay(const Library& egl, EGLDisplay display) //! Create EGL window surface using eglCreateWindowSurface() or eglCreatePlatformWindowSurfaceEXT() EGLSurface createWindowSurface (NativeDisplay& nativeDisplay, NativeWindow& window, EGLDisplay display, EGLConfig config, const EGLAttrib* attribList) { - const Library& egl = nativeDisplay.getLibrary(); - const bool supportsLegacyCreate = (window.getCapabilities() & NativeWindow::CAPABILITY_CREATE_SURFACE_LEGACY) != 0; - const bool supportsPlatformCreate = (window.getCapabilities() & NativeWindow::CAPABILITY_CREATE_SURFACE_PLATFORM) != 0; - bool usePlatformExt = false; - EGLSurface surface = EGL_NO_SURFACE; + const Library& egl = nativeDisplay.getLibrary(); + const bool supportsLegacyCreate = (window.getCapabilities() & NativeWindow::CAPABILITY_CREATE_SURFACE_LEGACY) != 0; + const bool supportsPlatformCreateExtension = (window.getCapabilities() & NativeWindow::CAPABILITY_CREATE_SURFACE_PLATFORM_EXTENSION) != 0; + bool usePlatformExt = false; + EGLSurface surface = EGL_NO_SURFACE; - TCU_CHECK_INTERNAL(supportsLegacyCreate || supportsPlatformCreate); + TCU_CHECK_INTERNAL(supportsLegacyCreate || supportsPlatformCreateExtension); - if (supportsPlatformCreate) + if (supportsPlatformCreateExtension) { const vector platformExts = getClientExtensions(egl); usePlatformExt = de::contains(platformExts.begin(), platformExts.end(), string("EGL_EXT_platform_base")) && @@ -304,7 +304,7 @@ EGLSurface createWindowSurface (NativeDisplay& nativeDisplay, NativeWindow& wind { const vector legacyAttribs = toLegacyAttribList(attribList); - surface = egl.createPlatformWindowSurfaceEXT(display, config, window.getPlatformNative(), &legacyAttribs[0]); + surface = egl.createPlatformWindowSurfaceEXT(display, config, window.getPlatformExtension(), &legacyAttribs[0]); EGLU_CHECK_MSG(egl, "eglCreatePlatformWindowSurfaceEXT()"); TCU_CHECK(surface != EGL_NO_SURFACE); } @@ -325,15 +325,15 @@ EGLSurface createWindowSurface (NativeDisplay& nativeDisplay, NativeWindow& wind //! Create EGL pixmap surface using eglCreatePixmapSurface() or eglCreatePlatformPixmapSurfaceEXT() EGLSurface createPixmapSurface (NativeDisplay& nativeDisplay, NativePixmap& pixmap, EGLDisplay display, EGLConfig config, const EGLAttrib* attribList) { - const Library& egl = nativeDisplay.getLibrary(); - const bool supportsLegacyCreate = (pixmap.getCapabilities() & NativePixmap::CAPABILITY_CREATE_SURFACE_LEGACY) != 0; - const bool supportsPlatformCreate = (pixmap.getCapabilities() & NativePixmap::CAPABILITY_CREATE_SURFACE_PLATFORM) != 0; - bool usePlatformExt = false; - EGLSurface surface = EGL_NO_SURFACE; + const Library& egl = nativeDisplay.getLibrary(); + const bool supportsLegacyCreate = (pixmap.getCapabilities() & NativePixmap::CAPABILITY_CREATE_SURFACE_LEGACY) != 0; + const bool supportsPlatformCreateExtension = (pixmap.getCapabilities() & NativePixmap::CAPABILITY_CREATE_SURFACE_PLATFORM_EXTENSION) != 0; + bool usePlatformExt = false; + EGLSurface surface = EGL_NO_SURFACE; - TCU_CHECK_INTERNAL(supportsLegacyCreate || supportsPlatformCreate); + TCU_CHECK_INTERNAL(supportsLegacyCreate || supportsPlatformCreateExtension); - if (supportsPlatformCreate) + if (supportsPlatformCreateExtension) { const vector platformExts = getClientExtensions(egl); usePlatformExt = de::contains(platformExts.begin(), platformExts.end(), string("EGL_EXT_platform_base")) && @@ -344,7 +344,7 @@ EGLSurface createPixmapSurface (NativeDisplay& nativeDisplay, NativePixmap& pixm { const vector legacyAttribs = toLegacyAttribList(attribList); - surface = egl.createPlatformPixmapSurfaceEXT(display, config, pixmap.getPlatformNative(), &legacyAttribs[0]); + surface = egl.createPlatformPixmapSurfaceEXT(display, config, pixmap.getPlatformExtension(), &legacyAttribs[0]); EGLU_CHECK_MSG(egl, "eglCreatePlatformPixmapSurfaceEXT()"); TCU_CHECK(surface != EGL_NO_SURFACE); } diff --git a/framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp b/framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp index 23c6bdb..afa72c6 100644 --- a/framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp +++ b/framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp @@ -128,7 +128,7 @@ class Window : public NativeWindow { public: static const Capability CAPABILITIES = Capability(CAPABILITY_CREATE_SURFACE_LEGACY | - CAPABILITY_CREATE_SURFACE_PLATFORM | + CAPABILITY_CREATE_SURFACE_PLATFORM_EXTENSION | CAPABILITY_GET_SURFACE_SIZE | CAPABILITY_SET_SURFACE_SIZE | CAPABILITY_GET_SCREEN_SIZE); @@ -220,7 +220,7 @@ class Pixmap : public NativePixmap public: enum { CAPABILITIES = (CAPABILITY_CREATE_SURFACE_LEGACY | - CAPABILITY_CREATE_SURFACE_PLATFORM | + CAPABILITY_CREATE_SURFACE_PLATFORM_EXTENSION | CAPABILITY_READ_PIXELS) }; diff --git a/modules/egl/teglCreateSurfaceTests.cpp b/modules/egl/teglCreateSurfaceTests.cpp index 712d06d..fb36d9a 100644 --- a/modules/egl/teglCreateSurfaceTests.cpp +++ b/modules/egl/teglCreateSurfaceTests.cpp @@ -76,7 +76,7 @@ EGLSurface createWindowSurface (EGLDisplay display, EGLConfig config, eglu::Nati { checkEGLPlatformSupport(egl, nativeDisplay.getPlatformExtensionName()); - surface = egl.createPlatformWindowSurfaceEXT(display, config, window.getPlatformNative(), DE_NULL); + surface = egl.createPlatformWindowSurfaceEXT(display, config, window.getPlatformExtension(), DE_NULL); EGLU_CHECK_MSG(egl, "eglCreatePlatformWindowSurfaceEXT() failed"); } @@ -97,7 +97,7 @@ EGLSurface createPixmapSurface (EGLDisplay display, EGLConfig config, eglu::Nati { checkEGLPlatformSupport(egl, nativeDisplay.getPlatformExtensionName()); - surface = egl.createPlatformPixmapSurfaceEXT(display, config, pixmap.getPlatformNative(), DE_NULL); + surface = egl.createPlatformPixmapSurfaceEXT(display, config, pixmap.getPlatformExtension(), DE_NULL); EGLU_CHECK_MSG(egl, "eglCreatePlatformPixmapSurfaceEXT() failed"); } @@ -129,7 +129,7 @@ public: } else { - if ((windowFactory.getCapabilities() & eglu::NativeWindow::CAPABILITY_CREATE_SURFACE_PLATFORM) == 0) + if ((windowFactory.getCapabilities() & eglu::NativeWindow::CAPABILITY_CREATE_SURFACE_PLATFORM_EXTENSION) == 0) TCU_THROW(NotSupportedError, "Native window doesn't support eglCreatePlatformWindowSurfaceEXT()"); } @@ -187,7 +187,7 @@ public: } else { - if ((pixmapFactory.getCapabilities() & eglu::NativePixmap::CAPABILITY_CREATE_SURFACE_PLATFORM) == 0) + if ((pixmapFactory.getCapabilities() & eglu::NativePixmap::CAPABILITY_CREATE_SURFACE_PLATFORM_EXTENSION) == 0) TCU_THROW(NotSupportedError, "Native pixmap doesn't support eglCreatePlatformPixmapSurfaceEXT()"); }