diff options
author | Andrew Knight <andrew.knight@digia.com> | 2014-09-25 13:22:55 +0300 |
---|---|---|
committer | Andrew Knight <andrew.knight@digia.com> | 2014-09-29 16:09:29 +0200 |
commit | 311157c3c6849e8efccd88f7594bb34c570a6780 (patch) | |
tree | a50c252b638488326529c0e69aa05e42abce7462 /src/3rdparty/angle/src/libGLESv2/formatutils.h | |
parent | 04d3a89e20d49a3b5015b071bfdedc81973b090c (diff) |
ANGLE: Upgrade to 2.1~abce76206141
Upgrade to address issues discovered since the last upgrade.
Patch notes:
0000-General-fixes-for-ANGLE-2.1.patch
added removal of the unused third-party tracing functions
0003-Fix-compilation-with-MinGW-gcc-64-bit.patch
removed as it is no longer needed
0011-ANGLE-Fix-compilation-error-on-MinGW-caused-by-trace.patch
removed as it is no longer needed
0016-ANGLE-Fix-compilation-with-MinGW-D3D11.patch
now supports MinGW 64-bit
[ChangeLog][Third-party libraries] ANGLE updated to 2.1~f8602ad91e4f
Task-number: QTBUG-40649
Task-number: QTBUG-40658
Task-number: QTBUG-41031
Task-number: QTBUG-41081
Task-number: QTBUG-41308
Task-number: QTBUG-41563
Change-Id: I9f776c8d5cb94ddb12d608a8d5630bfc54437bea
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/3rdparty/angle/src/libGLESv2/formatutils.h')
-rw-r--r-- | src/3rdparty/angle/src/libGLESv2/formatutils.h | 98 |
1 files changed, 58 insertions, 40 deletions
diff --git a/src/3rdparty/angle/src/libGLESv2/formatutils.h b/src/3rdparty/angle/src/libGLESv2/formatutils.h index 2f592798b8..25106a52e5 100644 --- a/src/3rdparty/angle/src/libGLESv2/formatutils.h +++ b/src/3rdparty/angle/src/libGLESv2/formatutils.h @@ -9,12 +9,13 @@ #ifndef LIBGLESV2_FORMATUTILS_H_ #define LIBGLESV2_FORMATUTILS_H_ -#include "angle_gl.h" - #include "libGLESv2/Caps.h" #include "libGLESv2/angletypes.h" +#include "angle_gl.h" + #include <cstddef> +#include <cstdint> typedef void (*MipGenerationFunction)(size_t sourceWidth, size_t sourceHeight, size_t sourceDepth, const uint8_t *sourceData, size_t sourceRowPitch, size_t sourceDepthPitch, @@ -27,61 +28,78 @@ typedef void (*LoadImageFunction)(size_t width, size_t height, size_t depth, typedef void (*InitializeTextureDataFunction)(size_t width, size_t height, size_t depth, uint8_t *output, size_t outputRowPitch, size_t outputDepthPitch); -typedef void (*ColorReadFunction)(const void *source, void *dest); -typedef void (*ColorWriteFunction)(const void *source, void *dest); -typedef void (*ColorCopyFunction)(const void *source, void *dest); +typedef void (*ColorReadFunction)(const uint8_t *source, uint8_t *dest); +typedef void (*ColorWriteFunction)(const uint8_t *source, uint8_t *dest); +typedef void (*ColorCopyFunction)(const uint8_t *source, uint8_t *dest); -typedef void (*VertexCopyFunction)(const void *input, size_t stride, size_t count, void *output); +typedef void (*VertexCopyFunction)(const uint8_t *input, size_t stride, size_t count, uint8_t *output); namespace gl { -typedef std::set<GLenum> FormatSet; +struct FormatType +{ + FormatType(); + + GLenum internalFormat; + ColorWriteFunction colorWriteFunction; +}; +const FormatType &GetFormatTypeInfo(GLenum format, GLenum type); + +struct Type +{ + Type(); + + GLuint bytes; + bool specialInterpretation; +}; +const Type &GetTypeInfo(GLenum type); -bool IsValidInternalFormat(GLenum internalFormat, const Extensions &extensions, GLuint clientVersion); -bool IsValidFormat(GLenum format, const Extensions &extensions, GLuint clientVersion); -bool IsValidType(GLenum type, const Extensions &extensions, GLuint clientVersion); +struct InternalFormat +{ + InternalFormat(); -bool IsValidFormatCombination(GLenum internalFormat, GLenum format, GLenum type, const Extensions &extensions, GLuint clientVersion); -bool IsValidCopyTexImageCombination(GLenum textureInternalFormat, GLenum frameBufferInternalFormat, GLuint readBufferHandle, GLuint clientVersion); + GLuint redBits; + GLuint greenBits; + GLuint blueBits; -bool IsRenderingSupported(GLenum internalFormat, const Extensions &extensions, GLuint clientVersion); -bool IsFilteringSupported(GLenum internalFormat, const Extensions &extensions, GLuint clientVersion); + GLuint luminanceBits; -bool IsSizedInternalFormat(GLenum internalFormat); -GLenum GetSizedInternalFormat(GLenum format, GLenum type); + GLuint alphaBits; + GLuint sharedBits; -GLuint GetPixelBytes(GLenum internalFormat); -GLuint GetAlphaBits(GLenum internalFormat); -GLuint GetRedBits(GLenum internalFormat); -GLuint GetGreenBits(GLenum internalFormat); -GLuint GetBlueBits(GLenum internalFormat); -GLuint GetLuminanceBits(GLenum internalFormat); -GLuint GetDepthBits(GLenum internalFormat); -GLuint GetStencilBits(GLenum internalFormat); + GLuint depthBits; + GLuint stencilBits; -GLuint GetTypeBytes(GLenum type); -bool IsSpecialInterpretationType(GLenum type); -bool IsFloatOrFixedComponentType(GLenum type); + GLuint pixelBytes; -GLenum GetFormat(GLenum internalFormat); -GLenum GetType(GLenum internalFormat); + GLuint componentCount; -GLenum GetComponentType(GLenum internalFormat); -GLuint GetComponentCount(GLenum internalFormat); -GLenum GetColorEncoding(GLenum internalFormat); + bool compressed; + GLuint compressedBlockWidth; + GLuint compressedBlockHeight; -GLuint GetRowPitch(GLenum internalFormat, GLenum type, GLsizei width, GLint alignment); -GLuint GetDepthPitch(GLenum internalFormat, GLenum type, GLsizei width, GLsizei height, GLint alignment); -GLuint GetBlockSize(GLenum internalFormat, GLenum type, GLsizei width, GLsizei height); + GLenum format; + GLenum type; -bool IsFormatCompressed(GLenum internalFormat); -GLuint GetCompressedBlockWidth(GLenum internalFormat); -GLuint GetCompressedBlockHeight(GLenum internalFormat); + GLenum componentType; + GLenum colorEncoding; -const FormatSet &GetAllSizedInternalFormats(); + typedef bool (*SupportCheckFunction)(GLuint, const Extensions &); + SupportCheckFunction textureSupport; + SupportCheckFunction renderSupport; + SupportCheckFunction filterSupport; -ColorWriteFunction GetColorWriteFunction(GLenum format, GLenum type); + GLuint computeRowPitch(GLenum type, GLsizei width, GLint alignment) const; + GLuint computeDepthPitch(GLenum type, GLsizei width, GLsizei height, GLint alignment) const; + GLuint computeBlockSize(GLenum type, GLsizei width, GLsizei height) const; +}; +const InternalFormat &GetInternalFormatInfo(GLenum internalFormat); + +GLenum GetSizedInternalFormat(GLenum internalFormat, GLenum type); + +typedef std::set<GLenum> FormatSet; +const FormatSet &GetAllSizedInternalFormats(); } |