Hash :
f3d5dac3
Author :
Date :
2021-08-23T17:25:15
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>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
//
// 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.
//
#ifndef TEST_EXPECTATIONS_GPU_TEST_CONFIG_H_
#define TEST_EXPECTATIONS_GPU_TEST_CONFIG_H_
#include <common/bitset_utils.h>
namespace angle
{
struct GPUTestConfig
{
public:
enum API
{
kAPIUnknown = 0,
kAPID3D9,
kAPID3D11,
kAPIGLDesktop,
kAPIGLES,
kAPIVulkan,
kAPISwiftShader,
kAPIMetal,
};
enum Condition
{
kConditionNone = 0,
kConditionWinXP,
kConditionWinVista,
kConditionWin7,
kConditionWin8,
kConditionWin10,
kConditionWin,
kConditionMacLeopard,
kConditionMacSnowLeopard,
kConditionMacLion,
kConditionMacMountainLion,
kConditionMacMavericks,
kConditionMacYosemite,
kConditionMacElCapitan,
kConditionMacSierra,
kConditionMacHighSierra,
kConditionMacMojave,
kConditionMac,
kConditionIOS,
kConditionLinux,
kConditionAndroid,
kConditionNVIDIA,
kConditionAMD,
kConditionIntel,
kConditionVMWare,
kConditionApple,
kConditionRelease,
kConditionDebug,
kConditionD3D9,
kConditionD3D11,
kConditionGLDesktop,
kConditionGLES,
kConditionVulkan,
kConditionMetal,
kConditionNexus5X,
kConditionPixel2OrXL,
kConditionPixel4OrXL,
kConditionNVIDIAQuadroP400,
kConditionSwiftShader,
kConditionPreRotation,
kConditionPreRotation90,
kConditionPreRotation180,
kConditionPreRotation270,
kNumberOfConditions,
};
using ConditionArray = angle::BitSet<GPUTestConfig::kNumberOfConditions>;
GPUTestConfig();
GPUTestConfig(bool isSwiftShader);
GPUTestConfig(const API &api, uint32_t preRotation);
const GPUTestConfig::ConditionArray &getConditions() const;
protected:
GPUTestConfig::ConditionArray mConditions;
};
} // namespace angle
#endif // TEST_EXPECTATIONS_GPU_TEST_CONFIG_H_