Hash :
37752956
        
        Author :
  
        
        Date :
2021-02-11T16:12:48
        
      
Generators: Use fixed year in license headers. Remove dynamic year generation from generator scripts, as required by the Chromium C++ style guide. The dynamic year values were replaced by the current year at the time the file was created according to git log. The code to dynamically generate the year was removed. This patch also refreshes generated files and hashes. Bug: angleproject:5516 Change-Id: I735028bccb5c83217e92c380538f1abf0a906b2c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2690950 Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_copy_conversion_table.py using data from es3_copy_conversion_formats.json.
//
// Copyright 2016 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.
//
// format_map:
//   Determining the sized internal format from a (format,type) pair.
//   Also check es3 format combinations for validity.
#include "angle_gl.h"
#include "common/debug.h"
namespace gl
{
bool ValidES3CopyConversion(GLenum textureFormat, GLenum framebufferFormat)
{
    switch (textureFormat)
    {
        case GL_ALPHA:
            switch (framebufferFormat)
            {
                case GL_BGRA_EXT:
                case GL_RGBA:
                    return true;
                default:
                    break;
            }
            break;
        case GL_BGRA_EXT:
            switch (framebufferFormat)
            {
                case GL_BGRA_EXT:
                    return true;
                default:
                    break;
            }
            break;
        case GL_LUMINANCE:
            switch (framebufferFormat)
            {
                case GL_BGRA_EXT:
                case GL_RED:
                case GL_RG:
                case GL_RGB:
                case GL_RGBA:
                    return true;
                default:
                    break;
            }
            break;
        case GL_LUMINANCE_ALPHA:
            switch (framebufferFormat)
            {
                case GL_BGRA_EXT:
                case GL_RGBA:
                    return true;
                default:
                    break;
            }
            break;
        case GL_RED:
            switch (framebufferFormat)
            {
                case GL_BGRA_EXT:
                case GL_RED:
                case GL_RG:
                case GL_RGB:
                case GL_RGBA:
                    return true;
                default:
                    break;
            }
            break;
        case GL_RED_INTEGER:
            switch (framebufferFormat)
            {
                case GL_RED_INTEGER:
                case GL_RGBA_INTEGER:
                case GL_RGB_INTEGER:
                case GL_RG_INTEGER:
                    return true;
                default:
                    break;
            }
            break;
        case GL_RG:
            switch (framebufferFormat)
            {
                case GL_BGRA_EXT:
                case GL_RG:
                case GL_RGB:
                case GL_RGBA:
                    return true;
                default:
                    break;
            }
            break;
        case GL_RGB:
            switch (framebufferFormat)
            {
                case GL_BGRA_EXT:
                case GL_RGB:
                case GL_RGBA:
                    return true;
                default:
                    break;
            }
            break;
        case GL_RGBA:
            switch (framebufferFormat)
            {
                case GL_BGRA_EXT:
                case GL_RGBA:
                    return true;
                default:
                    break;
            }
            break;
        case GL_RGBA_INTEGER:
            switch (framebufferFormat)
            {
                case GL_RGBA_INTEGER:
                    return true;
                default:
                    break;
            }
            break;
        case GL_RGB_INTEGER:
            switch (framebufferFormat)
            {
                case GL_RGBA_INTEGER:
                case GL_RGB_INTEGER:
                    return true;
                default:
                    break;
            }
            break;
        case GL_RG_INTEGER:
            switch (framebufferFormat)
            {
                case GL_RGBA_INTEGER:
                case GL_RGB_INTEGER:
                case GL_RG_INTEGER:
                    return true;
                default:
                    break;
            }
            break;
        default:
            break;
    }
    return false;
}
}  // namespace gl