Edit

kc3-lang/angle/src/vulkan_support/vulkan.gypi

Branch :

  • Show log

    Commit

  • Author : Jamie Madill
    Date : 2016-11-30 12:38:28
    Hash : 327ba857
    Message : Vulkan: Hook up loader code. This integrates the build files for the loader SDK, and tests the compilation by calling InitInstance. There's no current way to test the runtime behaviour since there's no way for the tests to initialize the Vulkan back-end, that will come in the next CL. BUG=angleproject:1319 Change-Id: Ia8bf96ca068eaf40744c9753b59ffaaa5ada8a73 Reviewed-on: https://chromium-review.googlesource.com/367519 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>

  • src/vulkan_support/vulkan.gypi
  • # Copyright 2016 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.
    
    {
        'variables':
        {
            'vulkan_layers_path': '../../third_party/vulkan-validation-layers/src',
            'vulkan_loader_sources':
            [
                '<(vulkan_layers_path)/loader/cJSON.c',
                '<(vulkan_layers_path)/loader/cJSON.h',
                '<(vulkan_layers_path)/loader/debug_report.c',
                '<(vulkan_layers_path)/loader/debug_report.h',
                '<(vulkan_layers_path)/loader/dev_ext_trampoline.c',
                '<(vulkan_layers_path)/loader/extensions.c',
                '<(vulkan_layers_path)/loader/extensions.h',
                '<(vulkan_layers_path)/loader/gpa_helper.h',
                '<(vulkan_layers_path)/loader/loader.c',
                '<(vulkan_layers_path)/loader/loader.h',
                '<(vulkan_layers_path)/loader/murmurhash.c',
                '<(vulkan_layers_path)/loader/murmurhash.h',
                '<(vulkan_layers_path)/loader/table_ops.h',
                '<(vulkan_layers_path)/loader/trampoline.c',
                '<(vulkan_layers_path)/loader/vk_loader_platform.h',
                '<(vulkan_layers_path)/loader/wsi.c',
                '<(vulkan_layers_path)/loader/wsi.h',
            ],
            'vulkan_loader_win_sources':
            [
                '<(vulkan_layers_path)/loader/dirent_on_windows.c',
                '<(vulkan_layers_path)/loader/dirent_on_windows.h',
            ],
            'vulkan_loader_include_dirs':
            [
                '<(vulkan_layers_path)/include',
                '<(vulkan_layers_path)/loader',
            ],
            'vulkan_loader_cflags_win':
            [
                '/wd4054', # Type cast from function pointer
                '/wd4055', # Type cast from data pointer
                '/wd4100', # Unreferenced formal parameter
                '/wd4152', # Nonstandard extension used (pointer conversion)
                '/wd4201', # Nonstandard extension used: nameless struct/union
                '/wd4214', # Nonstandard extension used: bit field types other than int
                '/wd4232', # Nonstandard extension used: address of dllimport is not static
                '/wd4706', # Assignment within conditional expression
                '/wd4996', # Unsafe stdlib function
            ],
        },
        'conditions':
        [
            ['angle_enable_vulkan==1',
            {
                'targets':
                [
                    {
                        'target_name': 'vulkan_loader',
                        'type': 'static_library',
                        'sources':
                        [
                            '<@(vulkan_loader_sources)',
                        ],
                        'include_dirs':
                        [
                            '<@(vulkan_loader_include_dirs)',
                        ],
                        'defines':
                        [
                            'API_NAME="Vulkan"',
                        ],
                        'msvs_settings':
                        {
                            'VCCLCompilerTool':
                            {
                                'AdditionalOptions':
                                [
                                    '<@(vulkan_loader_cflags_win)',
                                ],
                            },
                            'VCLinkerTool':
                            {
                                'AdditionalDependencies':
                                [
                                    'shlwapi.lib',
                                ],
                            },
                        },
                        'direct_dependent_settings':
                        {
                            'include_dirs':
                            [
                                '<@(vulkan_loader_include_dirs)',
                            ],
                            'msvs_settings':
                            {
                                'VCLinkerTool':
                                {
                                    'AdditionalDependencies':
                                    [
                                        'shlwapi.lib',
                                    ],
                                },
                            },
                            'conditions':
                            [
                                ['OS=="win"',
                                {
                                    'defines':
                                    [
                                        'VK_USE_PLATFORM_WIN32_KHR',
                                    ],
                                }],
                            ],
                        },
                        'conditions':
                        [
                            ['OS=="win"',
                            {
                                'sources':
                                [
                                    '<@(vulkan_loader_win_sources)',
                                ],
                                'defines':
                                [
                                    'VK_USE_PLATFORM_WIN32_KHR',
                                ],
                            }],
                        ],
                    },
                ],
            }],
        ],
    }