Skip to content

Commit

Permalink
Add glmark2 to build.
Browse files Browse the repository at this point in the history
glmark2 is a an OpenGL ES 2.0 benchmark licensed under GPL v3.
See https://github.com/glmark2/glmark2

ANGLE can use glmark2 as a metric and guide for optimization. It will
add a number of useful performance tests. This CL adds the initial
build integration.

A follow-up CL will integrate glmark2 into our performance tests. Note
that glmark2 will not be shipped with Chrome or Android. It will only
be used on our test infrastructure.

Note that the data path solution is temporary. When integrated into
ANGLE we will make sure we CWD into the glmark2 directory before
running the benchmark.

Bug: angleproject:3139
Change-Id: I5c4f605221c255ab19abd10b321b5867ab459105
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1449984
Commit-Queue: Jamie Madill <jmadill@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
  • Loading branch information
null77 authored and Commit Bot committed Mar 5, 2019
1 parent f094bac commit 55959b0
Show file tree
Hide file tree
Showing 9 changed files with 506 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
/third_party/deqp/src
/third_party/fuchsia-sdk
/third_party/gles1_conform
/third_party/glmark2/src
/third_party/glslang/src
/third_party/googletest
/third_party/jsoncpp
/third_party/libjpeg_turbo
/third_party/libpng/src
/third_party/llvm-build
/third_party/qemu-linux-x64
Expand All @@ -44,6 +46,7 @@
/third_party/vulkan-loader/src
/third_party/vulkan-tools/src
/third_party/vulkan-validation-layers/src
/third_party/yasm
/third_party/zlib
angle_internal
build
Expand All @@ -56,7 +59,6 @@ Debug_x64/
diag.txt
ipch
lib/*
Makefile
out
patches-*
Release/
Expand Down
2 changes: 1 addition & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ if (is_win && target_cpu != "arm64") {
}
}

# Holds the shared includes so we only need to list them once.
config("includes_config") {
include_dirs = [ "include" ]
}

# Holds the shared includes so we only need to list them once.
angle_source_set("includes") {
sources = libangle_includes
public_configs = [ ":includes_config" ]
Expand Down
23 changes: 22 additions & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,15 @@ deps = {
'url': '{chromium_git}/external/deqp@{deqp_revision}',
},

# glmark2 is a GPL3-licensed OpenGL ES 2.0 benchmark. We use it for testing.
'{angle_root}/third_party/glmark2/src': {
'url': '{chromium_git}/external/github.com/glmark2/glmark2@c4b3ff5a481348e8bdc2b71ee275864db91e40b1',
},

'{angle_root}/third_party/glslang/src': {
'url': '{chromium_git}/external/github.com/KhronosGroup/glslang@{glslang_revision}',
'condition': 'not build_with_chromium',
},
},

'{angle_root}/third_party/googletest': {
'url': '{chromium_git}/chromium/src/third_party/googletest@660425b1c5ca04559ab7e50c7572b5b771acca1c',
Expand All @@ -75,6 +80,12 @@ deps = {
'condition': 'not build_with_chromium',
},

# libjpeg_turbo is used by glmark2.
'{angle_root}/third_party/libjpeg_turbo': {
'url': '{chromium_git}/chromium/deps/libjpeg_turbo@6dcdade8828297e306cabfdae80f3510f3f3eea2',
'condition': 'not build_with_chromium',
},

'{angle_root}/third_party/libpng/src': {
'url': '{android_git}/platform/external/libpng@094e181e79a3d6c23fd005679025058b7df1ad6c',
'condition': 'not build_with_chromium',
Expand Down Expand Up @@ -142,6 +153,16 @@ deps = {
'url': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-ValidationLayers@{vulkan_validation_revision}',
},

'{angle_root}/third_party/yasm': {
'url': '{chromium_git}/chromium/src/third_party/yasm@86b6058141a42aed51bbd8bb9f9d54d199d9dbd0',
'condition': 'not build_with_chromium',
},

'{angle_root}/third_party/yasm/source/patched-yasm': {
'url': '{chromium_git}/chromium/deps/yasm/patched-yasm.git@720b70524a4424b15fc57e82263568c8ba0496ad',
'condition': 'not build_with_chromium',
},

'{angle_root}/third_party/zlib': {
'url': '{chromium_git}/chromium/src/third_party/zlib@f95aeb0fa7f136ef4a457a6d9ba6f3c2701a444b',
'condition': 'not build_with_chromium',
Expand Down
1 change: 1 addition & 0 deletions build_overrides/angle.gni
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Overrides for ANGLE's dependencies
angle_glslang_dir = "//third_party/glslang/src"
angle_googletest_dir = "//third_party/googletest/src"
angle_libjpeg_turbo_dir = "//third_party/libjpeg_turbo"
angle_jsoncpp_dir = "//third_party/jsoncpp"
angle_libpng_dir = "//third_party/libpng"
angle_spirv_tools_dir = "//third_party/spirv-tools/src"
7 changes: 7 additions & 0 deletions src/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ if (build_with_chromium) {
if (build_angle_gles1_conform_tests) {
deps += [ "//src/tests:angle_gles1_conformance_tests" ]
}

if (is_win) {
deps += [
"//third_party/glmark2:glmark2_angle",
"//third_party/glmark2:glmark2_wgl",
]
}
}
}

Expand Down
51 changes: 51 additions & 0 deletions third_party/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# See:
# https://chromium.googlesource.com/chromium/src/+/master/third_party/BUILD.gn

import("//third_party/libjpeg.gni")

assert(!is_ios, "This is not used on iOS, don't drag it in unintentionally")

config("system_libjpeg_config") {
libs = [ "jpeg" ]
defines = [ "USE_SYSTEM_LIBJPEG" ]
}

config("libjpeg_turbo_config") {
defines = [ "USE_LIBJPEG_TURBO=1" ]
}

# This is a meta target that forwards to the system's libjpeg,
# third_party/libjpeg, or third_party/libjpeg_turbo depending on the build args
# declared in this file.
group("jpeg") {
if (use_system_libjpeg) {
public_configs = [ ":system_libjpeg_config" ]
} else if (use_libjpeg_turbo) {
public_deps = [
"//third_party/libjpeg_turbo:libjpeg",
]
public_configs = [ ":libjpeg_turbo_config" ]
} else {
public_deps = [
"//third_party/libjpeg:libjpeg",
]
}
}

# This is a meta target that forwards include paths only to the system's
# libjpeg, third_party/libjpeg, or third_party/libjpeg_turbo depending on the
# build args declared in this file. This is needed, rarely, for targets that
# need to reference libjpeg without explicitly building it.
group("jpeg_includes") {
if (use_system_libjpeg) {
public_configs = [ ":system_libjpeg_config" ]
} else if (use_libjpeg_turbo) {
public_configs = [ "//third_party/libjpeg_turbo:libjpeg_config" ]
} else {
public_configs = [ "//third_party/libjpeg:libjpeg_config" ]
}
}
Loading

0 comments on commit 55959b0

Please sign in to comment.