summaryrefslogtreecommitdiffstats
path: root/gfx/angle/src/libANGLE/renderer/gl/formatutilsgl.h
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /gfx/angle/src/libANGLE/renderer/gl/formatutilsgl.h
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'gfx/angle/src/libANGLE/renderer/gl/formatutilsgl.h')
-rwxr-xr-xgfx/angle/src/libANGLE/renderer/gl/formatutilsgl.h129
1 files changed, 129 insertions, 0 deletions
diff --git a/gfx/angle/src/libANGLE/renderer/gl/formatutilsgl.h b/gfx/angle/src/libANGLE/renderer/gl/formatutilsgl.h
new file mode 100755
index 000000000..616f37af2
--- /dev/null
+++ b/gfx/angle/src/libANGLE/renderer/gl/formatutilsgl.h
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2015 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.
+//
+
+// formatutilsgl.h: Queries for GL image formats and their translations to native
+// GL formats.
+
+#ifndef LIBANGLE_RENDERER_GL_FORMATUTILSGL_H_
+#define LIBANGLE_RENDERER_GL_FORMATUTILSGL_H_
+
+#include <map>
+#include <string>
+#include <vector>
+
+#include "angle_gl.h"
+#include "libANGLE/Version.h"
+#include "libANGLE/renderer/gl/FunctionsGL.h"
+#include "libANGLE/renderer/gl/WorkaroundsGL.h"
+
+namespace rx
+{
+
+namespace nativegl
+{
+
+struct SupportRequirement
+{
+ SupportRequirement();
+
+ // Version that this format became supported without extensions
+ gl::Version version;
+
+ // Extensions that are required if the minimum version is not met
+ std::vector<std::string> versionExtensions;
+
+ // Extensions that are always required to support this format
+ std::vector<std::string> requiredExtensions;
+};
+
+struct InternalFormat
+{
+ InternalFormat();
+
+ SupportRequirement texture;
+ SupportRequirement filter;
+ SupportRequirement renderbuffer;
+ SupportRequirement framebufferAttachment;
+};
+const InternalFormat &GetInternalFormatInfo(GLenum internalFormat, StandardGL standard);
+
+struct TexImageFormat
+{
+ GLenum internalFormat;
+ GLenum format;
+ GLenum type;
+};
+TexImageFormat GetTexImageFormat(const FunctionsGL *functions,
+ const WorkaroundsGL &workarounds,
+ GLenum internalFormat,
+ GLenum format,
+ GLenum type);
+
+struct TexSubImageFormat
+{
+ GLenum format;
+ GLenum type;
+};
+TexSubImageFormat GetTexSubImageFormat(const FunctionsGL *functions,
+ const WorkaroundsGL &workarounds,
+ GLenum format,
+ GLenum type);
+
+struct CompressedTexImageFormat
+{
+ GLenum internalFormat;
+};
+CompressedTexImageFormat GetCompressedTexImageFormat(const FunctionsGL *functions,
+ const WorkaroundsGL &workarounds,
+ GLenum internalFormat);
+
+struct CompressedTexSubImageFormat
+{
+ GLenum format;
+};
+CompressedTexSubImageFormat GetCompressedSubTexImageFormat(const FunctionsGL *functions,
+ const WorkaroundsGL &workarounds,
+ GLenum format);
+
+struct CopyTexImageImageFormat
+{
+ GLenum internalFormat;
+};
+CopyTexImageImageFormat GetCopyTexImageImageFormat(const FunctionsGL *functions,
+ const WorkaroundsGL &workarounds,
+ GLenum internalFormat,
+ GLenum framebufferType);
+
+struct TexStorageFormat
+{
+ GLenum internalFormat;
+};
+TexStorageFormat GetTexStorageFormat(const FunctionsGL *functions,
+ const WorkaroundsGL &workarounds,
+ GLenum internalFormat);
+
+struct RenderbufferFormat
+{
+ GLenum internalFormat;
+};
+RenderbufferFormat GetRenderbufferFormat(const FunctionsGL *functions,
+ const WorkaroundsGL &workarounds,
+ GLenum internalFormat);
+
+struct ReadPixelsFormat
+{
+ GLenum format;
+ GLenum type;
+};
+ReadPixelsFormat GetReadPixelsFormat(const FunctionsGL *functions,
+ const WorkaroundsGL &workarounds,
+ GLenum format,
+ GLenum type);
+}
+
+}
+
+#endif // LIBANGLE_RENDERER_GL_FORMATUTILSGL_H_