Path: blob/main_old/src/tests/deqp_support/tcuANGLEPlatform.h
1693 views
/*-------------------------------------------------------------------------1* drawElements Quality Program Tester Core2* ----------------------------------------3*4* Copyright 2014 The Android Open Source Project5*6* Licensed under the Apache License, Version 2.0 (the "License");7* you may not use this file except in compliance with the License.8* You may obtain a copy of the License at9*10* http://www.apache.org/licenses/LICENSE-2.011*12* Unless required by applicable law or agreed to in writing, software13* distributed under the License is distributed on an "AS IS" BASIS,14* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.15* See the License for the specific language governing permissions and16* limitations under the License.17*18*/1920#ifndef TCU_ANGLE_PLATFORM_H_21#define TCU_ANGLE_PLATFORM_H_2223#include "gluPlatform.hpp"24#include "tcuDefs.hpp"25#include "tcuPlatform.hpp"2627#ifndef _EGLUPLATFORM_HPP28# include "egluPlatform.hpp"29#endif3031#include "platform/PlatformMethods.h"32#include "tcuANGLENativeDisplayFactory.h"3334namespace tcu35{3637class ANGLEPlatform : public tcu::Platform, private glu::Platform, private eglu::Platform38{39public:40ANGLEPlatform(angle::LogErrorFunc logErrorFunc,41uint32_t preRotation,42bool enableDirectSPIRVGen);43~ANGLEPlatform();4445bool processEvents() override;4647const glu::Platform &getGLPlatform() const override48{49return static_cast<const glu::Platform &>(*this);50}51const eglu::Platform &getEGLPlatform() const override52{53return static_cast<const eglu::Platform &>(*this);54}5556private:57// Note: -1 represents EGL_DONT_CARE, but we don't have the EGL headers here.58std::vector<eglw::EGLAttrib> initAttribs(eglw::EGLAttrib type,59eglw::EGLAttrib deviceType = -1,60eglw::EGLAttrib majorVersion = -1,61eglw::EGLAttrib minorVersion = -1);6263EventState mEvents;64angle::PlatformMethods mPlatformMethods;65std::vector<const char *> mEnableFeatureOverrides;66};6768} // namespace tcu6970tcu::Platform *CreateANGLEPlatform(angle::LogErrorFunc logErrorFunc,71uint32_t preRotation,72bool enableDirectSPIRVGen);7374#endif // TCU_ANGLE_PLATFORM_H_757677