diff options
author | ullysses.a.eoff <ullysses.a.eoff@intel.com> | 2015-10-29 10:04:53 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-29 17:05:31 +0000 |
commit | cfd8141a4f2b970a8c9ba6d70a541a4490011284 (patch) | |
tree | 212764f5ee4a26ef9e6b4e169190b4c710b0d791 /gpu/khronos_glcts_support | |
parent | 2d86a92b7095a803d2bcf6bb74804de50a2df42f (diff) | |
download | chromium_src-cfd8141a4f2b970a8c9ba6d70a541a4490011284.zip chromium_src-cfd8141a4f2b970a8c9ba6d70a541a4490011284.tar.gz chromium_src-cfd8141a4f2b970a8c9ba6d70a541a4490011284.tar.bz2 |
gpu/khronos_glcts_support: add support for GN builds
Port the GYP configs to BUILD.gn so that this test
can be built with GN.
BUG=chromium:412865, chromium:471903
R=kbr@chromium.org, piman@chromium.org, dpranke@chromium.org, brettw@chromium.org
TEST=Verify khronos_glcts_test builds and runs with GN build
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Review URL: https://codereview.chromium.org/1413303003
Cr-Commit-Position: refs/heads/master@{#356871}
Diffstat (limited to 'gpu/khronos_glcts_support')
-rw-r--r-- | gpu/khronos_glcts_support/BUILD.gn | 547 |
1 files changed, 544 insertions, 3 deletions
diff --git a/gpu/khronos_glcts_support/BUILD.gn b/gpu/khronos_glcts_support/BUILD.gn index b2d7584..2868134 100644 --- a/gpu/khronos_glcts_support/BUILD.gn +++ b/gpu/khronos_glcts_support/BUILD.gn @@ -5,10 +5,544 @@ import("//testing/test.gni") declare_args() { - # TODO(GYP) - make this work. crbug.com/471903 internal_khronos_glcts_tests = false } +if (internal_khronos_glcts_tests) { + khronos_glcts_gypi = + exec_script("//build/gypi_to_gn.py", + [ + rebase_path("khronos_glcts.gypi"), + "--replace=<(DEPTH)=../..", + "--replace=<(SHARED_INTERMEDIATE_DIR)=$target_gen_dir", + ], + "scope", + [ "khronos_glcts.gypi" ]) + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_test.gyp:khronos_glcts_test_windowless + copy("glcts_resources") { + sources = khronos_glcts_gypi.glcts_data_dirs + outputs = [ + "$root_out_dir/khronos_glcts_data/gl_cts/{{source_file_part}}", + ] + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_test.gyp:khronos_glcts_test_windowless + copy("glcts_gtf_resources") { + sources = khronos_glcts_gypi.glcts_gtf_data_dirs + + khronos_glcts_gypi.glcts_gtf_runfiles + outputs = [ + "$root_out_dir/khronos_glcts_data/gl_cts/GTF/{{source_file_part}}", + ] + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_test.gyp:khronos_glcts_test + action("generate_khronos_glcts_tests") { + script = "generate_khronos_glcts_tests.py" + sources = [ "khronos_glcts_test.h" ] + khronos_glcts_gypi.glcts_gtf_runfiles + outputs = [ + "$target_gen_dir/khronos_glcts_test_autogen.cc", + ] + args = [ "--outdir=" + rebase_path("$target_gen_dir") ] + + khronos_glcts_gypi.glcts_gtf_runfiles + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_defaults.gypi:target_defaults + config("defaults_config") { + defines = [ + "DEQP_TARGET_NAME=\"chrome-gpu-command-buffer\"", + "DEQP_SUPPORT_GLES2=1", + "DEQP_SUPPORT_EGL=1", + "GTF_API=GTF_GLES20", + ] + + if (is_linux) { + defines += [ "_XOPEN_SOURCE=500" ] + } + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_framework.gyp:debase + config("debase_config") { + include_dirs = [ "//third_party/khronos_glcts/framework/delibs/debase" ] + } + source_set("debase") { + sources = khronos_glcts_gypi.debase_srcs + + configs += [ ":defaults_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + + public_configs = [ ":debase_config" ] + + if (is_linux) { + cflags_c = [ "-Wno-implicit-function-declaration" ] + } + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_framework.gyp:depool + config("depool_config") { + include_dirs = [ "//third_party/khronos_glcts/framework/delibs/depool" ] + } + source_set("depool") { + sources = khronos_glcts_gypi.depool_srcs + + deps = [ + ":debase", + ] + + configs += [ ":defaults_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + + public_configs = [ ":depool_config" ] + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_framework.gyp:dethread + config("dethread_config") { + include_dirs = [ "//third_party/khronos_glcts/framework/delibs/dethread" ] + } + source_set("dethread") { + sources = khronos_glcts_gypi.dethread_srcs + + deps = [ + ":debase", + ] + + configs += [ ":defaults_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + + public_configs = [ ":dethread_config" ] + + if (is_linux) { + sources += khronos_glcts_gypi.dethread_unix_srcs + } + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_framework.gyp:deutil + config("deutil_config") { + include_dirs = [ "//third_party/khronos_glcts/framework/delibs/deutil" ] + } + source_set("deutil") { + sources = khronos_glcts_gypi.deutil_srcs + + deps = [ + ":debase", + ":depool", + ":dethread", + ] + + libs = [ "rt" ] + + configs += [ ":defaults_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + + public_configs = [ ":deutil_config" ] + + if (is_linux) { + cflags_c = [ "-Wno-string-conversion" ] + } + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_framework.gyp:decpp + config("decpp_config") { + include_dirs = [ "//third_party/khronos_glcts/framework/delibs/decpp" ] + } + source_set("decpp") { + sources = khronos_glcts_gypi.decpp_srcs + + deps = [ + ":debase", + ":depool", + ":dethread", + ":deutil", + ] + + configs += [ ":defaults_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + + public_configs = [ ":decpp_config" ] + + if (is_linux) { + configs -= [ "//build/config/gcc:no_exceptions" ] + } + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_framework.gyp:delibs + group("delibs") { + public_deps = [ + ":debase", + ":decpp", + ":depool", + ":dethread", + ":deutil", + ] + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_framework.gyp:qphelper + config("qphelper_config") { + include_dirs = [ "//third_party/khronos_glcts/framework/qphelper" ] + } + source_set("qphelper") { + sources = khronos_glcts_gypi.qphelper_srcs + + defines = [ "QP_SUPPORT_PNG" ] + + deps = [ + ":delibs", + "//third_party/libpng:libpng", + ] + + configs += [ ":defaults_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + + public_configs = [ ":qphelper_config" ] + + if (is_linux) { + cflags_c = [ "-Wno-string-conversion" ] + } + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_framework.gyp:tcutil + config("tcutil_config") { + include_dirs = [ "//third_party/khronos_glcts/framework/common" ] + } + source_set("tcutil") { + sources = khronos_glcts_gypi.tcutil_srcs + + deps = [ + ":delibs", + "//third_party/libpng:libpng", + ] + + public_deps = [ + ":qphelper", + ] + + include_dirs = [ "//third_party/khronos_glcts/framework/delibs/libpng" ] #png.hpp + + configs += [ ":defaults_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + + public_configs = [ ":tcutil_config" ] + + if (is_linux) { + configs -= [ "//build/config/gcc:no_exceptions" ] + cflags_cc = [ "-Wno-int-to-pointer-cast" ] + } + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_framework.gyp:glwrapper + config("glwrapper_config") { + include_dirs = [ "//third_party/khronos_glcts/framework/opengl/wrapper" ] + } + source_set("glwrapper") { + sources = khronos_glcts_gypi.glwrapper_srcs + + deps = [ + ":delibs", + "//gpu/command_buffer/client:gles2_c_lib_nocheck", + ] + + configs += [ ":defaults_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + + public_configs = [ ":glwrapper_config" ] + + if (is_linux) { + configs -= [ "//build/config/gcc:no_exceptions" ] + } + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_framework.gyp:glutil + config("glutil_config") { + include_dirs = [ "//third_party/khronos_glcts/framework/opengl" ] + } + source_set("glutil") { + sources = khronos_glcts_gypi.glutil_srcs + + public_deps = [ + ":glwrapper", + ] + + deps = [ + ":delibs", + ":tcutil", + ] + + configs += [ ":defaults_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + + public_configs = [ ":glutil_config" ] + + if (is_linux) { + configs -= [ "//build/config/gcc:no_exceptions" ] + } + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_framework.gyp:tcutil_egl + config("tcutil_egl_config") { + include_dirs = [ "//third_party/khronos_glcts/framework/egl" ] + } + source_set("tcutil_egl") { + sources = khronos_glcts_gypi.tcutil_egl_srcs + + deps = [ + ":delibs", + ":glwrapper", + ":tcutil", + "//gpu/gles2_conform_support/egl", + ] + + include_dirs = [ "//third_party/khronos_glcts/framework/opengl" ] + + configs += [ ":defaults_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + + public_configs = [ + ":tcutil_egl_config", + "//third_party/khronos:khronos_headers", + ] + + if (is_linux) { + configs -= [ "//build/config/gcc:no_exceptions" ] + cflags_cc = [ "-Wno-int-to-void-pointer-cast" ] + } + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_framework.gyp:khronos_glcts_framework + group("khronos_glcts_framework") { + public_deps = [ + ":delibs", + ":glutil", + ":qphelper", + ":tcutil", + ":tcutil_egl", + ] + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_cts.gyp:glcts_common + config("glcts_common_config") { + include_dirs = [ "//third_party/khronos_glcts/cts/common" ] + } + source_set("glcts_common") { + sources = khronos_glcts_gypi.glcts_common_sources + + deps = [ + ":delibs", + ":glutil", + ":tcutil", + ":tcutil_egl", + ] + + configs += [ ":defaults_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + + public_configs = [ ":glcts_common_config" ] + + if (is_linux) { + configs -= [ "//build/config/gcc:no_exceptions" ] + cflags_cc = [ "-Wno-string-conversion" ] + } + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_cts.gyp:glcts_gtf_wrapper + config("glcts_gtf_wrapper_config") { + include_dirs = [ "//third_party/khronos_glcts/cts/gtf" ] + } + source_set("glcts_gtf_wrapper") { + sources = khronos_glcts_gypi.glcts_gtf_wrapper_srcs + + deps = [ + ":delibs", + ":glcts_common", + ":glutil", + ":tcutil", + ":tcutil_egl", + ] + + include_dirs = [ "//third_party/khronos_glcts/GTF_ES/glsl/GTF/Source" ] + + configs += [ ":defaults_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + + public_configs = [ ":glcts_gtf_wrapper_config" ] + + if (is_linux) { + configs -= [ "//build/config/gcc:no_exceptions" ] + } + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_gtf.gyp:gtf_es + config("gtf_es_config") { + include_dirs = [ "//third_party/khronos_glcts/GTF_ES/glsl/GTF/Source" ] + } + source_set("gtf_es") { + sources = + khronos_glcts_gypi.gtf_core_srcs + khronos_glcts_gypi.gtf_gl_core_srcs + + khronos_glcts_gypi.gtf_gles2_srcs + + khronos_glcts_gypi.gtf_gles2_es_only_srcs + + deps = [ + ":debase", + ":glcts_gtf_wrapper", + "//third_party/expat", + ] + + configs += [ ":defaults_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + + public_configs = [ ":gtf_es_config" ] + + if (is_linux) { + cflags_c = [ + "-Wno-pointer-sign", + "-Wno-incompatible-pointer-types", + "-Wno-return-type", + "-Wno-parentheses-equality", + "-Wno-tautological-compare", + ] + } + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_cts.gyp:glcts_gtf + config("glcts_gtf_config") { + include_dirs = [ "//third_party/khronos_glcts/cts/gtf" ] + } + source_set("glcts_gtf") { + sources = khronos_glcts_gypi.glcts_gtf_srcs + + deps = [ + ":delibs", + ":glcts_common", + ":glcts_gtf_wrapper", + ":glutil", + ":gtf_es", + ":tcutil", + ] + + configs += [ ":defaults_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + + public_configs = [ ":glcts_gtf_config" ] + + if (is_linux) { + configs -= [ "//build/config/gcc:no_exceptions" ] + } + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_cts.gyp:glcts_es2 + config("glcts_es2_config") { + include_dirs = [ "//third_party/khronos_glcts/cts/gles2" ] + } + source_set("glcts_es2") { + sources = khronos_glcts_gypi.glcts_es2_srcs + + public_deps = [ + ":glcts_common", + ] + + deps = [ + ":delibs", + ":glcts_gtf", + ":glutil", + ":tcutil", + ] + + configs += [ ":defaults_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + + public_configs = [ ":glcts_es2_config" ] + + if (is_linux) { + configs -= [ "//build/config/gcc:no_exceptions" ] + } + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_test.gyp:tcutil_platform_windowless + source_set("tcutil_platform_windowless") { + sources = [ + "native/egl_native_windowless.cc", + ] + + deps = [ + ":khronos_glcts_framework", + ] + + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + } + + # GYP version: gpu/khronos_glcts_support/khronos_glcts_test.gyp:khronos_glcts_test_windowless + executable("khronos_glcts_test_windowless") { + sources = [ + "//third_party/khronos_glcts/cts/glcTestPackageEntry.cpp", + "//third_party/khronos_glcts/cts/glcTestPackageRegistry.cpp", + "//third_party/khronos_glcts/cts/glcTestPackageRegistry.hpp", + "native/main.cc", + ] + + deps = [ + ":glcts_es2", + ":glcts_gtf_resources", + ":glcts_resources", + ":khronos_glcts_framework", + ":tcutil_platform_windowless", + ] + + configs += [ ":defaults_config" ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + + if (is_linux) { + configs -= [ "//build/config/gcc:no_exceptions" ] + } + } +} + +# GYP version: gpu/khronos_glcts_support/khronos_glcts_test.gyp:khronos_glcts_test test("khronos_glcts_test") { sources = [ "khronos_glcts_test.cc", @@ -20,8 +554,15 @@ test("khronos_glcts_test") { "//testing/gtest", ] - # TODO(GYP) - make this work. crbug.com/471903 + data = [ + "khronos_glcts_test_expectations.txt", + ] + if (internal_khronos_glcts_tests) { - # TODO(GYP) implement me ... + sources += [ "$target_gen_dir/khronos_glcts_test_autogen.cc" ] + deps += [ + ":generate_khronos_glcts_tests", + ":khronos_glcts_test_windowless", + ] } } |