Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,49 @@ elseif (DE_OS_IS_IOS)
target_link_libraries(deqp tcutil-platform xscore ${DEQP_MODULE_LIBRARIES})
set_target_properties(deqp PROPERTIES XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2")
set_target_properties(deqp PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer: ${DEQP_IOS_CODE_SIGN_IDENTITY}")
elseif (DE_OS_IS_OHOS)
include_directories(
framework/platform/ohos
framework/platform/ohos/context
framework/platform/ohos/display
framework/platform/ohos/rosen_context
framework/delibs/debase
framework/delibs/decpp
framework/delibs/deutil
framework/common
framework/qphelper
framework/egl
framework/egl/wrapper
framework/opengl
framework/opengl/wrapper
framework/openglcts/modules
modules
external/openglcts/modules
external/openglcts/modules/common
external/vulkancts/framework/vulkan
build/external/vulkancts/framework/vulkan
)
set(DEQP_SRCS
framework/platform/ohos/appmain.cpp
framework/platform/ohos/tcuOhosPlatform.cpp
framework/platform/ohos/display/window/tcuOhosWindowFactory.cpp
framework/platform/ohos/display/window/tcuOhosNativeWindow.cpp
framework/platform/ohos/display/tcuOhosNativeDisplay.cpp
framework/platform/ohos/display/tcuOhosEglDisplayFactory.cpp
framework/platform/ohos/display/pixmap/tcuOhosPixmapFactory.cpp
framework/platform/ohos/display/pixmap/tcuOhosNativePixmap.cpp
framework/platform/ohos/context/tcuOhosNativeContext.cpp
framework/platform/ohos/context/tcuOhosEglContextFactory.cpp
framework/platform/ohos/rosen_context/ohos_context_i_app.cpp
)

set(DEQP_LIBS
tcutil-platform
${DEQP_MODULE_LIBRARIES}
)

add_library(deqp SHARED ${DEQP_SRCS})
target_link_libraries(deqp ${DEQP_LIBS})
endif ()

if (DE_OS_IS_FUCHSIA)
Expand Down
4 changes: 2 additions & 2 deletions executor/tools/xeCommandLineExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#include <string>
#include <vector>

#if (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_WIN32)
#if (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_WIN32) || (DE_OS == DE_OS_OHOS)
#include <signal.h>
#endif

Expand Down Expand Up @@ -504,7 +504,7 @@ xe::CommLink *createCommLink(const CommandLine &cmdLine)
}
}

#if (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_ANDROID)
#if (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_OHOS)

static xe::BatchExecutor *s_executor = nullptr;

Expand Down
2 changes: 1 addition & 1 deletion external/libpng/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if (DE_DEBUG EQUAL 1)
add_definitions(-DPNG_DEBUG)
endif ()

if (DE_OS_IS_UNIX OR DE_OS_IS_QNX)
if (DE_OS_IS_UNIX OR DE_OS_IS_QNX OR DE_OS_IS_OHOS)
# for snprintf()
add_definitions(-D_XOPEN_SOURCE=600)
endif ()
Expand Down
2 changes: 1 addition & 1 deletion external/vulkan-validationlayers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ endif ()

# VVL have issues building on Windows caused by build type mismatch in dependencies.
# We exclude them from the Windows build for now. VK-GL-CTS issue: 5052
if (NOT DE_OS_IS_ANDROID AND NOT DE_OS_IS_IOS AND NOT DE_OS_IS_WIN32 AND "${SBT_STRIPPED}" STREQUAL "" AND EXISTS ${VULKAN_VALIDATIONLAYERS_ABS_PATH}/external)
if (NOT DE_OS_IS_ANDROID AND NOT DE_OS_IS_IOS AND NOT DE_OS_IS_WIN32 AND NOT DE_OS_IS_OHOS AND "${SBT_STRIPPED}" STREQUAL "" AND EXISTS ${VULKAN_VALIDATIONLAYERS_ABS_PATH}/external)
if (EXISTS ${VULKAN_VALIDATIONLAYERS_ABS_PATH}/CMakeLists.txt)
message(STATUS "vulkan-validationlayers found")
set(CMAKE_C_FLAGS ${DE_3RD_PARTY_C_FLAGS})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#ifndef CTS_USES_VULKANSC

#if (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_OSX)
#if (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_OSX) || (DE_OS == DE_OS_OHOS)
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
Expand Down Expand Up @@ -77,7 +77,7 @@ NativeHandle::NativeHandle(const NativeHandle &other)
{
if (other.m_fd >= 0)
{
#if (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_OSX)
#if (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_OSX) || (DE_OS == DE_OS_OHOS)
DE_ASSERT(!other.m_win32Handle.internal);
DE_ASSERT(!other.m_androidHardwareBuffer.internal);
m_fd = dup(other.m_fd);
Expand Down Expand Up @@ -200,7 +200,7 @@ void NativeHandle::reset(void)
{
if (m_fd >= 0)
{
#if (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_OSX)
#if (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_OSX) || (DE_OS == DE_OS_OHOS)
DE_ASSERT(!m_win32Handle.internal);
DE_ASSERT(!m_androidHardwareBuffer.internal);
::close(m_fd);
Expand Down
2 changes: 1 addition & 1 deletion external/zlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ elseif (DE_COMPILER_IS_GCC OR DE_COMPILER_IS_CLANG)

endif ()

if (DE_OS_IS_UNIX OR DE_OS_IS_QNX)
if (DE_OS_IS_UNIX OR DE_OS_IS_QNX OR DE_OS_IS_OHOS)
add_definitions(-D_XOPEN_SOURCE=600)
endif ()

Expand Down
2 changes: 1 addition & 1 deletion framework/common/tcuVectorUtil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace tcu
static const float PI = 3.141592653589793238f;

#if (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_QNX) || \
(DE_OS == DE_OS_WIN32 && DE_COMPILER == DE_COMPILER_CLANG)
(DE_OS == DE_OS_WIN32 && DE_COMPILER == DE_COMPILER_CLANG) || (DE_OS == DE_OS_OHOS)
inline float abs(float f)
{
return deFloatAbs(f);
Expand Down
1 change: 1 addition & 0 deletions framework/delibs/cmake/Defs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ DE_MAKE_ENV_BOOL("DE_OS" "OSX")
DE_MAKE_ENV_BOOL("DE_OS" "ANDROID")
DE_MAKE_ENV_BOOL("DE_OS" "IOS")
DE_MAKE_ENV_BOOL("DE_OS" "FUCHSIA")
DE_MAKE_ENV_BOOL("DE_OS" "OHOS")

# Prevent mixed compile with GCC and Clang
if (NOT (CMAKE_C_COMPILER_ID MATCHES "GNU") EQUAL (CMAKE_CXX_COMPILER_ID MATCHES "GNU"))
Expand Down
2 changes: 1 addition & 1 deletion framework/delibs/debase/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ set(DEBASE_SRCS
add_library(debase STATIC ${DEBASE_SRCS})

# link debase to libm on unix systems
if (DE_OS_IS_UNIX OR DE_OS_IS_QNX)
if (DE_OS_IS_UNIX OR DE_OS_IS_QNX OR DE_OS_IS_OHOS)
target_link_libraries(debase m)

add_definitions(-D_XOPEN_SOURCE=600)
Expand Down
2 changes: 1 addition & 1 deletion framework/delibs/debase/deDefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void deAssertFail(const char *reason, const char *file, int line)
fprintf(stderr, "Assertion '%s' failed at %s:%d\n", reason, file, line);
raise(SIGTRAP);
abort();
#elif (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_FUCHSIA)
#elif (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_FUCHSIA) || (DE_OS == DE_OS_OHOS)
__assert_fail(reason, file, (unsigned int)line, "Unknown function");
#elif (DE_OS == DE_OS_QNX)
__assert(reason, file, (unsigned int)line, "Unknown function");
Expand Down
1 change: 1 addition & 0 deletions framework/delibs/debase/deDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
#define DE_OS_IOS 7 /*!< iOS */
#define DE_OS_QNX 8 /*!< QNX */
#define DE_OS_FUCHSIA 9 /*!< Fuchsia */
#define DE_OS_OHOS 10 /*!< OHOS */

/* OS detection (set to one of DE_OS_*). */
#if defined(DE_OS)
Expand Down
2 changes: 1 addition & 1 deletion framework/delibs/debase/deMemory.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#define DE_ALIGNED_MALLOC_WIN32 1
#define DE_ALIGNED_MALLOC_GENERIC 2

#if (DE_OS == DE_OS_UNIX) || ((DE_OS == DE_OS_ANDROID) && (DE_ANDROID_API >= 21))
#if (DE_OS == DE_OS_UNIX) || ((DE_OS == DE_OS_ANDROID) && (DE_ANDROID_API >= 21)) || (DE_OS == DE_OS_OHOS)
#define DE_ALIGNED_MALLOC DE_ALIGNED_MALLOC_POSIX
#if defined(__FreeBSD__)
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion framework/delibs/decpp/deDirectoryIterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#elif (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_OSX) || (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_SYMBIAN) || \
(DE_OS == DE_OS_IOS) || (DE_OS == DE_OS_QNX) || \
(DE_OS == DE_OS_WIN32 && (DE_COMPILER == DE_COMPILER_CLANG || DE_COMPILER == DE_COMPILER_GCC)) || \
(DE_OS == DE_OS_FUCHSIA)
(DE_OS == DE_OS_FUCHSIA) || (DE_OS == DE_OS_OHOS)
#define DE_DIRITER DE_DIRITER_POSIX
#endif

Expand Down
2 changes: 1 addition & 1 deletion framework/delibs/decpp/deFilePath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ static void createDirectoryImpl(const char *path)
if (!CreateDirectory(path, nullptr))
throw std::runtime_error("Failed to create directory");
#elif (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_OSX) || (DE_OS == DE_OS_IOS) || (DE_OS == DE_OS_ANDROID) || \
(DE_OS == DE_OS_SYMBIAN) || (DE_OS == DE_OS_QNX) || (DE_OS == DE_OS_FUCHSIA)
(DE_OS == DE_OS_SYMBIAN) || (DE_OS == DE_OS_QNX) || (DE_OS == DE_OS_FUCHSIA) || (DE_OS == DE_OS_OHOS)
if (mkdir(path, 0777) != 0)
throw std::runtime_error("Failed to create directory");
#else
Expand Down
2 changes: 1 addition & 1 deletion framework/delibs/depool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ set(DEPOOL_SRCS
dePoolTest.h
)

if (DE_OS_IS_UNIX OR DE_OS_IS_QNX)
if (DE_OS_IS_UNIX OR DE_OS_IS_QNX OR DE_OS_IS_OHOS)
# vsnprintf
add_definitions(-D_XOPEN_SOURCE=600)
endif ()
Expand Down
2 changes: 1 addition & 1 deletion framework/delibs/dethread/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if (DE_OS_IS_UNIX)
set(DETHREAD_LIBS ${DETHREAD_LIBS} pthread)
endif ()

if (DE_OS_IS_UNIX OR DE_OS_IS_ANDROID OR DE_OS_IS_OSX OR DE_OS_IS_IOS OR DE_OS_IS_QNX OR DE_OS_IS_FUCHSIA)
if (DE_OS_IS_UNIX OR DE_OS_IS_ANDROID OR DE_OS_IS_OSX OR DE_OS_IS_IOS OR DE_OS_IS_QNX OR DE_OS_IS_FUCHSIA OR DE_OS_IS_OHOS)
add_definitions(-D_XOPEN_SOURCE=600)
endif ()

Expand Down
2 changes: 1 addition & 1 deletion framework/delibs/dethread/unix/deMutexUnix.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#if (DE_OS == DE_OS_UNIX || DE_OS == DE_OS_ANDROID || DE_OS == DE_OS_SYMBIAN || DE_OS == DE_OS_QNX || \
DE_OS == DE_OS_OSX || DE_OS == DE_OS_IOS) || \
(DE_OS == DE_OS_FUCHSIA)
(DE_OS == DE_OS_FUCHSIA) || (DE_OS == DE_OS_OHOS)

#include "deMemory.h"

Expand Down
2 changes: 1 addition & 1 deletion framework/delibs/dethread/unix/deSemaphoreUnix.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "deSemaphore.h"

#if (DE_OS == DE_OS_UNIX || DE_OS == DE_OS_ANDROID || DE_OS == DE_OS_SYMBIAN || DE_OS == DE_OS_QNX) || \
(DE_OS == DE_OS_FUCHSIA)
(DE_OS == DE_OS_FUCHSIA) || DE_OS == DE_OS_OHOS

#include "deMemory.h"

Expand Down
2 changes: 1 addition & 1 deletion framework/delibs/dethread/unix/deThreadLocalUnix.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "deThreadLocal.h"

#if (DE_OS == DE_OS_UNIX || DE_OS == DE_OS_OSX || DE_OS == DE_OS_ANDROID || DE_OS == DE_OS_SYMBIAN || \
DE_OS == DE_OS_IOS || DE_OS == DE_OS_QNX || DE_OS == DE_OS_FUCHSIA)
DE_OS == DE_OS_IOS || DE_OS == DE_OS_QNX || DE_OS == DE_OS_FUCHSIA || DE_OS == DE_OS_OHOS)

#if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE < 500)
#error You are using too old posix API!
Expand Down
6 changes: 3 additions & 3 deletions framework/delibs/dethread/unix/deThreadUnix.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "deThread.h"

#if (DE_OS == DE_OS_UNIX || DE_OS == DE_OS_OSX || DE_OS == DE_OS_ANDROID || DE_OS == DE_OS_SYMBIAN || \
DE_OS == DE_OS_IOS || DE_OS == DE_OS_QNX || DE_OS == DE_OS_FUCHSIA)
DE_OS == DE_OS_IOS || DE_OS == DE_OS_QNX || DE_OS == DE_OS_FUCHSIA || DE_OS == DE_OS_OHOS)

#include "deMemory.h"
#include "deInt32.h"
Expand All @@ -36,7 +36,7 @@
#include <unistd.h>
#include <pthread.h>
#include <sched.h>
#if (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_ANDROID)
#if (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_OHOS)
#include <sys/syscall.h>
#endif

Expand Down Expand Up @@ -161,7 +161,7 @@ void deYield(void)
sched_yield();
}

#if (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_ANDROID)
#if (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_OHOS)

uint32_t deGetNumAvailableLogicalCores(void)
{
Expand Down
2 changes: 1 addition & 1 deletion framework/delibs/deutil/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if (DE_OS_IS_WIN32)
set(DEUTIL_LIBS ${DEUTIL_LIBS} ws2_32)
endif ()

if (DE_OS_IS_UNIX OR DE_OS_IS_QNX)
if (DE_OS_IS_UNIX OR DE_OS_IS_QNX OR DE_OS_IS_OHOS)
add_definitions(-D_XOPEN_SOURCE=600)
endif ()

Expand Down
4 changes: 2 additions & 2 deletions framework/delibs/deutil/deClock.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#if (DE_OS == DE_OS_WIN32)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#elif (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_SYMBIAN) || (DE_OS == DE_OS_QNX)
#elif (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_SYMBIAN) || (DE_OS == DE_OS_QNX) || (DE_OS == DE_OS_OHOS)
#include <time.h>
#elif (DE_OS == DE_OS_OSX) || (DE_OS == DE_OS_IOS)
#include <mach/mach_time.h>
Expand All @@ -55,7 +55,7 @@ uint64_t deGetMicroseconds(void)
return count.QuadPart / (freq.QuadPart / 1000000);
}

#elif (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_QNX) || (DE_OS == DE_OS_FUCHSIA)
#elif (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_QNX) || (DE_OS == DE_OS_FUCHSIA) || (DE_OS == DE_OS_OHOS)
struct timespec currTime;
clock_gettime(CLOCK_MONOTONIC, &currTime);
return (uint64_t)currTime.tv_sec * 1000000 + ((uint64_t)currTime.tv_nsec / 1000);
Expand Down
2 changes: 1 addition & 1 deletion framework/delibs/deutil/deDynamicLibrary.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "deMemory.h"

#if (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_OSX) || (DE_OS == DE_OS_SYMBIAN) || \
(DE_OS == DE_OS_IOS) || (DE_OS == DE_OS_QNX) || (DE_OS == DE_OS_FUCHSIA)
(DE_OS == DE_OS_IOS) || (DE_OS == DE_OS_QNX) || (DE_OS == DE_OS_FUCHSIA) || (DE_OS == DE_OS_OHOS)
/* Posix implementation. */

#include <dlfcn.h>
Expand Down
2 changes: 1 addition & 1 deletion framework/delibs/deutil/deFile.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "deMemory.h"

#if (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_OSX) || (DE_OS == DE_OS_IOS) || (DE_OS == DE_OS_ANDROID) || \
(DE_OS == DE_OS_SYMBIAN) || (DE_OS == DE_OS_QNX) || (DE_OS == DE_OS_FUCHSIA)
(DE_OS == DE_OS_SYMBIAN) || (DE_OS == DE_OS_QNX) || (DE_OS == DE_OS_FUCHSIA) || (DE_OS == DE_OS_OHOS)

#include <sys/types.h>
#include <sys/stat.h>
Expand Down
2 changes: 1 addition & 1 deletion framework/delibs/deutil/deProcess.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "deString.h"

#if (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_OSX) || (DE_OS == DE_OS_IOS) || (DE_OS == DE_OS_ANDROID) || \
(DE_OS == DE_OS_SYMBIAN) || (DE_OS == DE_OS_QNX)
(DE_OS == DE_OS_SYMBIAN) || (DE_OS == DE_OS_QNX) || (DE_OS == DE_OS_OHOS)

#include "deCommandLine.h"

Expand Down
2 changes: 1 addition & 1 deletion framework/delibs/deutil/deSocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#if (DE_OS == DE_OS_WIN32)
#define DE_USE_WINSOCK
#elif (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_OSX) || (DE_OS == DE_OS_IOS) || (DE_OS == DE_OS_ANDROID) || \
(DE_OS == DE_OS_SYMBIAN) || (DE_OS == DE_OS_QNX) || (DE_OS == DE_OS_FUCHSIA)
(DE_OS == DE_OS_SYMBIAN) || (DE_OS == DE_OS_QNX) || (DE_OS == DE_OS_FUCHSIA) || (DE_OS == DE_OS_OHOS)
#define DE_USE_BERKELEY_SOCKETS
#else
#error Implement deSocket for your OS.
Expand Down
Loading