src/render/opengles2/SDL_shaders_gles2.c
author Sam Lantinga <slouken@libsdl.org>
Tue, 08 Feb 2011 10:04:09 -0800
changeset 5226 710d00cb3a6a
parent 5204 daa5463466c5
child 5260 62d2bc792002
permissions -rw-r--r--
Made it possible to disable the rendering subsystem with configure --disable-render
slouken@5201
     1
/*
slouken@5201
     2
    SDL - Simple DirectMedia Layer
slouken@5201
     3
    Copyright (C) 2010 itsnotabigtruck.
slouken@5201
     4
slouken@5201
     5
    Permission is hereby granted, free of charge, to any person obtaining a
slouken@5201
     6
    copy of this software and associated documentation files (the "Software"),
slouken@5201
     7
    to deal in the Software without restriction, including without limitation
slouken@5201
     8
    the rights to use, copy, modify, merge, publish, distribute, sublicense,
slouken@5201
     9
    and/or sell copies of the Software, and to permit persons to whom the
slouken@5201
    10
    Software is furnished to do so, subject to the following conditions:
slouken@5201
    11
slouken@5201
    12
    The above copyright notice and this permission notice shall be included in
slouken@5201
    13
    all copies or substantial portions of the Software.
slouken@5201
    14
slouken@5201
    15
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
slouken@5201
    16
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
slouken@5201
    17
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
slouken@5201
    18
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
slouken@5201
    19
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
slouken@5201
    20
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
slouken@5201
    21
    DEALINGS IN THE SOFTWARE.
slouken@5201
    22
*/
slouken@5201
    23
slouken@5201
    24
#include "SDL_config.h"
slouken@5201
    25
slouken@5226
    26
#if SDL_VIDEO_RENDER_OGL_ES2 && !SDL_RENDER_DISABLED
slouken@5201
    27
slouken@5201
    28
#include "SDL_video.h"
slouken@5204
    29
#include "SDL_opengles2.h"
slouken@5201
    30
#include "SDL_shaders_gles2.h"
slouken@5201
    31
#include "SDL_stdinc.h"
slouken@5201
    32
slouken@5201
    33
/*************************************************************************************************
slouken@5201
    34
 * Vertex/fragment shader source                                                                 *
slouken@5201
    35
 *************************************************************************************************/
slouken@5201
    36
slouken@5201
    37
static const Uint8 GLES2_VertexSrc_Default_[] = " \
slouken@5201
    38
    uniform mat4 u_projection; \
slouken@5201
    39
    attribute vec4 a_position; \
slouken@5201
    40
    attribute vec2 a_texCoord; \
slouken@5201
    41
    varying vec2 v_texCoord; \
slouken@5201
    42
    \
slouken@5201
    43
    void main() \
slouken@5201
    44
    { \
slouken@5201
    45
        v_texCoord = a_texCoord; \
slouken@5201
    46
        gl_Position = u_projection * a_position; \
slouken@5201
    47
        gl_PointSize = 1.0; \
slouken@5201
    48
    } \
slouken@5201
    49
";
slouken@5201
    50
slouken@5201
    51
static const Uint8 GLES2_FragmentSrc_SolidSrc_[] = " \
slouken@5201
    52
    precision mediump float; \
slouken@5201
    53
    uniform vec4 u_color; \
slouken@5201
    54
    \
slouken@5201
    55
    void main() \
slouken@5201
    56
    { \
slouken@5201
    57
        gl_FragColor = u_color; \
slouken@5201
    58
    } \
slouken@5201
    59
";
slouken@5201
    60
slouken@5201
    61
static const Uint8 GLES2_FragmentSrc_TextureSrc_[] = " \
slouken@5201
    62
    precision mediump float; \
slouken@5201
    63
    uniform sampler2D u_texture; \
slouken@5201
    64
    uniform vec4 u_modulation; \
slouken@5201
    65
    varying vec2 v_texCoord; \
slouken@5201
    66
    \
slouken@5201
    67
    void main() \
slouken@5201
    68
    { \
slouken@5201
    69
        gl_FragColor = texture2D(u_texture, v_texCoord); \
slouken@5201
    70
        gl_FragColor *= u_modulation; \
slouken@5201
    71
    } \
slouken@5201
    72
";
slouken@5201
    73
slouken@5201
    74
static const GLES2_ShaderInstance GLES2_VertexSrc_Default = {
slouken@5201
    75
    GL_VERTEX_SHADER,
slouken@5201
    76
    GLES2_SOURCE_SHADER,
slouken@5201
    77
    sizeof(GLES2_VertexSrc_Default_),
slouken@5201
    78
    GLES2_VertexSrc_Default_
slouken@5201
    79
};
slouken@5201
    80
slouken@5201
    81
static const GLES2_ShaderInstance GLES2_FragmentSrc_SolidSrc = {
slouken@5201
    82
    GL_FRAGMENT_SHADER,
slouken@5201
    83
    GLES2_SOURCE_SHADER,
slouken@5201
    84
    sizeof(GLES2_FragmentSrc_SolidSrc_),
slouken@5201
    85
    GLES2_FragmentSrc_SolidSrc_
slouken@5201
    86
};
slouken@5201
    87
slouken@5201
    88
static const GLES2_ShaderInstance GLES2_FragmentSrc_TextureSrc = {
slouken@5201
    89
    GL_FRAGMENT_SHADER,
slouken@5201
    90
    GLES2_SOURCE_SHADER,
slouken@5201
    91
    sizeof(GLES2_FragmentSrc_TextureSrc_),
slouken@5201
    92
    GLES2_FragmentSrc_TextureSrc_
slouken@5201
    93
};
slouken@5201
    94
slouken@5201
    95
/*************************************************************************************************
slouken@5201
    96
 * Vertex/fragment shader binaries (NVIDIA Tegra 1/2)                                            *
slouken@5201
    97
 *************************************************************************************************/
slouken@5201
    98
slouken@5201
    99
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   100
slouken@5201
   101
#define GL_NVIDIA_PLATFORM_BINARY_NV 0x890B
slouken@5201
   102
slouken@5201
   103
static const Uint8 GLES2_VertexTegra_Default_[] = {
slouken@5201
   104
    243, 193, 1, 142, 31, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   105
    0, 0, 46, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 85, 0, 0, 0, 2, 0, 0, 0, 24, 0, 0, 0, 3, 0, 0, 0,
slouken@5201
   106
    91, 0, 0, 0, 1, 0, 0, 0, 16, 0, 0, 0, 5, 0, 0, 0, 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   107
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 95, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0,
slouken@5201
   108
    13, 0, 0, 0, 102, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   109
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   110
    0, 0, 0, 16, 0, 0, 0, 104, 0, 0, 0, 1, 0, 0, 0, 32, 0, 0, 0, 17, 0, 0, 0, 112, 0, 0, 0, 0, 0,
slouken@5201
   111
    0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 112, 0, 0, 0, 80, 0, 0, 0, 80, 0, 0, 0, 19, 0, 0, 0, 132, 0,
slouken@5201
   112
    0, 0, 104, 0, 0, 0, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   113
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97,
slouken@5201
   114
    95, 112, 111, 115, 105, 116, 105, 111, 110, 0, 97, 95, 116, 101, 120, 67, 111, 111, 114, 100,
slouken@5201
   115
    0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 112, 114, 111, 106, 101, 99,
slouken@5201
   116
    116, 105, 111, 110, 0, 0, 0, 0, 0, 0, 0, 82, 139, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 80, 139, 0,
slouken@5201
   117
    0, 1, 0, 0, 0, 22, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 33, 0, 0, 0, 92, 139, 0, 0,
slouken@5201
   118
    1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 240, 0, 0, 0, 0, 0, 0, 1, 0,
slouken@5201
   119
    0, 0, 64, 0, 0, 0, 80, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 193, 0, 0, 0,
slouken@5201
   120
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   121
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   122
    0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 66, 24, 0, 6, 34, 108, 28,
slouken@5201
   123
    0, 0, 42, 16, 128, 0, 195, 192, 6, 129, 252, 255, 65, 96, 108, 28, 0, 0, 0, 0, 0, 1, 195, 192,
slouken@5201
   124
    6, 1, 252, 255, 33, 96, 108, 156, 31, 64, 8, 1, 64, 0, 131, 192, 6, 1, 156, 159, 65, 96, 108,
slouken@5201
   125
    28, 0, 0, 85, 32, 0, 1, 195, 192, 6, 1, 252, 255, 33, 96, 108, 156, 31, 64, 0, 64, 64, 0, 131,
slouken@5201
   126
    192, 134, 1, 152, 31, 65, 96, 108, 156, 31, 64, 127, 48, 0, 1, 195, 192, 6, 129, 129, 255, 33,
slouken@5201
   127
    96
slouken@5201
   128
};
slouken@5201
   129
slouken@5201
   130
static const Uint8 GLES2_FragmentTegra_None_SolidSrc_[] = {
slouken@5201
   131
    155, 191, 159, 1, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   132
    0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 75,
slouken@5201
   133
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
slouken@5201
   134
    75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 75, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 13, 0,
slouken@5201
   135
    0, 0, 82, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 14, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   136
    22, 0, 0, 0, 84, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 92, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   137
    0, 0, 0, 15, 0, 0, 0, 93, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 113, 0, 0, 0, 0, 0,
slouken@5201
   138
    0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 113, 0, 0,
slouken@5201
   139
    0, 108, 0, 0, 0, 108, 0, 0, 0, 20, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0,
slouken@5201
   140
    0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   141
    0, 117, 95, 99, 111, 108, 111, 114, 0, 0, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
slouken@5201
   142
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 241, 0, 0, 0, 240, 0, 0,
slouken@5201
   143
    0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0, 0,
slouken@5201
   144
    0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 21, 32, 0, 0, 0, 0, 0,
slouken@5201
   145
    0, 0, 0, 0, 0, 20, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   146
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 82, 50, 48, 45, 66, 73, 78, 1,
slouken@5201
   147
    0, 0, 0, 1, 0, 0, 0, 1, 0, 65, 37, 0, 0, 0, 0, 1, 0, 0, 21, 0, 0, 0, 0, 1, 0, 1, 38, 0, 0, 0,
slouken@5201
   148
    0, 1, 0, 1, 39, 0, 0, 0, 0, 1, 0, 1, 40, 1, 0, 0, 0, 8, 0, 4, 40, 0, 40, 0, 0, 0, 242, 65, 63,
slouken@5201
   149
    192, 200, 0, 0, 0, 242, 65, 63, 128, 168, 0, 0, 0, 242, 65, 63, 64, 72, 0, 0, 0, 242, 65, 63,
slouken@5201
   150
    1, 0, 6, 40, 0, 0, 0, 0, 1, 0, 1, 41, 5, 0, 2, 0
slouken@5201
   151
};
slouken@5201
   152
slouken@5201
   153
static const Uint8 GLES2_FragmentTegra_Alpha_SolidSrc_[] = {
slouken@5201
   154
    169, 153, 195, 28, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   155
    0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 75,
slouken@5201
   156
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
slouken@5201
   157
    75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 75, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 13, 0,
slouken@5201
   158
    0, 0, 82, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 14, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   159
    22, 0, 0, 0, 84, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 92, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   160
    0, 0, 0, 15, 0, 0, 0, 93, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 113, 0, 0, 0, 0, 0,
slouken@5201
   161
    0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 113, 0, 0,
slouken@5201
   162
    0, 220, 0, 0, 0, 220, 0, 0, 0, 20, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0,
slouken@5201
   163
    0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   164
    0, 117, 95, 99, 111, 108, 111, 114, 0, 0, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
slouken@5201
   165
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 118, 118, 17, 241, 0, 0, 0, 240, 0,
slouken@5201
   166
    0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0,
slouken@5201
   167
    0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 21, 32, 0, 0, 0, 0,
slouken@5201
   168
    0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   169
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 82, 50, 48, 45, 66, 73, 78,
slouken@5201
   170
    1, 0, 0, 0, 3, 0, 0, 0, 3, 0, 65, 37, 8, 0, 129, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 21, 0,
slouken@5201
   171
    0, 0, 0, 3, 0, 1, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 39, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   172
    0, 0, 0, 0, 0, 3, 0, 1, 40, 1, 0, 0, 0, 5, 0, 0, 0, 9, 0, 0, 0, 24, 0, 4, 40, 232, 231, 15,
slouken@5201
   173
    0, 0, 242, 65, 62, 194, 72, 1, 0, 0, 250, 65, 63, 194, 40, 1, 0, 0, 250, 65, 63, 192, 168, 1,
slouken@5201
   174
    0, 0, 242, 1, 64, 192, 168, 1, 0, 0, 242, 1, 68, 168, 32, 0, 0, 0, 50, 64, 0, 192, 168, 15,
slouken@5201
   175
    0, 0, 242, 1, 66, 168, 64, 0, 16, 0, 242, 65, 1, 232, 231, 15, 0, 0, 242, 65, 62, 168, 160,
slouken@5201
   176
    0, 0, 0, 50, 64, 2, 104, 192, 0, 0, 36, 48, 66, 4, 232, 231, 15, 0, 0, 242, 65, 62, 3, 0, 6,
slouken@5201
   177
    40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 41, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 2, 0
slouken@5201
   178
};
slouken@5201
   179
slouken@5201
   180
static const Uint8 GLES2_FragmentTegra_Additive_SolidSrc_[] = {
slouken@5201
   181
    59, 71, 42, 17, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0, 0,
slouken@5201
   182
    0, 8, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 75,
slouken@5201
   183
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
slouken@5201
   184
    75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 75, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 13, 0,
slouken@5201
   185
    0, 0, 82, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 14, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   186
    22, 0, 0, 0, 84, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 92, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   187
    0, 0, 0, 15, 0, 0, 0, 93, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 113, 0, 0, 0, 0, 0,
slouken@5201
   188
    0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 113, 0, 0,
slouken@5201
   189
    0, 108, 0, 0, 0, 108, 0, 0, 0, 20, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0,
slouken@5201
   190
    0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   191
    0, 117, 95, 99, 111, 108, 111, 114, 0, 0, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
slouken@5201
   192
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 22, 22, 17, 241, 0, 0, 0, 240, 0,
slouken@5201
   193
    0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0,
slouken@5201
   194
    0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 21, 32, 0, 0, 0, 0,
slouken@5201
   195
    0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   196
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 82, 50, 48, 45, 66, 73, 78,
slouken@5201
   197
    1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 65, 37, 8, 0, 129, 0, 1, 0, 0, 21, 0, 0, 0, 0, 1, 0, 1, 38, 0,
slouken@5201
   198
    0, 0, 0, 1, 0, 1, 39, 0, 0, 0, 0, 1, 0, 1, 40, 1, 0, 0, 0, 8, 0, 4, 40, 192, 200, 0, 0, 0, 26,
slouken@5201
   199
    0, 70, 192, 40, 0, 0, 0, 2, 0, 64, 192, 72, 0, 0, 0, 10, 0, 66, 192, 168, 0, 0, 0, 18, 0, 68,
slouken@5201
   200
    1, 0, 6, 40, 0, 0, 0, 0, 1, 0, 1, 41, 5, 0, 2, 0
slouken@5201
   201
};
slouken@5201
   202
slouken@5201
   203
static const Uint8 GLES2_FragmentTegra_Modulated_SolidSrc_[] = {
slouken@5201
   204
    37, 191, 49, 17, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0, 0,
slouken@5201
   205
    0, 8, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 75,
slouken@5201
   206
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
slouken@5201
   207
    75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 75, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 13, 0,
slouken@5201
   208
    0, 0, 82, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 14, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   209
    22, 0, 0, 0, 84, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 92, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   210
    0, 0, 0, 15, 0, 0, 0, 93, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 113, 0, 0, 0, 0, 0,
slouken@5201
   211
    0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 113, 0, 0,
slouken@5201
   212
    0, 108, 0, 0, 0, 108, 0, 0, 0, 20, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0,
slouken@5201
   213
    0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   214
    0, 117, 95, 99, 111, 108, 111, 114, 0, 0, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
slouken@5201
   215
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 32, 32, 17, 241, 0, 0, 0, 240, 0,
slouken@5201
   216
    0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0,
slouken@5201
   217
    0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 21, 32, 0, 0, 0, 0,
slouken@5201
   218
    0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   219
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 82, 50, 48, 45, 66, 73, 78,
slouken@5201
   220
    1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 65, 37, 8, 0, 129, 0, 1, 0, 0, 21, 0, 0, 0, 0, 1, 0, 1, 38, 0,
slouken@5201
   221
    0, 0, 0, 1, 0, 1, 39, 0, 0, 0, 0, 1, 0, 1, 40, 1, 0, 0, 0, 8, 0, 4, 40, 104, 192, 0, 0, 0, 242,
slouken@5201
   222
    1, 70, 8, 32, 0, 0, 0, 242, 1, 64, 40, 64, 0, 0, 0, 242, 1, 66, 72, 160, 0, 0, 0, 242, 1, 68,
slouken@5201
   223
    1, 0, 6, 40, 0, 0, 0, 0, 1, 0, 1, 41, 5, 0, 2, 0
slouken@5201
   224
};
slouken@5201
   225
slouken@5201
   226
static const Uint8 GLES2_FragmentTegra_None_TextureSrc_[] = {
slouken@5201
   227
    220, 217, 41, 211, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   228
    0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 2, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
slouken@5201
   229
    82, 0, 0, 0, 1, 0, 0, 0, 20, 0, 0, 0, 6, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0,
slouken@5201
   230
    0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 87, 0, 0, 0, 2, 0, 0, 0, 56, 0, 0, 0,
slouken@5201
   231
    13, 0, 0, 0, 101, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 105, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   232
    0, 0, 0, 22, 0, 0, 0, 106, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 114, 0, 0, 0, 1, 0,
slouken@5201
   233
    0, 0, 4, 0, 0, 0, 15, 0, 0, 0, 115, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 135, 0, 0,
slouken@5201
   234
    0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 135,
slouken@5201
   235
    0, 0, 0, 120, 0, 0, 0, 120, 0, 0, 0, 20, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21,
slouken@5201
   236
    0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   237
    0, 0, 0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 109, 111, 100, 117, 108,
slouken@5201
   238
    97, 116, 105, 111, 110, 0, 117, 95, 116, 101, 120, 116, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   239
    2, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1,
slouken@5201
   240
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 94, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0,
slouken@5201
   241
    0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   242
    0, 0, 1, 0, 0, 0, 241, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240,
slouken@5201
   243
    0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 1, 0,
slouken@5201
   244
    0, 0, 1, 0, 0, 0, 21, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0,
slouken@5201
   245
    0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   246
    0, 0, 65, 82, 50, 48, 45, 66, 73, 78, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 65, 37, 0, 0, 0, 0, 1, 0,
slouken@5201
   247
    0, 21, 0, 0, 0, 0, 1, 0, 1, 38, 1, 0, 0, 0, 2, 0, 4, 38, 186, 81, 78, 16, 2, 1, 0, 0, 1, 0,
slouken@5201
   248
    1, 39, 0, 4, 0, 0, 1, 0, 1, 40, 1, 0, 0, 0, 8, 0, 4, 40, 104, 192, 0, 0, 0, 242, 1, 70, 8, 32,
slouken@5201
   249
    0, 0, 0, 242, 1, 64, 40, 64, 0, 0, 0, 242, 1, 66, 72, 160, 0, 0, 0, 242, 1, 68, 1, 0, 6, 40,
slouken@5201
   250
    0, 0, 0, 0, 1, 0, 1, 41, 5, 0, 2, 0
slouken@5201
   251
};
slouken@5201
   252
slouken@5201
   253
static const Uint8 GLES2_FragmentTegra_Alpha_TextureSrc_[] = {
slouken@5201
   254
    71, 202, 114, 229, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   255
    0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 2, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
slouken@5201
   256
    82, 0, 0, 0, 1, 0, 0, 0, 20, 0, 0, 0, 6, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0,
slouken@5201
   257
    0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 87, 0, 0, 0, 2, 0, 0, 0, 56, 0, 0, 0,
slouken@5201
   258
    13, 0, 0, 0, 101, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 105, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   259
    0, 0, 0, 22, 0, 0, 0, 106, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 114, 0, 0, 0, 1, 0,
slouken@5201
   260
    0, 0, 4, 0, 0, 0, 15, 0, 0, 0, 115, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 135, 0, 0,
slouken@5201
   261
    0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 135,
slouken@5201
   262
    0, 0, 0, 176, 0, 0, 0, 176, 0, 0, 0, 20, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21,
slouken@5201
   263
    0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   264
    0, 0, 0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 109, 111, 100, 117, 108,
slouken@5201
   265
    97, 116, 105, 111, 110, 0, 117, 95, 116, 101, 120, 116, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   266
    2, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1,
slouken@5201
   267
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 94, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0,
slouken@5201
   268
    0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   269
    0, 0, 1, 118, 118, 17, 241, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0,
slouken@5201
   270
    240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0,
slouken@5201
   271
    1, 0, 0, 0, 2, 0, 0, 0, 21, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, 0, 16,
slouken@5201
   272
    0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   273
    0, 0, 0, 0, 65, 82, 50, 48, 45, 66, 73, 78, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 65, 37, 0, 0, 0, 0,
slouken@5201
   274
    8, 0, 129, 0, 1, 0, 0, 21, 0, 0, 0, 0, 2, 0, 1, 38, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 38, 186,
slouken@5201
   275
    81, 78, 16, 2, 1, 0, 0, 2, 0, 1, 39, 0, 4, 0, 0, 0, 0, 0, 0, 2, 0, 1, 40, 1, 0, 0, 0, 5, 0,
slouken@5201
   276
    0, 0, 16, 0, 4, 40, 40, 160, 1, 0, 0, 242, 1, 66, 8, 192, 1, 0, 0, 242, 1, 64, 104, 32, 1, 0,
slouken@5201
   277
    0, 242, 1, 70, 72, 64, 1, 0, 0, 242, 1, 68, 154, 192, 0, 0, 37, 34, 64, 3, 8, 32, 0, 0, 5, 58,
slouken@5201
   278
    208, 4, 40, 64, 0, 0, 5, 50, 208, 4, 72, 160, 0, 0, 37, 42, 208, 4, 2, 0, 6, 40, 0, 0, 0, 0,
slouken@5201
   279
    0, 0, 0, 0, 2, 0, 1, 41, 0, 0, 0, 0, 5, 0, 2, 0
slouken@5201
   280
};
slouken@5201
   281
slouken@5201
   282
static const Uint8 GLES2_FragmentTegra_Additive_TextureSrc_[] = {
slouken@5201
   283
    161, 234, 193, 234, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   284
    0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 2, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
slouken@5201
   285
    82, 0, 0, 0, 1, 0, 0, 0, 20, 0, 0, 0, 6, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0,
slouken@5201
   286
    0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 87, 0, 0, 0, 2, 0, 0, 0, 56, 0, 0, 0,
slouken@5201
   287
    13, 0, 0, 0, 101, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 105, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   288
    0, 0, 0, 22, 0, 0, 0, 106, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 114, 0, 0, 0, 1, 0,
slouken@5201
   289
    0, 0, 4, 0, 0, 0, 15, 0, 0, 0, 115, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 135, 0, 0,
slouken@5201
   290
    0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 135,
slouken@5201
   291
    0, 0, 0, 176, 0, 0, 0, 176, 0, 0, 0, 20, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21,
slouken@5201
   292
    0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   293
    0, 0, 0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 109, 111, 100, 117, 108,
slouken@5201
   294
    97, 116, 105, 111, 110, 0, 117, 95, 116, 101, 120, 116, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   295
    2, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1,
slouken@5201
   296
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 94, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0,
slouken@5201
   297
    0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   298
    0, 0, 1, 22, 22, 17, 241, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240,
slouken@5201
   299
    0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 1, 0,
slouken@5201
   300
    0, 0, 2, 0, 0, 0, 21, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0,
slouken@5201
   301
    0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   302
    0, 0, 65, 82, 50, 48, 45, 66, 73, 78, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 65, 37, 0, 0, 0, 0, 8, 0,
slouken@5201
   303
    129, 0, 1, 0, 0, 21, 0, 0, 0, 0, 2, 0, 1, 38, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 38, 186, 81,
slouken@5201
   304
    78, 16, 2, 1, 0, 0, 2, 0, 1, 39, 0, 4, 0, 0, 0, 0, 0, 0, 2, 0, 1, 40, 1, 0, 0, 0, 5, 0, 0, 0,
slouken@5201
   305
    16, 0, 4, 40, 40, 160, 1, 0, 0, 242, 1, 66, 104, 32, 1, 0, 0, 242, 1, 70, 8, 192, 1, 0, 0, 242,
slouken@5201
   306
    1, 64, 72, 64, 1, 0, 0, 242, 1, 68, 136, 192, 0, 0, 0, 26, 64, 4, 136, 32, 0, 0, 0, 2, 64, 7,
slouken@5201
   307
    136, 64, 0, 0, 0, 10, 64, 6, 136, 160, 0, 0, 0, 18, 64, 5, 2, 0, 6, 40, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   308
    0, 2, 0, 1, 41, 0, 0, 0, 0, 5, 0, 2, 0
slouken@5201
   309
};
slouken@5201
   310
slouken@5201
   311
static const Uint8 GLES2_FragmentTegra_Modulated_TextureSrc_[] = {
slouken@5201
   312
    75, 132, 201, 227, 47, 109, 131, 38, 6, 0, 1, 0, 5, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 73, 0,
slouken@5201
   313
    0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 2, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,
slouken@5201
   314
    82, 0, 0, 0, 1, 0, 0, 0, 20, 0, 0, 0, 6, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0,
slouken@5201
   315
    0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 87, 0, 0, 0, 2, 0, 0, 0, 56, 0, 0, 0,
slouken@5201
   316
    13, 0, 0, 0, 101, 0, 0, 0, 4, 0, 0, 0, 16, 0, 0, 0, 14, 0, 0, 0, 105, 0, 0, 0, 1, 0, 0, 0, 4,
slouken@5201
   317
    0, 0, 0, 22, 0, 0, 0, 106, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 23, 0, 0, 0, 114, 0, 0, 0, 1, 0,
slouken@5201
   318
    0, 0, 4, 0, 0, 0, 15, 0, 0, 0, 115, 0, 0, 0, 1, 0, 0, 0, 80, 0, 0, 0, 17, 0, 0, 0, 135, 0, 0,
slouken@5201
   319
    0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 135,
slouken@5201
   320
    0, 0, 0, 176, 0, 0, 0, 176, 0, 0, 0, 20, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21,
slouken@5201
   321
    0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 97, 110, 70, 73, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   322
    0, 0, 0, 118, 95, 116, 101, 120, 67, 111, 111, 114, 100, 0, 117, 95, 109, 111, 100, 117, 108,
slouken@5201
   323
    97, 116, 105, 111, 110, 0, 117, 95, 116, 101, 120, 116, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   324
    2, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 82, 139, 0, 0, 1, 0, 0, 0, 1,
slouken@5201
   325
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 94, 139, 0, 0, 1, 0, 0, 0, 1, 0, 0,
slouken@5201
   326
    0, 2, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 5, 48, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   327
    0, 0, 1, 32, 32, 17, 241, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 240,
slouken@5201
   328
    0, 0, 0, 240, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 1, 0,
slouken@5201
   329
    0, 0, 2, 0, 0, 0, 21, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0,
slouken@5201
   330
    0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
slouken@5201
   331
    0, 0, 65, 82, 50, 48, 45, 66, 73, 78, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 65, 37, 0, 0, 0, 0, 8, 0,
slouken@5201
   332
    129, 0, 1, 0, 0, 21, 0, 0, 0, 0, 2, 0, 1, 38, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 38, 186, 81,
slouken@5201
   333
    78, 16, 2, 1, 0, 0, 2, 0, 1, 39, 0, 4, 0, 0, 0, 0, 0, 0, 2, 0, 1, 40, 1, 0, 0, 0, 5, 0, 0, 0,
slouken@5201
   334
    16, 0, 4, 40, 40, 160, 1, 0, 0, 242, 1, 66, 8, 192, 1, 0, 0, 242, 1, 64, 104, 32, 1, 0, 0, 242,
slouken@5201
   335
    1, 70, 72, 64, 1, 0, 0, 242, 1, 68, 104, 192, 0, 0, 0, 242, 65, 4, 232, 32, 0, 0, 0, 242, 65,
slouken@5201
   336
    0, 40, 64, 0, 0, 0, 242, 65, 6, 72, 160, 0, 0, 0, 242, 65, 5, 2, 0, 6, 40, 0, 0, 0, 0, 0, 0,
slouken@5201
   337
    0, 0, 2, 0, 1, 41, 0, 0, 0, 0, 5, 0, 2, 0
slouken@5201
   338
};
slouken@5201
   339
slouken@5201
   340
static const GLES2_ShaderInstance GLES2_VertexTegra_Default = {
slouken@5201
   341
    GL_VERTEX_SHADER,
slouken@5201
   342
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   343
    sizeof(GLES2_VertexTegra_Default_),
slouken@5201
   344
    GLES2_VertexTegra_Default_
slouken@5201
   345
};
slouken@5201
   346
slouken@5201
   347
static const GLES2_ShaderInstance GLES2_FragmentTegra_None_SolidSrc = {
slouken@5201
   348
    GL_FRAGMENT_SHADER,
slouken@5201
   349
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   350
    sizeof(GLES2_FragmentTegra_None_SolidSrc_),
slouken@5201
   351
    GLES2_FragmentTegra_None_SolidSrc_
slouken@5201
   352
};
slouken@5201
   353
slouken@5201
   354
static const GLES2_ShaderInstance GLES2_FragmentTegra_Alpha_SolidSrc = {
slouken@5201
   355
    GL_FRAGMENT_SHADER,
slouken@5201
   356
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   357
    sizeof(GLES2_FragmentTegra_Alpha_SolidSrc_),
slouken@5201
   358
    GLES2_FragmentTegra_Alpha_SolidSrc_
slouken@5201
   359
};
slouken@5201
   360
slouken@5201
   361
static const GLES2_ShaderInstance GLES2_FragmentTegra_Additive_SolidSrc = {
slouken@5201
   362
    GL_FRAGMENT_SHADER,
slouken@5201
   363
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   364
    sizeof(GLES2_FragmentTegra_Additive_SolidSrc_),
slouken@5201
   365
    GLES2_FragmentTegra_Additive_SolidSrc_
slouken@5201
   366
};
slouken@5201
   367
slouken@5201
   368
static const GLES2_ShaderInstance GLES2_FragmentTegra_Modulated_SolidSrc = {
slouken@5201
   369
    GL_FRAGMENT_SHADER,
slouken@5201
   370
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   371
    sizeof(GLES2_FragmentTegra_Modulated_SolidSrc_),
slouken@5201
   372
    GLES2_FragmentTegra_Modulated_SolidSrc_
slouken@5201
   373
};
slouken@5201
   374
slouken@5201
   375
static const GLES2_ShaderInstance GLES2_FragmentTegra_None_TextureSrc = {
slouken@5201
   376
    GL_FRAGMENT_SHADER,
slouken@5201
   377
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   378
    sizeof(GLES2_FragmentTegra_None_TextureSrc_),
slouken@5201
   379
    GLES2_FragmentTegra_None_TextureSrc_
slouken@5201
   380
};
slouken@5201
   381
slouken@5201
   382
static const GLES2_ShaderInstance GLES2_FragmentTegra_Alpha_TextureSrc = {
slouken@5201
   383
    GL_FRAGMENT_SHADER,
slouken@5201
   384
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   385
    sizeof(GLES2_FragmentTegra_Alpha_TextureSrc_),
slouken@5201
   386
    GLES2_FragmentTegra_Alpha_TextureSrc_
slouken@5201
   387
};
slouken@5201
   388
slouken@5201
   389
static const GLES2_ShaderInstance GLES2_FragmentTegra_Additive_TextureSrc = {
slouken@5201
   390
    GL_FRAGMENT_SHADER,
slouken@5201
   391
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   392
    sizeof(GLES2_FragmentTegra_Additive_TextureSrc_),
slouken@5201
   393
    GLES2_FragmentTegra_Additive_TextureSrc_
slouken@5201
   394
};
slouken@5201
   395
slouken@5201
   396
static const GLES2_ShaderInstance GLES2_FragmentTegra_Modulated_TextureSrc = {
slouken@5201
   397
    GL_FRAGMENT_SHADER,
slouken@5201
   398
    GL_NVIDIA_PLATFORM_BINARY_NV,
slouken@5201
   399
    sizeof(GLES2_FragmentTegra_Modulated_TextureSrc_),
slouken@5201
   400
    GLES2_FragmentTegra_Modulated_TextureSrc_
slouken@5201
   401
};
slouken@5201
   402
slouken@5201
   403
#endif /* GLES2_INCLUDE_NVIDIA_SHADERS */
slouken@5201
   404
slouken@5201
   405
/*************************************************************************************************
slouken@5201
   406
 * Vertex/fragment shader definitions                                                            *
slouken@5201
   407
 *************************************************************************************************/
slouken@5201
   408
slouken@5201
   409
static GLES2_Shader GLES2_VertexShader_Default = {
slouken@5201
   410
    2,
slouken@5201
   411
    {
slouken@5201
   412
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   413
        &GLES2_VertexTegra_Default,
slouken@5201
   414
#endif
slouken@5201
   415
        &GLES2_VertexSrc_Default
slouken@5201
   416
    }
slouken@5201
   417
};
slouken@5201
   418
slouken@5201
   419
static GLES2_Shader GLES2_FragmentShader_None_SolidSrc = {
slouken@5201
   420
    2,
slouken@5201
   421
    {
slouken@5201
   422
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   423
        &GLES2_FragmentTegra_None_SolidSrc,
slouken@5201
   424
#endif
slouken@5201
   425
        &GLES2_FragmentSrc_SolidSrc
slouken@5201
   426
    }
slouken@5201
   427
};
slouken@5201
   428
slouken@5201
   429
static GLES2_Shader GLES2_FragmentShader_Alpha_SolidSrc = {
slouken@5201
   430
    2,
slouken@5201
   431
    {
slouken@5201
   432
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   433
        &GLES2_FragmentTegra_Alpha_SolidSrc,
slouken@5201
   434
#endif
slouken@5201
   435
        &GLES2_FragmentSrc_SolidSrc
slouken@5201
   436
    }
slouken@5201
   437
};
slouken@5201
   438
slouken@5201
   439
static GLES2_Shader GLES2_FragmentShader_Additive_SolidSrc = {
slouken@5201
   440
    2,
slouken@5201
   441
    {
slouken@5201
   442
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   443
        &GLES2_FragmentTegra_Additive_SolidSrc,
slouken@5201
   444
#endif
slouken@5201
   445
        &GLES2_FragmentSrc_SolidSrc
slouken@5201
   446
    }
slouken@5201
   447
};
slouken@5201
   448
slouken@5201
   449
static GLES2_Shader GLES2_FragmentShader_Modulated_SolidSrc = {
slouken@5201
   450
    2,
slouken@5201
   451
    {
slouken@5201
   452
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   453
        &GLES2_FragmentTegra_Modulated_SolidSrc,
slouken@5201
   454
#endif
slouken@5201
   455
        &GLES2_FragmentSrc_SolidSrc
slouken@5201
   456
    }
slouken@5201
   457
};
slouken@5201
   458
slouken@5201
   459
static GLES2_Shader GLES2_FragmentShader_None_TextureSrc = {
slouken@5201
   460
    2,
slouken@5201
   461
    {
slouken@5201
   462
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   463
        &GLES2_FragmentTegra_None_TextureSrc,
slouken@5201
   464
#endif
slouken@5201
   465
        &GLES2_FragmentSrc_TextureSrc
slouken@5201
   466
    }
slouken@5201
   467
};
slouken@5201
   468
slouken@5201
   469
static GLES2_Shader GLES2_FragmentShader_Alpha_TextureSrc = {
slouken@5201
   470
    2,
slouken@5201
   471
    {
slouken@5201
   472
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   473
        &GLES2_FragmentTegra_Alpha_TextureSrc,
slouken@5201
   474
#endif
slouken@5201
   475
        &GLES2_FragmentSrc_TextureSrc
slouken@5201
   476
    }
slouken@5201
   477
};
slouken@5201
   478
slouken@5201
   479
static GLES2_Shader GLES2_FragmentShader_Additive_TextureSrc = {
slouken@5201
   480
    2,
slouken@5201
   481
    {
slouken@5201
   482
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   483
        &GLES2_FragmentTegra_Additive_TextureSrc,
slouken@5201
   484
#endif
slouken@5201
   485
        &GLES2_FragmentSrc_TextureSrc
slouken@5201
   486
    }
slouken@5201
   487
};
slouken@5201
   488
slouken@5201
   489
static GLES2_Shader GLES2_FragmentShader_Modulated_TextureSrc = {
slouken@5201
   490
    2,
slouken@5201
   491
    {
slouken@5201
   492
#if GLES2_INCLUDE_NVIDIA_SHADERS
slouken@5201
   493
        &GLES2_FragmentTegra_Modulated_TextureSrc,
slouken@5201
   494
#endif
slouken@5201
   495
        &GLES2_FragmentSrc_TextureSrc
slouken@5201
   496
    }
slouken@5201
   497
};
slouken@5201
   498
slouken@5201
   499
/*************************************************************************************************
slouken@5201
   500
 * Shader selector                                                                               *
slouken@5201
   501
 *************************************************************************************************/
slouken@5201
   502
slouken@5201
   503
const GLES2_Shader *GLES2_GetShader(GLES2_ShaderType type, SDL_BlendMode blendMode)
slouken@5201
   504
{
slouken@5201
   505
    switch (type)
slouken@5201
   506
    {
slouken@5201
   507
    case GLES2_SHADER_VERTEX_DEFAULT:
slouken@5201
   508
        return &GLES2_VertexShader_Default;
slouken@5201
   509
    case GLES2_SHADER_FRAGMENT_SOLID_SRC:
slouken@5201
   510
        switch (blendMode)
slouken@5201
   511
        {
slouken@5201
   512
        case SDL_BLENDMODE_NONE:
slouken@5201
   513
            return &GLES2_FragmentShader_None_SolidSrc;
slouken@5201
   514
        case SDL_BLENDMODE_BLEND:
slouken@5201
   515
            return &GLES2_FragmentShader_Alpha_SolidSrc;
slouken@5201
   516
        case SDL_BLENDMODE_ADD:
slouken@5201
   517
            return &GLES2_FragmentShader_Additive_SolidSrc;
slouken@5201
   518
        case SDL_BLENDMODE_MOD:
slouken@5201
   519
            return &GLES2_FragmentShader_Modulated_SolidSrc;
slouken@5201
   520
        default:
slouken@5201
   521
            return NULL;
slouken@5201
   522
        }
slouken@5201
   523
    case GLES2_SHADER_FRAGMENT_TEXTURE_SRC:
slouken@5201
   524
        switch (blendMode)
slouken@5201
   525
        {
slouken@5201
   526
        case SDL_BLENDMODE_NONE:
slouken@5201
   527
            return &GLES2_FragmentShader_None_TextureSrc;
slouken@5201
   528
        case SDL_BLENDMODE_BLEND:
slouken@5201
   529
            return &GLES2_FragmentShader_Alpha_TextureSrc;
slouken@5201
   530
        case SDL_BLENDMODE_ADD:
slouken@5201
   531
            return &GLES2_FragmentShader_Additive_TextureSrc;
slouken@5201
   532
        case SDL_BLENDMODE_MOD:
slouken@5201
   533
            return &GLES2_FragmentShader_Modulated_TextureSrc;
slouken@5201
   534
        default:
slouken@5201
   535
            return NULL;
slouken@5201
   536
        }
slouken@5201
   537
    default:
slouken@5201
   538
        return NULL;
slouken@5201
   539
    }
slouken@5201
   540
}
slouken@5201
   541
slouken@5226
   542
#endif /* SDL_VIDEO_RENDER_OGL_ES2 && !SDL_RENDER_DISABLED */
slouken@5201
   543
slouken@5201
   544
/* vi: set ts=4 sw=4 expandtab: */