Bug 1866777 - Disable test_race_cache_with_network.js on windows opt for frequent...
[gecko.git] / gfx / gl / GLDefs.h
blob56f803149363e64484206d64768370785d805cb9
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #if !defined(LOCALGL_H_)
6 # define LOCALGL_H_
8 # include "GLTypes.h"
9 # include "GLConsts.h"
11 namespace mozilla {
12 namespace gl {
13 class GLContext;
14 bool CheckContextLost(const GLContext* gl);
15 } // namespace gl
16 } // namespace mozilla
18 # define MOZ_GL_ASSERT(glContext, expr) \
19 MOZ_ASSERT((expr) || mozilla::gl::CheckContextLost(glContext))
21 // -
23 // clang-format off
25 // TODO: use official constant names instead of followed ones.
27 // IMG_texture_compression_pvrtc
28 #define LOCAL_GL_COMPRESSED_RGB_PVRTC_4BPPV1 0x8C00
29 #define LOCAL_GL_COMPRESSED_RGB_PVRTC_2BPPV1 0x8C01
30 #define LOCAL_GL_COMPRESSED_RGBA_PVRTC_4BPPV1 0x8C02
31 #define LOCAL_GL_COMPRESSED_RGBA_PVRTC_2BPPV1 0x8C03
33 // OES_EGL_image_external
34 #define LOCAL_GL_TEXTURE_EXTERNAL 0x8D65
35 #define LOCAL_GL_TEXTURE_BINDING_EXTERNAL 0x8D67
37 // AMD_compressed_ATC_texture
38 #define LOCAL_GL_ATC_RGB 0x8C92
39 #define LOCAL_GL_ATC_RGBA_EXPLICIT_ALPHA 0x8C93
40 #define LOCAL_GL_ATC_RGBA_INTERPOLATED_ALPHA 0x87EE
42 // EGL_ANDROID_image_crop
43 #define LOCAL_EGL_IMAGE_CROP_LEFT_ANDROID 0x3148
44 #define LOCAL_EGL_IMAGE_CROP_TOP_ANDROID 0x3149
45 #define LOCAL_EGL_IMAGE_CROP_RIGHT_ANDROID 0x314A
46 #define LOCAL_EGL_IMAGE_CROP_BOTTOM_ANDROID 0x314B
48 // EGL_ANGLE_platform_angle
49 #define LOCAL_EGL_PLATFORM_ANGLE_ANGLE 0x3202
50 #define LOCAL_EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3203
51 #define LOCAL_EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE 0x3204
52 #define LOCAL_EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE 0x3205
53 #define LOCAL_EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE 0x3206
54 #define LOCAL_EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED_ANGLE 0x3451
56 // EGL_ANGLE_keyed_mutex
57 #define LOCAL_EGL_DXGI_KEYED_MUTEX_ANGLE 0x33A2
59 // EGL_ANGLE_stream_producer_d3d_texture
60 #define LOCAL_EGL_D3D_TEXTURE_SUBRESOURCE_ID_ANGLE 0x33AB
62 // EGL_ANGLE_platform_angle_d3d
63 #define LOCAL_EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3207
64 #define LOCAL_EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208
65 #define LOCAL_EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE 0x3209
66 #define LOCAL_EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE 0x320A
67 #define LOCAL_EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE 0x320B
68 #define LOCAL_EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE 0x320C
69 #define LOCAL_EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE 0x320F
71 // EGL_ANGLE_d3d_texture_client_buffer
72 #define LOCAL_EGL_D3D_TEXTURE_ANGLE 0x33A3
74 // EGL_ANGLE_flexible_surface_compatibility
75 #define LOCAL_EGL_FLEXIBLE_SURFACE_COMPATIBILITY_SUPPORTED_ANGLE 0x33A6
77 // EGL_ANGLE_experimental_present_path
78 #define LOCAL_EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE 0x33A4
79 #define LOCAL_EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE 0x33A9
80 #define LOCAL_EGL_EXPERIMENTAL_PRESENT_PATH_COPY_ANGLE 0x33AA
82 // EGL_ANGLE_direct3d_display
83 #define LOCAL_EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE ((EGLNativeDisplayType)-2)
84 #define LOCAL_EGL_D3D11_ONLY_DISPLAY_ANGLE ((EGLNativeDisplayType)-3)
86 // EGL_ANGLE_feature_control
87 #define LOCAL_EGL_FEATURE_OVERRIDES_ENABLED_ANGLE 0x3466
89 // WGL_NV_DX_interop
90 #define LOCAL_WGL_ACCESS_READ_ONLY 0x0000
91 #define LOCAL_WGL_ACCESS_READ_WRITE 0x0001
92 #define LOCAL_WGL_ACCESS_WRITE_DISCARD 0x0002
94 // Others
95 #define LOCAL_EGL_PRESERVED_RESOURCES 0x3030
96 #define LOCAL_EGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_EXT 0x3138
97 #define LOCAL_GL_CONTEXT_FLAGS_ARB 0x2094
98 #define LOCAL_GL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
99 #define LOCAL_GL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
100 #define LOCAL_GL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
102 // EGL_ANGLE_create_context_backwards_compatible
103 #define LOCAL_EGL_CONTEXT_OPENGL_BACKWARDS_COMPATIBLE_ANGLE 0x3483
105 // EGL_ANGLE_image_d3d11_texture
106 #define LOCAL_EGL_D3D11_TEXTURE_ANGLE 0x3484
108 // clang-format on
110 #endif