Hash :
fd216c41
Author :
Date :
2015-05-27T16:12:30
Support BGRA texture by remapping the internal format to RGBA. The format is still passed as BGRA to the driver so that the data can be properly unpacked. BUG=angleproject:884 Change-Id: I767626c818ce1a3c5a4739f07aa623bf8a9ae377 Reviewed-on: https://chromium-review.googlesource.com/273162 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
//
// 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"
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();
// Internal format to use for the native texture
GLenum internalFormat;
SupportRequirement texture;
SupportRequirement filter;
SupportRequirement renderbuffer;
SupportRequirement framebufferAttachment;
};
const InternalFormat &GetInternalFormatInfo(GLenum internalFormat, StandardGL standard);
}
}
#endif // LIBANGLE_RENDERER_GL_FORMATUTILSGL_H_