Hash :
29bda815
Author :
Date :
2018-01-26T17:37:36
Move symbol table initialization to SymbolTable.cpp This is needed in order to make symbol table symbols statically allocated. BUG=angleproject:2267 TEST=angle_unittests Change-Id: Ia2d44fb30d49dc5d5c67643fe01280c89127a3c3 Reviewed-on: https://chromium-review.googlesource.com/889299 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
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
//
// Copyright (c) 2002-2014 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.
//
#include "compiler/translator/Initialize.h"
namespace sh
{
void InitExtensionBehavior(const ShBuiltInResources &resources, TExtensionBehavior &extBehavior)
{
if (resources.OES_standard_derivatives)
{
extBehavior[TExtension::OES_standard_derivatives] = EBhUndefined;
}
if (resources.OES_EGL_image_external)
{
extBehavior[TExtension::OES_EGL_image_external] = EBhUndefined;
}
if (resources.OES_EGL_image_external_essl3)
{
extBehavior[TExtension::OES_EGL_image_external_essl3] = EBhUndefined;
}
if (resources.NV_EGL_stream_consumer_external)
{
extBehavior[TExtension::NV_EGL_stream_consumer_external] = EBhUndefined;
}
if (resources.ARB_texture_rectangle)
{
// Special: ARB_texture_rectangle extension does not follow the standard for #extension
// directives - it is enabled by default. An extension directive may still disable it.
extBehavior[TExtension::ARB_texture_rectangle] = EBhEnable;
}
if (resources.EXT_blend_func_extended)
{
extBehavior[TExtension::EXT_blend_func_extended] = EBhUndefined;
}
if (resources.EXT_draw_buffers)
{
extBehavior[TExtension::EXT_draw_buffers] = EBhUndefined;
}
if (resources.EXT_frag_depth)
{
extBehavior[TExtension::EXT_frag_depth] = EBhUndefined;
}
if (resources.EXT_shader_texture_lod)
{
extBehavior[TExtension::EXT_shader_texture_lod] = EBhUndefined;
}
if (resources.EXT_shader_framebuffer_fetch)
{
extBehavior[TExtension::EXT_shader_framebuffer_fetch] = EBhUndefined;
}
if (resources.NV_shader_framebuffer_fetch)
{
extBehavior[TExtension::NV_shader_framebuffer_fetch] = EBhUndefined;
}
if (resources.ARM_shader_framebuffer_fetch)
{
extBehavior[TExtension::ARM_shader_framebuffer_fetch] = EBhUndefined;
}
if (resources.OVR_multiview)
{
extBehavior[TExtension::OVR_multiview] = EBhUndefined;
}
if (resources.EXT_YUV_target)
{
extBehavior[TExtension::EXT_YUV_target] = EBhUndefined;
}
if (resources.EXT_geometry_shader)
{
extBehavior[TExtension::EXT_geometry_shader] = EBhUndefined;
}
}
void ResetExtensionBehavior(TExtensionBehavior &extBehavior)
{
for (auto &ext : extBehavior)
{
if (ext.first == TExtension::ARB_texture_rectangle)
{
ext.second = EBhEnable;
}
else
{
ext.second = EBhUndefined;
}
}
}
} // namespace sh