src/tests/compiler_tests/ImmutableString_test_autogen.cpp


Log

Author Commit Date CI Message
Panfeng Hou 25f5e2cf 2025-08-13T17:03:19 Vulkan: Add support for built-in gl_PrimitiveShadingRateEXT Add support for built-in gl_PrimitiveShadingRateEXT and relative const value. Bug: angleproject:397255625 Change-Id: I25d51f5805697e137b232175ee790808c45850b7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6845515 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi e98dec82 2025-07-20T22:16:00 Translator: Remove Sampler2DRectShadow This is a desktop GLSL type. Bug: angleproject:370937467 Change-Id: Ife8b50e57f6e054ccd35df10c2157f8e4a218d37 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6774081 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Panfeng Hou 251ffe62 2025-07-15T17:37:30 Vulkan: Add support for built-in gl_ShadingRateEXT Add support for built-in gl_ShadingRateEXT of GL_EXT_fragment_shading_rate Bug: angleproject:420310117 Change-Id: Ie11b139a0371b5995f1533a85e02c590cd36109c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6733750 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Kimmo Kinnunen 94ee620d 2025-05-22T10:07:05 Metal: Allow optimization of simple loops Reimplement the feature to avoid undefined behavior of infinite loops. Add EnsureLoopForwardProgress rewrite pass that inserts a volatile variable access to all loops that it cannot analyze as being finite. Detect loops of form `for (; i <op> x; ++i)` as being finite. The <op> can be any of <,<=,>,>=,==, != operator. The i can be int or uint. The ++i can be -- or ++, -=1, +=1. This assumes that backends using the feature emit signed int arithmetic with defined wraparound semantics. Uses volatile write instead of asm("") due to asm not forcing the behavior in some compiler versions. The volatile variable access is defined in C++ as forward progress, and by inheritance this works in MSL. Later commits may remove injectAsmStatementIntoLoopBodies if ensureLoopForwardProgress is appropriate for all use-cases. Bug: angleproject:418918522 Change-Id: Ic9c29f57044b792195386483208632354d24c854 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6575051 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
Shahbaz Youssefi 3d806ba6 2025-03-02T00:15:36 Translator: Split textureGather* ops ... based on whether the comp or refz arguments are present. Bug: angleproject:349994211 Change-Id: I19e638f6cb27cdb890c5e30c0662aad30888d2da Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6313582 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 8dd4a6e8 2025-02-28T16:50:51 Translator: Remove rect and 2DMS* images from atomic ops They are a relic of desktop GLSL support. Bug: angleproject:349994211 Change-Id: I111467fea111d22e2d12003d639bec268e418b44 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6313639 Commit-Queue: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi d39cabbd 2025-02-27T15:15:46 Translator: textureGather* always takes refZ with shadow sampler Bug: angleproject:349994211 Change-Id: I8337b80bf1d9ecae6943c6f1432b710040081273 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6309579 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 770242db 2024-11-20T17:03:07 Translator: Remove the `gimage1D` base type This is a desktop GL type, whose removal was left out of b16d105fc6. Bug: angleproject:370937467 Change-Id: I0bda5453b95ddf924ba0583de346902b333603a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6037776 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 1f0ac74a 2024-11-20T16:43:50 Translator: Remove SubpassInputMS ANGLE never generates multisampled input attachments, because it cannot know if the shader will be used with a single-sampled or multisampled framebuffer. The SPIR-V transformer takes care of changing the type and ops to be multisampled if needed. Bug: angleproject:37093746 Change-Id: Ic9c3057536c0a5d543512dbd3c347033453a29f4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6039437 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi c4533e0a 2024-11-20T16:21:40 Translator: Remove the `double` base type This is a desktop GL type, whose removal was left out of b16d105fc6. Bug: angleproject:37093746 Change-Id: I185beef71099aafc3e350efc3dad019e2a72c0e6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6039436 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Alexey Knyazev ab1cdd22 2024-10-03T00:00:00 Translator: Support EXT_texture_query_lod No backend support yet. Bug: angleproject:368275901 Change-Id: I10bbc03feca485908315633cbc0f955e82994657 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5920240 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi ae5c3b96 2024-10-08T17:02:21 Boilerplate for GL_ARM_shader_framebuffer_fetch_depth_stencil Bug: angleproject:352364582 Change-Id: I94c670db5546564a6f60bb513a6d7f3f5bd5778c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5916771 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi b16d105f 2024-10-03T10:25:32 Remove Desktop GL front-end support For Desktop GL applications, please use Zink! Bug: angleproject:370937467 Change-Id: Ie734634bb62a2e98c80e1b32d8b3d34624da3c04 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5905428 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev b98e6bc0 2024-09-12T00:00:00 Translator: Add EXT_texture_shadow_lod functions Added translator support for functions defined in the GL_EXT_texture_shadow_lod extension. Trivially enabled on GL and Vulkan backends. Bug: angleproject:365066518 Bug: angleproject:365108862 Change-Id: Ie1fc8f50e321a559d4506c479d9cebbb48802091 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5867416 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev d37c97d1 2023-04-17T00:00:00 Metal: Implement OES_shader_multisample_interpolation * Added support for sample qualifier and shader interpolation functions * Added MSL-specific AST transformations * Adjusted minimum fragment interpolation offset state query test so that accurate limits could be reported * Drive-by: Y-flip gl_SamplePosition adjustment * Renamed ANGLESampleMaskEnabled function constant to ANGLEMultisampledRendering to correctly reflect its usage Bug: angleproject:8097 Bug: angleproject:8131 Change-Id: I25c9f36487e29f05bb9fe874e146d06378fef975 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4440827 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 7bc4b7e3 2023-03-27T00:00:00 Metal: Implement OES_sample_variables New ESSL built-ins are mapped to their Metal counterparts and tweaked to follow OpenGL ES semantics when needed. Fixed A2C interaction with sample coverage by emulating the former on non-Apple GPUs. Bug: angleproject:8097 Fixed: angleproject:5087 Change-Id: I5d28a941af5cbc14743a3930731529f11f55febd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4404896 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Kyle Piddington <kpiddington@apple.com> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 067ace47 2022-12-21T00:00:00 Add ANGLE_clip_cull_distance extension Added an extension spec. Trivially exposed it on GL, Vulkan, and D3D11. Adjusted tests and validation to allow no cull distance support for this extension string. Removed extra built-in variable definitions. Bug: angleproject:7904 Change-Id: Ic60772dfe28132c316eaa29aadc1afd66e3b0fa7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4114290 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Chris Dalton 861149c7 2022-08-03T15:43:29 Make PLS coherent on desktop OpenGL Implements ANGLE_shader_pixel_local_storage_coherent using fragment shader synchronization extensions: NV_fragment_shader_interlock INTEL_fragment_shader_ordering ARB_fragment_shader_interlock With these extensions combined, we get coherency all 3 big desktop vendors: NVIDIA, Intel, and AMD. Bug: angleproject:7279 Change-Id: Ie20b251fb772898e89994b799640f1f2806581eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3773990 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Chris Dalton c460c299 2022-06-21T11:20:45 Implement GLSL additions for ANGLE_shader_pixel_local_storage Specs out, implements, and thoroughly tests the GLSL additions for ANGLE_shader_pixel_local_storage. Adds a simple transformation that rewrites PLS directly into shader images. Updates the existing PLS tests to use the newly built-in PLS features and ensures they continue passing. For now, applications call glBindImageTexture to configure their pixel local storage. The OpenGL ES API side of this extension will follow shortly. Bug: angleproject:7279 Change-Id: I141183069b5cbfcca01cbb77b5b36d3e5f834bf5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3761876 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Brandon Schade 38fada35 2022-01-27T18:16:18 Vulkan: Add support for OES_primitive_bounding_box Add OES version of the primitive bound box extension Bug: angleproject:3576 Test: dEQP-GLES31.functional.primitive_bounding_box.* Change-Id: Ie44d952992a68dfffd5c124dda8dd11069f0c1e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3425086 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Brandon Schade <b.schade@samsung.com>
Brandon Schade 217acac2 2021-07-21T12:42:56 Vulkan: Add support for EXT_primitive_bounding_box 1. Added support for EXT_primitive_bounding_box extension 2. Renamed shader variable gl_BoundingBoxEXT[] to ANGLEBoundingBox[] Bug: angleproject:3576 Test: dEQP-GLES31.functional.primitive_bounding_box.* Change-Id: I15fa9af50c6fd8e86d225670ddd8eb39f6e65d35 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3053618 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi e2710f59 2021-07-06T17:29:08 Vulkan: SPIR-V Gen: Fix image atomic built-ins The `imageAtomic*` built-ins additionally include coordinate and sample parameters that need to be fed to OpImageTexelPointer before the atomic operation can be generated. This change passes all *image*atomic* GLES31 deqp tests as well as: GLSLTest_ES31.ArraysOfArraysOfR32fImages/ES3_1_Vulkan_DirectSPIRVGen Bug: angleproject:4889 Change-Id: I9ed729d09914cb01467d4de504de38c931a9196e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3011419 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi c3c934a3 2021-06-25T01:40:54 Translator: Better group ES100 texture builtins The ES100 texture built-ins are now (similarly to ES300 ones) grouped based on whether they include a Bias, or Lod. Bug: angleproject:4889 Change-Id: I495af48644c68286b1b0cc2a5580566fdd22cfc9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2987859 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 64ce506d 2021-06-18T14:48:29 Vulkan: SPIR-V Gen: Support most non-texture/image built-ins Most GLSL built-ins map directly to some SPIR-V operation. texture*() and image*() built-ins are not implemented as well as a handful of other built-ins that require special-handling. Bug: angleproject:4889 Change-Id: I72abfb4692c3d66a3c8be43ce44ba6808efe6255 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2971646 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 8b869a95 2021-06-13T01:09:27 Translator: Generate Ops for all built-in functions EOpCallBuiltInFunction is removed in this change, as well as the "op": "auto" property in builtin_function_declarations.txt. Instead, gen_builtin_symbols.py automatically generates Ops for every built-in function and generates the TOperator enum accordingly. This simplifies SPIR-V code generation by allowing switches to be used on operators instead of string comparisons. Bug: angleproject:4589 Bug: angleproject:4889 Change-Id: Ia351524400b0e12a10a5572e27e9b88c6ec2e61c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2958869 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi d469dcb1 2021-05-06T15:13:42 Translator: remove image2DRect There is no such thing as image2DRect in GLSL. imageRect (the right type) is present, but the code was mistakenly using image2DRect. Bug: angleproject:4889 Change-Id: I42bacd2ad8866c715af0d9711bebc95897607354 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2878095 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 54294c9a 2021-03-02T22:15:05 Partially upgrade codegen to Python 3 Bug: angleproject:5707 Change-Id: I4e26c2c7ba4a36185b28ecd6e87be1161b60431a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2729567 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Mohan Maiya 8f9e17d5 2020-12-14T14:11:11 Add EXT_clip_cull_distance extension autogen code Addition of shader autogen code for EXT_clip_cull_distance extension. Bug: angleproject:5458 Change-Id: I299528957c0e747fd84987c420588c314f54aae0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2590989 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 8a401051 2020-11-19T07:58:05 Vulkan: Support OES_sample_variables extension Enable OES_sample_variables extension on Vulkan backend. Add support for built-in variables, uniform state and constants - gl_SampleId, gl_SamplePosition, gl_SampleMask, gl_SampleMaskIn - gl_NumSamples - gl_MaxSamples Bug: angleproject:3588 Tests: dEQP-GLES31.functional.shaders.sample_variables.* KHR-GLES31.core.sample_variables.* Change-Id: Idf37c7b4ccb0331dbda7acd6389ff4e1022ba959 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2477907 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 738092ae 2020-11-18T07:58:53 Add auto generated code for GL_EXT_tessellation_shader To support tessellation, code and auto generated code are added. Entry points function, ShaderTypes, built in variables and constants, builtin function barrier and patch keyword are added. Bug: angleproject:3572 Change-Id: Ia5fe473e884466cb88cea7138e13377a1d7b4fa0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2538393 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 43acf3ba 2020-07-31T15:43:57 GL: Compiler changes for GL_OES_texture_buffer This extension is core in GLES 3.2 This CL enables the extension, added 412 new dEQP tests for texture buffer. 410 of these tests pass, but there are two tests that fail, detailed in anglebug.com/4933 Also includes a fix for completeness checks. Based on a CL by Jonah Ryan-Davis. Bug: angleproject:3573 Bug: angleproject:4933 Change-Id: I45759d765c88c64f21b592eab01d910dc4bc8da3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2521239 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Mohan Maiya e895ced6 2020-10-29T09:06:00 Vulkan: Add OES_shader_image_atomic support Add support for shader builtins and enable the extension. Bug: angleproject:3578 Tests: dEQP-GLES31.functional.*image_atomic* Change-Id: Idd45b2ee62efe1474c6c5947c77da64ff2221bf6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2505540 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 553726a4 2020-10-20T11:29:17 Vulkan: Add OES_shader_multisample_interpolation extension Addition of 'sample' qualifier keyword and 'interplateAt*' fragment shader builtin functions with autogen Bug: angleproject:3589 Change-Id: If358eb371fbcefffa715c8da4ba5e96eefaf6f52 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2477904 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 7e815c77 2020-07-08T13:43:40 Implement EXT_shadow_samplers Bug: angleproject:4863,b/161716126 Change-Id: I6beb45d91f59a851787c9f40b40266fb985198d5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2288330 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis eadc387c 2020-04-01T16:53:31 GL: Support GL_OES_texture_cube_map_array in shader translator GL_OES_texture_cube_map_array is core in 3.2. This CL adds support for this extension in the shader translator. Now passes dEQP.KHR_GLES31/core_texture_cube_map_array.*, dEQP.GLES31/functional_fbo_color_texcubearray_*, and dEQP.GLES31/functional_opaque_type_indexing*samplercubearray* with GL backend. Bug: angleproject:3584 Change-Id: I1a8485c7d9d3fffb9b5109d292b35b0c56a3c665 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2133086 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Le Hoang Quyen dadd1986 2020-04-21T01:50:00 Implement GL_APPLE_clip_distance - Built-in variable gl_ClipDistance has been added to compiler. - Desktop GL: gl_ClipDistance is supported since GL 3.0. Enable/Disable each gl_ClipDistances[i] works out of the box via glEnable(). - Vulkan/Metal: Use uniform variable to control writing to each gl_ClipDistance. One bit flag controls one element in the gl_ClipDistance array. The writing to the disabled element in vertex shader will be ignored, and turned into zero assignment instead. - Direct3D/Mobile GL: Not implemented yet. - Added ClipDistanceTest to gl_tests and compiler unittests. - GL_APPLE_clip_distance is a subset of GL_EXT_clip_cull_distance, so GL_EXT_clip_cull_distance could be implemented in future if needed. Bug: angleproject:4452 Change-Id: I571ac8b56826989808a680226a04bec4cf59988e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2084324 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 5a7356ae 2020-01-16T23:22:31 Add support for non-float mix The non-float variations of the mix builtin were conditioned to desktop GLSL, but they are present in ESSL 3.1+. This change also implements constant folding of these builtins as exercised by dEQP. Bug: angleproject:4300 Change-Id: Iec34de4cf370e00d67fd605148cd7848f9e122f8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2006809 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi beb33691 2019-12-20T16:15:20 Vulkan: EXT_gpu_shader5: Fix textureGatherOffsets builtin This function is the only builtin with arrays as parameter. A new constexpr constructor is added to TType to support this, and gen_builtin_symbols is changed to emit the correct type for offsets parameter of this function. Bug: angleproject:3569 Change-Id: I55af58b43f24cd605c622ee685b359535e11ef85 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1975431 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 4b80fbc8 2019-12-18T23:40:15 Fix textureGatherOffsets classification sampler2DRect was placed under ESSL while sampler2DArrayShadow was placed under desktop GLSL. They are swapped. Bug: angleproject:3569 Change-Id: Ibf39868d4cd702d9d1da7fc286171bb70b80d6df Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1975430 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yan 17b3c2f3 2019-10-14T14:13:59 Implement SamplerVideoWEBGL for WEBGL_video_texture extension on desktop WEBGL_video_texture is an extension that will improve uploading video frame to WebGL performance. (https://www.khronos.org/registry/webgl/extensions/proposals/WEBGL_video_texture/) This extension introduced a new texture type TEXTURE_VIDEO_IMAGE_WEBGL and a new sampler type samplerVideoWEBGL to sample it. In chromium implementation, TEXTURE_VIDEO_IMAGE_WEBGL maps to different native texture type based on platform. On desktop, it maps to GL_TEXTURE2D(Currently supported). On Android, it should map to GL_TEXTURE_EXTERNAL(TODO). SamplerVideoWEBGL needs to be mapped to sampler2D or samplerExternalOES according to TEXTURE_VIDEO_IMAGE_WEBGL implementation. This patch implements samplerVideoWEBGL in Angle to support WEBGL_video_texture on desktop. In this case, samplerVideoWEBGL should map to sampler2D. Bug: chromium:776222, angleproject:3889 Change-Id: Idb0a5fcde37ca75ccc1181226b91f257212e7500 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1866274 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 19868b7e 2019-12-13T14:29:57 Restructure textureGatherOffset* builtin declarations This is in preparation of textureGatherOffsets support. Bug: angleproject:3569 Change-Id: I4ce5a1e102790181c8f843735961b9c249a69221 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1965720 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 9af3e137 2019-12-05T15:35:33 Vulkan: EXT_gpu_shader5 support: fma Add the fma() builtin function to ESSL. Bug: angleproject:3569 Change-Id: Ic8419b4c117ecdd8b47aa733bf7aff9ee7579bbf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1954484 Reviewed-by: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Tobin Ehlis 240befe5 2019-11-15T14:40:31 Add support for gl_HelperInvocation Added HelperInvocation to builtin_variables.json, regenerate the codegen portions of compiler, and plumb support for HelperInvocation through the rest of the compiler. Skipping some fails on Android and Swiftshader for this initial change and will debug/fix those issues in a follow-on. Bug: angleproject:4110 Change-Id: I781a2782ace84200bc615a2cc26b908a62e2aa26 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1922061 Commit-Queue: Tobin Ehlis <tobine@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c37d2370 2019-09-19T18:54:40 Reland "Refactor built-in symbol table." This is a reland of 59d982c0dcad580ccbf4e29f32ffa3ea9a280122 Original change's description: > Refactor built-in symbol table. > > In preparation for reducing binary size. Shortend a bunch of strings > and symbol prefixes so the autogen file will be more compact. > > Bug: chromium:998535 > Change-Id: If1bedaaacc06dce9678d432055ffa0c9215a8dbd > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1814724 > Reviewed-by: Tim Van Patten <timvp@google.com> > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> > Commit-Queue: Jamie Madill <jmadill@chromium.org> Bug: chromium:998535 Change-Id: Iebc5b1b5e1a084257fba3c50026cc62df5a879b3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1817499 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Zhenyao Mo f585c2fb 2019-09-21T02:12:37 Revert "Refactor built-in symbol table." This reverts commit 59d982c0dcad580ccbf4e29f32ffa3ea9a280122. Reason for revert: crbug.com/1006501 Original change's description: > Refactor built-in symbol table. > > In preparation for reducing binary size. Shortend a bunch of strings > and symbol prefixes so the autogen file will be more compact. > > Bug: chromium:998535 > Change-Id: If1bedaaacc06dce9678d432055ffa0c9215a8dbd > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1814724 > Reviewed-by: Tim Van Patten <timvp@google.com> > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> > Commit-Queue: Jamie Madill <jmadill@chromium.org> TBR=timvp@google.com,jonahr@google.com,jmadill@chromium.org Change-Id: Ie540da8ea4429e075a3284183e5a004cbcf1307b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:998535,chromium:1006501 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1817497 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Jamie Madill 59d982c0 2019-09-19T18:54:40 Refactor built-in symbol table. In preparation for reducing binary size. Shortend a bunch of strings and symbol prefixes so the autogen file will be more compact. Bug: chromium:998535 Change-Id: If1bedaaacc06dce9678d432055ffa0c9215a8dbd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1814724 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
shrekshao cd31f286 2019-06-25T14:22:41 Implement Draw base vertex and base instance functions This patch implements functionality of glDrawArraysInstancedBaseInstanceANGLE, glDrawElementsInstancedBaseVertexBaseInstanceANGLE, glMultiDrawArraysInstancedBaseInstanceANGLE, and glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE Workaround for OpenGL driver on Mac: gl_VertexID on Mac with AMD GPU doesn't include baseVertex value. So replace gl_VertexID with (gl_VertexID + angle_BaseVertex) if any. Workaround for Vulkan GLSL: gl_InstanceIndex on Vulkan includes baseInstance. So replace gl_InstanceIndex with (gl_InstanceIndex - angle_BaseInstance) when angle_BaseInstance is declared. Bug: chromium:891861, angleproject:3402 Change-Id: Ia1d94b5d4d7da7e635468c05c962c4f7eb1b1919 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1750126 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Clemen Deng 56db3789 2019-08-01T17:09:53 Use flat arrays instead of switches for function lookups Current implementation of built in function lookup uses autogenerated switch statements. Instead, use the perfect hash mapping to have the lookup use arrays instead. This will improve runtime performance. Bug: angleproject:3805 Change-Id: I6d0ba62d79abd53a7fe818fe675282800781f256 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1756883 Commit-Queue: Clemen Deng <clemendeng@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Clemen Deng 05744c23 2019-08-21T16:21:30 Change gl_DrawID from level = ESSL1+ESSL3 to COMMON Built in variable gl_DrawID is exposed to ESSL1 with a suffix, when the variable is the exact same. No need to do this. Bug: angleproject:3805 Change-Id: I63c71791bb6a0e8aa7b644171a3f5a81099eddc0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762359 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Clemen Deng <clemendeng@google.com>
Jonah Ryan-Davis 396527c9 2019-08-20T13:48:38 Autogenerated kFunction* variables detected as mutable constants The android binary size is increased incorrectly because the autogen kFunction* variables are detected as mutable constants. Rename them to function* to workaround this. Bug: angleproject:3823 Change-Id: Ia335d1ae97ce5276a0ff8b9e432b53181cc36680 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762494 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Clemen Deng 486f381f 2019-07-18T15:47:31 Add desktop GL built-in functions to symbol table Added GL built-in functions to symbol table autogeneration Built-in lookup now checks against spec and returns GL symbols when appropriate. Bug: angleproject:3719 Change-Id: I74786150f6063b40e13aebcb2eb9ea35e4ecaa53 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1731550 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Clemen Deng <clemendeng@google.com>
Clemen Deng e7970c3e 2019-08-07T14:43:17 BasicMangledName class Need a class for basic mangled names since with the addition of GLSL types the number of basic types is > 52 (a-z, A-Z), so we need more than one character to represent a type Bug: angleproject:3719 Change-Id: I98beee9d42a016cb0c017f56ab82538c89212e33 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1742221 Commit-Queue: Clemen Deng <clemendeng@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Clemen Deng 9031bdd9 2019-07-26T14:51:23 Use perfect-hash module in gen_builtin_symbols.py The script currently takes ~4 minutes to run Using this module instead of manually hashing will improve runtime significantly Bug: angleproject:3747 Change-Id: I7e2d2ef5bbfd136b0299d571e0acc11f334c80b5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1724667 Commit-Queue: Clemen Deng <clemendeng@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
shrekshao cdab03aa 2019-06-18T17:24:54 Add flags to shader translator to emulate gl_BaseVertex and gl_BaseInstance Adds support for translating gl_BaseVertex and gl_BaseInstance for implementation of GL_ANGLE_base_vertex_base_instance. They will only be available in WebGL 2. Since there's no gl_VertexID and gl_InstanceID in WebGL 1. It won't be very useful to add them to WebGL 1. Mostly follow pattern of gl_DrawID of GL_multi_draw BUG=angleproject:3402,chromium:891861 Change-Id: Ifcd990c52d12f6814127b904e61a779b8d382e0c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1666361 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop 4fbbdb15 2019-06-28T14:17:13 texture3D: Compiler changes for sampler3D Bug: angleproject:3188 Change-Id: Iac1408f8b91c6a6610a63cef236205b7dcdbd2c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1682781 Reviewed-by: Lingfeng Yang <lfy@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jamie Madill c09ae15c 2019-02-01T14:16:32 Enable -Wextra-semi and -Wextra-semi-stmt. This will prevent users from accidentally making semicolon errors in the future. Bug: chromium:926235 Change-Id: I79a6fa376fb1ad8f0fcf1b65b1f572a035d1f4e9 Reviewed-on: https://chromium-review.googlesource.com/c/1446493 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Austin Eng 153e0224 2018-12-07T13:31:31 Add gl_DrawID emulation for ESSL3 with ANGLE_multi_draw Bug: chromium:890539 Change-Id: I3d9a9429608afb454f076013f3ed844e115c56cc Reviewed-on: https://chromium-review.googlesource.com/c/1368784 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
Austin Eng 7cf9cd24 2018-10-09T15:27:32 Add flags to shader translator to emulate gl_DrawID Adds support for translating gl_DrawID for implementation of GL_ANGLE_multi_draw. Currently the change only supports and allows emulation of the draw id using a uniform variable named `gl_DrawID`. This uniform is mapped in the translated shader to a hashed name that does not use the gl_ namespace Bug: chromium:890539 Change-Id: I08a246ca911e88e733ccdf22f1ed69dcae948e05 Reviewed-on: https://chromium-review.googlesource.com/c/1271957 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Olli Etuaho 8ca60805 2018-08-23T14:10:02 Add 2D MS array sampler support to compiler This also places textureSize(gsampler2DMS) correctly in the ESSL 3.10 builtins instead of ESSL 3.00 builtins. BUG=angleproject:2775 TEST=angle_unittests Change-Id: Ieb0f7a7424a5558a5569af6d4fcbcc9b12ec9840 Reviewed-on: https://chromium-review.googlesource.com/1186466 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 89398b65 2018-03-21T17:30:50 Avoid mangled name comparisons of 3-parameter functions The hash values used for looking up built-ins now encode whether the mangled name contains arrays, structs or interface blocks in its parameters list. This is written in the most significant bit of the hash value. We check this bit at the start of built-in lookup and if the bit is set we exit early. After that we know that the lookup name doesn't contain array, struct or interface block parameters. When we find a hash that matches a hash of a built-in function, we now know 3 things: 1) the length of the mangled name matches 2) the open parentheses in the mangled name matches 3) the lookup doesn't contain array, struct or block parameters. Additionally, we have an if statement checking whether the function name matches. Collisions are only possible with functions that 1) have the same name 2) have the same number of parameters With these preconditions we can check beforehand whether collisions are possible for 3-parameter functions. If there are no collisions, we don't need to compare the full mangled name. This is similar to what was already being done with functions that had 0 to 2 parameters. This reduces shader_translator binary size by around 4 KB on Windows. Besides increased complexity, the tradeoff is that an exhaustive search of hash values for possible 3-parameter combinations is costly, so the gen_builtin_functions.py code generation script now takes around one minute to run on a high-end workstation. Due to this, the script now exits early if it detects it has already been run with the same inputs based on a hash value stored in builtin_symbols_hash_autogen.txt. BUG=angleproject:2267 BUG=chromium:823856 TEST=angle_unittests Change-Id: I3ff8c6eb85b90d3c4971ac8d73ee171a07a7e55f Reviewed-on: https://chromium-review.googlesource.com/973372 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 3b678745 2018-03-21T12:59:19 Use a specialized hash function for mangled names The hash values used for looking up built-ins now encode the string length and the location of parentheses as six-bit values, so that we don't need to check for these if the hash matches. This decreases shader_translator binary size on Windows by around 10 KB. BUG=angleproject:2267 BUG=chromium:823856 TEST=angle_unittests Change-Id: If8c28e1c8851750633509ec6273f556e06e91cd1 Reviewed-on: https://chromium-review.googlesource.com/973243 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho e79d0f86 2018-03-19T11:55:14 Rely on hash to check for some mangled name matches When we are looking up a function with only a few parameters, we can optimize the lookup by relying on the information encoded in the hash value. There's often only one list of parameters with the same function name and mangled name length that results in a matching hash, so we don't actually need to compare the full mangled name. We can just compare 1) the hash value of the mangled name 2) the mangled name length 3) the function name to make sure that the mangled name matches the mangled name of the function. This decreases the binary size since we don't need store as many mangled names of built-in functions. Effect on symbol lookup speed is marginal. BUG=angleproject:2267 BUG=chromium:823856 TEST=angle_unittests Change-Id: I3ef41d943209509d4e8e6ece14ebad7e2677abc6 Reviewed-on: https://chromium-review.googlesource.com/973242 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 115b2c4a 2018-03-15T17:46:29 Remove desktop GLSL builtins from symbol lookups Desktop GLSL builtins can be accessed through functions in BuiltIn_autogen.h. They don't need to be included in symbol table lookups. BUG=angleproject:2267 TEST=angle_unittests Change-Id: I8ba188a0d2584353e34159c2732c9e2bd420c168 Reviewed-on: https://chromium-review.googlesource.com/964447 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho b391ec40 2018-03-12T17:04:59 Generate code for looking up built-ins Instead of storing built-ins in a std::unordered_map, we now generate a series of switch statements using the hash value of the look-up string. This works similarly to earlier implementation of looking up unmangled built-ins. Those built-ins that need to be initialized at run-time are stored as member variables of TSymbolTable. This increases compiler init performance significantly, as well as increasing compiler perf test scores around 1-2%. Binary size is larger than before though. BUG=angleproject:2267 TEST=angle_unittests Change-Id: If1dcd36f0d2b30c2ed315cdcf6e831ae9fe70c94 Reviewed-on: https://chromium-review.googlesource.com/960031 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 065aa863 2018-02-22T15:30:27 Generate code for unmangled name lookup Instead of using an std::map at each symbol table level, use the gen_builtin_symbols.py script to build a function to query unmangled names. BUG=angleproject:2267 TEST=angle_unittests Change-Id: I4f1cf1df1f50fe9d909f3249150ee002ee6efb61 Reviewed-on: https://chromium-review.googlesource.com/931885 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>