xref: /aosp_15_r20/external/angle/src/libANGLE/features.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1 //
2 // Copyright 2014 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 
7 #ifndef LIBANGLE_FEATURES_H_
8 #define LIBANGLE_FEATURES_H_
9 
10 #include "common/platform.h"
11 
12 // Feature defaults
13 
14 // Direct3D9EX
15 // The "Debug This Pixel..." feature in PIX often fails when using the
16 // D3D9Ex interfaces.  In order to get debug pixel to work on a Vista/Win 7
17 // machine, define "ANGLE_D3D9EX=0" in your project file.
18 #if !defined(ANGLE_D3D9EX)
19 #    define ANGLE_D3D9EX 1
20 #endif
21 
22 // Vsync
23 // ENABLED allows Vsync to be configured at runtime
24 // DISABLED disallows Vsync
25 #if !defined(ANGLE_VSYNC)
26 #    define ANGLE_VSYNC 1
27 #endif
28 
29 // Append HLSL assembly to shader debug info. Defaults to enabled in Debug and off in Release.
30 #if !defined(ANGLE_APPEND_ASSEMBLY_TO_SHADER_DEBUG_INFO)
31 #    if !defined(NDEBUG)
32 #        define ANGLE_APPEND_ASSEMBLY_TO_SHADER_DEBUG_INFO 1
33 #    else
34 #        define ANGLE_APPEND_ASSEMBLY_TO_SHADER_DEBUG_INFO 0
35 #    endif  // !defined(NDEBUG)
36 #endif      // !defined(ANGLE_APPEND_ASSEMBLY_TO_SHADER_DEBUG_INFO)
37 
38 // Program link validation of precisions for uniforms. This feature was
39 // requested by developers to allow non-conformant shaders to be used which
40 // contain mismatched precisions.
41 // ENABLED validate that precision for uniforms match between vertex and fragment shaders
42 // DISABLED allow precision for uniforms to differ between vertex and fragment shaders
43 #if !defined(ANGLE_PROGRAM_LINK_VALIDATE_UNIFORM_PRECISION)
44 #    define ANGLE_PROGRAM_LINK_VALIDATE_UNIFORM_PRECISION 1
45 #endif
46 
47 #endif  // LIBANGLE_FEATURES_H_
48