Hash :
ebb56cee
        
        Author :
  
        
        Date :
2024-05-31T15:10:37
        
      
Implement OES_tessellation_shader
  Based on the specs, there are no functional differences between
OES and EXT.
* Added validation for glPatchParameteriOES() and the core
  glPatchParameteri().
* Added the extension support for GLSL.
  * EXT_shader_io_blocks is implicitly enabled for the EXT geometry
    and tessellation shader extensions.
  * OES_shader_io_blocks is implicitly enabled for the OES versions
    of said extensions.
* Added a test to make sure using this extension works instead of EXT.
  * Turned the repeated test code into a function:
    * testTessellationTextureBufferAccess
* Skipped the tests that fail on various platforms.
  * It seems that these tests were being skipped before enabling
    this extension ("Not supported").
Bug: b/344030760
Bug: angleproject:345306326
Bug: angleproject:345304850
Bug: angleproject:345312771
Change-Id: I905da0132bf6525cb453dcaa613e4deb3155c4dd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5595611
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.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 94 95 96 97 98 99
//
// Copyright 2002 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.
//
// ExtensionBehavior.h: Extension name enumeration and data structures for storing extension
// behavior.
#ifndef COMPILER_TRANSLATOR_EXTENSIONBEHAVIOR_H_
#define COMPILER_TRANSLATOR_EXTENSIONBEHAVIOR_H_
#include <cstdint>
#include <map>
namespace sh
{
enum class TExtension : uint8_t
{
    UNDEFINED,  // Special value used to indicate no extension.
    ANDROID_extension_pack_es31a,
    ANGLE_base_vertex_base_instance_shader_builtin,
    ANGLE_clip_cull_distance,
    ANGLE_multi_draw,
    ANGLE_shader_pixel_local_storage,
    ANGLE_texture_multisample,
    APPLE_clip_distance,
    ARB_fragment_shader_interlock,
    ARB_texture_rectangle,
    ARM_shader_framebuffer_fetch,
    EXT_YUV_target,
    EXT_blend_func_extended,
    EXT_clip_cull_distance,
    EXT_conservative_depth,
    EXT_draw_buffers,
    EXT_frag_depth,
    EXT_geometry_shader,
    EXT_gpu_shader5,
    EXT_primitive_bounding_box,
    EXT_separate_shader_objects,
    EXT_shader_framebuffer_fetch,
    EXT_shader_framebuffer_fetch_non_coherent,
    EXT_shader_io_blocks,
    EXT_shader_non_constant_global_initializers,
    EXT_shader_texture_lod,
    EXT_shadow_samplers,
    EXT_tessellation_shader,
    EXT_texture_buffer,
    EXT_texture_cube_map_array,
    INTEL_fragment_shader_ordering,
    KHR_blend_equation_advanced,
    NV_EGL_stream_consumer_external,
    NV_fragment_shader_interlock,
    NV_shader_framebuffer_fetch,
    NV_shader_noperspective_interpolation,
    OES_EGL_image_external,
    OES_EGL_image_external_essl3,
    OES_geometry_shader,
    OES_gpu_shader5,
    OES_primitive_bounding_box,
    OES_sample_variables,
    OES_shader_image_atomic,
    OES_shader_io_blocks,
    OES_shader_multisample_interpolation,
    OES_standard_derivatives,
    OES_tessellation_shader,
    OES_texture_3D,
    OES_texture_buffer,
    OES_texture_cube_map_array,
    OES_texture_storage_multisample_2d_array,
    OVR_multiview,
    OVR_multiview2,
    WEBGL_video_texture,
};
enum TBehavior : uint8_t
{
    EBhRequire,
    EBhEnable,
    EBhWarn,
    EBhDisable,
    EBhUndefined
};
const char *GetExtensionNameString(TExtension extension);
TExtension GetExtensionByName(const char *extension);
bool CheckExtensionVersion(TExtension extension, int version);
const char *GetBehaviorString(TBehavior b);
// Mapping between extension id and behavior.
typedef std::map<TExtension, TBehavior> TExtensionBehavior;
bool IsExtensionEnabled(const TExtensionBehavior &extBehavior, TExtension extension);
}  // namespace sh
#endif  // COMPILER_TRANSLATOR_EXTENSIONBEHAVIOR_H_