Edit

kc3-lang/angle/src/tests/deqp_support/angle_deqp_libtester.h

Branch :

  • Show log

    Commit

  • Author : Shahbaz Youssefi
    Date : 2021-08-23 17:25:15
    Hash : f3d5dac3
    Message : Vulkan: SPIR-V Gen: Drop dependency to glslang The SPIR-V gen path is now made default. Compilation through glslang is still supported for debugging, and is enabled on the GLSL* end2end tests for smoke testing. On release builds, glslang is not supported. To test with glslang, add the following gn arg (only necessary if dcheck is disabled): angle_enable_spirv_gen_through_glslang = true Then enable the generateSPIRVThroughGlslang feature. This can be done by setting an environment variable: ANGLE_FEATURE_OVERRIDES_ENABLED=generateSPIRVThroughGlslang ./angle_deqp_gles2_tests Binary size saving: - 1.3MB on Linux (SPIR-V gen itself: 240KB) - 730KB on Android (SPIR-V gen itself: 140KB) Perf tests: - LinkProgramBenchmark.Run/vulkan_compile_single_thread * Through glslang: truncated mean: 1287033.36 * Direct SPIR-V Gen: truncated mean: 244495.91 (~80% reduction) - LinkProgramBenchmark.Run/vulkan_compile_multi_thread * Through glslang: truncated mean: 4565894.83 * Direct SPIR-V Gen: truncated mean: 1158164.10 (~75% reduction) Bug: angleproject:4889 Bug: angleproject:6210 Change-Id: I486342702977c8114e90073b97183aba115a8b2d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3115140 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>

  • src/tests/deqp_support/angle_deqp_libtester.h
  • //
    // Copyright 2014 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.
    //
    
    // angle_deqp_libtester.h:
    //   Exports for the ANGLE dEQP libtester module.
    
    #ifndef ANGLE_DEQP_LIBTESTER_H_
    #define ANGLE_DEQP_LIBTESTER_H_
    
    #include <stdint.h>
    
    #if defined(_WIN32)
    #    if defined(ANGLE_DEQP_LIBTESTER_IMPLEMENTATION)
    #        define ANGLE_LIBTESTER_EXPORT __declspec(dllexport)
    #    else
    #        define ANGLE_LIBTESTER_EXPORT __declspec(dllimport)
    #    endif
    #elif defined(__GNUC__)
    #    if defined(ANGLE_DEQP_LIBTESTER_IMPLEMENTATION)
    #        define ANGLE_LIBTESTER_EXPORT __attribute__((visibility("default")))
    #    else
    #        define ANGLE_LIBTESTER_EXPORT
    #    endif
    #else
    #    define ANGLE_LIBTESTER_EXPORT
    #endif
    
    // Possible results of deqp_libtester_run
    enum class dEQPTestResult
    {
        Pass,
        Fail,
        NotSupported,
        Exception,
    };
    
    struct dEQPOptions
    {
        uint32_t preRotation;
        bool enableRenderDocCapture;
    };
    
    // Exported to the tester app.
    ANGLE_LIBTESTER_EXPORT int deqp_libtester_main(int argc, const char *argv[]);
    ANGLE_LIBTESTER_EXPORT bool deqp_libtester_init_platform(int argc,
                                                             const char *argv[],
                                                             void *logErrorFunc,
                                                             const dEQPOptions &options);
    ANGLE_LIBTESTER_EXPORT void deqp_libtester_shutdown_platform();
    ANGLE_LIBTESTER_EXPORT dEQPTestResult deqp_libtester_run(const char *caseName);
    
    #endif  // ANGLE_DEQP_LIBTESTER_H_