summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/libGLESv2/Caps.h
diff options
context:
space:
mode:
authorAndrew Knight <andrew.knight@digia.com>2014-08-05 12:59:44 +0300
committerAndrew Knight <andrew.knight@digia.com>2014-08-05 16:43:22 +0200
commita6a12d8c0fc918972c15268f749ecc7c90b95d6c (patch)
treecb6d986d30ef97e932ab51768854d5d9b46729d3 /src/3rdparty/angle/src/libGLESv2/Caps.h
parent14f9c09542bd6cc19430473da9ce4c68f239ec7d (diff)
ANGLE: upgrade to 2.1~07d49ef5350a
This version of ANGLE provides partial ES3 support, numerous bug fixes, and several potentially useful vendor extensions. All patches have been rebased. The following changes are noted: 0000-General-fixes-for-ANGLE-2.1.patch contains compile fixes for the new ANGLE 0004-Make-it-possible-to-link-ANGLE-statically-for-single.patch has incorporated patch 0015. 0007-Make-DX9-DX11-mutually-exclusive.patch has been removed as it was fixed upstream. 0007-Fix-ANGLE-build-with-Microsoft-Visual-Studio-14-CTP.patch has been moved up to fill the patch number gap. 0010-ANGLE-Enable-D3D11-for-feature-level-9-cards.patch now contains patch 0014 and 0017. 0013-ANGLE-Allow-for-universal-program-binaries.patch has been removed as it is no longer relevant. 0014-ANGLE-D3D11-Fix-internal-index-buffer-for-level-9-ha.patch has been merged with patch 0010. 0015-ANGLE-Don-t-export-DLLMain-functions-for-static-buil.patch has been merged with patch 0004. 0016-ANGLE-WinRT-Call-Trim-when-application-suspends.patch has been removed and will be replaced by a follow-up patch using a different technique. 0017-ANGLE-D3D11-Don-t-use-mipmaps-in-level-9-textures.patch has been merged with patch 0010. 0018-ANGLE-WinRT-Create-swap-chain-using-physical-resolut.patch has been removed and will be replaced by a follow-up patch extending the EGL_ANGLE_window_fixed_size extension. 0019-Fix-ANGLE-build-with-Microsoft-Visual-Studio-14-CTP.patch is now patch 0007. [ChangeLog][Third-party libraries] ANGLE has been upgraded to version 2.1, bringing partial support for OpenGL ES3 over Direct3D 11, numerous bug fixes, and several new vendor extensions. Change-Id: I6d95ce1480462d67228d83c1e5c74a1706b5b21c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/3rdparty/angle/src/libGLESv2/Caps.h')
-rw-r--r--src/3rdparty/angle/src/libGLESv2/Caps.h222
1 files changed, 222 insertions, 0 deletions
diff --git a/src/3rdparty/angle/src/libGLESv2/Caps.h b/src/3rdparty/angle/src/libGLESv2/Caps.h
new file mode 100644
index 0000000000..a08618ec9c
--- /dev/null
+++ b/src/3rdparty/angle/src/libGLESv2/Caps.h
@@ -0,0 +1,222 @@
+#ifndef LIBGLESV2_CAPS_H
+#define LIBGLESV2_CAPS_H
+
+//
+// Copyright (c) 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.
+//
+
+#include "angle_gl.h"
+
+#include <set>
+#include <unordered_map>
+#include <vector>
+#include <string>
+
+namespace gl
+{
+
+struct TextureCaps
+{
+ TextureCaps();
+
+ // Supports for basic texturing: glTexImage, glTexSubImage, etc
+ bool texturable;
+
+ // Support for linear or anisotropic filtering
+ bool filterable;
+
+ // Support for being used as a framebuffer attachment or renderbuffer format
+ bool renderable;
+
+ std::set<GLuint> sampleCounts;
+};
+
+class TextureCapsMap
+{
+ public:
+ typedef std::unordered_map<GLenum, TextureCaps>::const_iterator const_iterator;
+
+ void insert(GLenum internalFormat, const TextureCaps &caps);
+ void remove(GLenum internalFormat);
+
+ const TextureCaps &get(GLenum internalFormat) const;
+
+ const_iterator begin() const;
+ const_iterator end() const;
+
+ size_t size() const;
+
+ private:
+ typedef std::unordered_map<GLenum, TextureCaps> InternalFormatToCapsMap;
+ InternalFormatToCapsMap mCapsMap;
+};
+
+struct Extensions
+{
+ Extensions();
+
+ // Generate a vector of supported extension strings
+ std::vector<std::string> getStrings() const;
+
+ // Set all texture related extension support based on the supported textures.
+ // Determines support for:
+ // GL_OES_rgb8_rgba8
+ // GL_EXT_texture_format_BGRA8888
+ // GL_OES_texture_half_float, GL_OES_texture_half_float_linear
+ // GL_OES_texture_float, GL_OES_texture_float_linear
+ // GL_EXT_texture_rg
+ // GL_EXT_texture_compression_dxt1, GL_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5
+ // GL_ANGLE_depth_texture
+ // GL_EXT_color_buffer_float
+ void setTextureExtensionSupport(const TextureCapsMap &textureCaps);
+
+ // ES2 Extension support
+
+ // GL_OES_element_index_uint
+ bool elementIndexUint;
+
+ // GL_OES_packed_depth_stencil
+ bool packedDepthStencil;
+
+ // GL_OES_get_program_binary
+ bool getProgramBinary;
+
+ // GL_OES_rgb8_rgba8
+ // Implies that TextureCaps for GL_RGB8 and GL_RGBA8 exist
+ bool rgb8rgba8;
+
+ // GL_EXT_texture_format_BGRA8888
+ // Implies that TextureCaps for GL_BGRA8 exist
+ bool textureFormatBGRA8888;
+
+ // GL_EXT_read_format_bgra
+ bool readFormatBGRA;
+
+ // GL_NV_pixel_buffer_object
+ bool pixelBufferObject;
+
+ // GL_OES_mapbuffer and GL_EXT_map_buffer_range
+ bool mapBuffer;
+ bool mapBufferRange;
+
+ // GL_OES_texture_half_float and GL_OES_texture_half_float_linear
+ // Implies that TextureCaps for GL_RGB16F, GL_RGBA16F, GL_ALPHA32F_EXT, GL_LUMINANCE32F_EXT and
+ // GL_LUMINANCE_ALPHA32F_EXT exist
+ bool textureHalfFloat;
+ bool textureHalfFloatLinear;
+
+ // GL_OES_texture_float and GL_OES_texture_float_linear
+ // Implies that TextureCaps for GL_RGB32F, GL_RGBA32F, GL_ALPHA16F_EXT, GL_LUMINANCE16F_EXT and
+ // GL_LUMINANCE_ALPHA16F_EXT exist
+ bool textureFloat;
+ bool textureFloatLinear;
+
+ // GL_EXT_texture_rg
+ // Implies that TextureCaps for GL_R8, GL_RG8 (and floating point R/RG texture formats if floating point extensions
+ // are also present) exist
+ bool textureRG;
+
+ // GL_EXT_texture_compression_dxt1, GL_ANGLE_texture_compression_dxt3 and GL_ANGLE_texture_compression_dxt5
+ // Implies that TextureCaps for GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT
+ // GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE and GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE
+ bool textureCompressionDXT1;
+ bool textureCompressionDXT3;
+ bool textureCompressionDXT5;
+
+ // GL_EXT_sRGB
+ // Implies that TextureCaps for GL_SRGB8_ALPHA8 and GL_SRGB8 exist
+ // TODO: Don't advertise this extension in ES3
+ bool sRGB;
+
+ // GL_ANGLE_depth_texture
+ bool depthTextures;
+
+ // GL_EXT_texture_storage
+ bool textureStorage;
+
+ // GL_OES_texture_npot
+ bool textureNPOT;
+
+ // GL_EXT_draw_buffers
+ bool drawBuffers;
+
+ // GL_EXT_texture_filter_anisotropic
+ bool textureFilterAnisotropic;
+ GLfloat maxTextureAnisotropy;
+
+ // GL_EXT_occlusion_query_boolean
+ bool occlusionQueryBoolean;
+
+ // GL_NV_fence
+ bool fence;
+
+ // GL_ANGLE_timer_query
+ bool timerQuery;
+
+ // GL_EXT_robustness
+ bool robustness;
+
+ // GL_EXT_blend_minmax
+ bool blendMinMax;
+
+ // GL_ANGLE_framebuffer_blit
+ bool framebufferBlit;
+
+ // GL_ANGLE_framebuffer_multisample
+ bool framebufferMultisample;
+
+ // GL_ANGLE_instanced_arrays
+ bool instancedArrays;
+
+ // GL_ANGLE_pack_reverse_row_order
+ bool packReverseRowOrder;
+
+ // GL_OES_standard_derivatives
+ bool standardDerivatives;
+
+ // GL_EXT_shader_texture_lod
+ bool shaderTextureLOD;
+
+ // GL_EXT_frag_depth
+ bool fragDepth;
+
+ // GL_ANGLE_texture_usage
+ bool textureUsage;
+
+ // GL_ANGLE_translated_shader_source
+ bool translatedShaderSource;
+
+ // ES3 Extension support
+
+ // GL_EXT_color_buffer_float
+ bool colorBufferFloat;
+};
+
+struct Caps
+{
+ Caps();
+
+ // Table 6.28, implementation dependent values
+ GLuint64 maxElementIndex;
+ GLuint max3DTextureSize;
+ GLuint max2DTextureSize;
+ GLuint maxArrayTextureLayers;
+ GLfloat maxLODBias;
+ GLuint maxCubeMapTextureSize;
+ GLuint maxRenderbufferSize;
+ GLuint maxDrawBuffers;
+ GLuint maxColorAttachments;
+ GLuint maxViewportWidth;
+ GLuint maxViewportHeight;
+ GLfloat minAliasedPointSize;
+ GLfloat maxAliasedPointSize;
+ GLfloat minAliasedLineWidth;
+ GLfloat maxAliasedLineWidth;
+
+};
+
+}
+
+#endif // LIBGLESV2_CAPS_H