0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

GFXBenchがオープンソースになっていたのでビルドしてみた

0
Posted at

いつの間にかGFXBenchがOSSになってGitHubで公開されていたので、Ubuntu 22.04で動かしてみました。

Windows, macOSなどのメジャーはターゲットはサポートされているようですが、Linuxには対応していなったので、以下の情報を参考にしてビルドしました。

ビルド手順

### リポジトリのクローン
$ git clone https://github.com/Kishonti-Opensource/gfxbench
$ cd gfxbench/

### パッチの適用
$ patch -p1 < fix_linux_build.patch

### ビルド
$ WORKSPACE="$PWD" PLATFORM=linux CONFIG=Release \
COMMON_OPTS="-DCMAKE_POLICY_VERSION_MINIMUM=3.5" \
scripts/build-3rdparty.sh

$ PRODUCT_ID="gfxbench_gl" OGLX_DRIVERS=ES3 \
OGLX_VARIANT=sys CMAKE_POLICY_VERSION_MINIMUM=3.5 \
WORKSPACE=${PWD} PLATFORM=linux CONFIG=Release \
APPLICATION_TYPE=developer scripts/build.sh
fix_linux_build.patch
diff --git a/3rdparty/libepoxy/khronos/include/EGL/eglplatform.h b/3rdparty/libepoxy/khronos/include/EGL/eglplatform.h
index a05b61cd..d9313d2e 100644
--- a/3rdparty/libepoxy/khronos/include/EGL/eglplatform.h
+++ b/3rdparty/libepoxy/khronos/include/EGL/eglplatform.h
@@ -93,6 +93,15 @@ typedef struct ANativeWindow*           EGLNativeWindowType;
 typedef struct egl_native_pixmap_t*     EGLNativePixmapType;
 typedef void*                           EGLNativeDisplayType;
 
+#elif defined(WAYLAND)
+
+struct wl_display;
+struct wl_egl_pixmap;\struct wl_egl_window;
+
+typedef struct wl_display    *EGLNativeDisplayType;
+typedef struct wl_egl_pixmap *EGLNativePixmapType;
+typedef struct wl_egl_window *EGLNativeWindowType;
+
 #elif defined(__unix__)
 
 /* X11 (tentative)  */
diff --git a/scripts/build-3rdparty.sh b/scripts/build-3rdparty.sh
index 26e1cce7..c2838f68 100755
--- a/scripts/build-3rdparty.sh
+++ b/scripts/build-3rdparty.sh
@@ -69,7 +69,7 @@ fi
 
 zlib_OPTS="-DBUILD_SHARED_LIBS=0"
 libpng_OPTS="-DPNG_STATIC=1 -DPNG_SHARED=0"
-poco_OPTS="-DPOCO_STATIC=1 -DDISABLE_MONGODB=1 -DDISABLE_PDF=1 -DDISABLE_DATA=1 -DDISABLE_ZIP=1"
+poco_OPTS="-DPOCO_STATIC=1 -DDISABLE_MONGODB=1 -DDISABLE_PDF=1 -DDISABLE_DATA=1 -DDISABLE_ZIP=1 -DDISABLE_OPENSSL=1"
 glfw_OPTS="-DGLFW_BUILD_EXAMPLES=0 -DGLFW_BUILD_TESTS=0"
 if [ "$USE_WAYLAND" == "true" ]; then
     glfw_OPTS+=" -DGLFW_USE_WAYLAND=1 -DGLFW_CLIENT_LIBRARY=glesv2"
diff --git a/scripts/build.sh b/scripts/build.sh
index 8e501d7a..35827818 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -306,7 +306,7 @@ case $PLATFORM in
     ios|macosx)
     ;;
     *)
-    PROJECTS+=" frameworks/clew frameworks/cudaw"
+    PROJECTS+=" frameworks/clew"
     ;;
 esac
 #systeminfo have to followed by clew and cudaw

実行

$ ./tfw-pkg/bin/testfw_app --gfx glfw --gl_api=gles -w 512 -h 512 -t gl_alu

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?