src/compiler


Log

Author Commit Date CI Message
Alexey Knyazev 805e00b8 2022-10-27T00:00:00 D3D11: Add clip and cull distance support Added gl_ClipDistance and gl_CullDistance support to HLSL translator. Added enabled clip distance GL state emulation. Added limitSimultaneousClipAndCullDistanceUsage limitation. Expanded and optimized related end2end tests. Bug: angleproject:4452 Change-Id: Id66312505254ceff43d5258d486ddcdb0462db47 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3990944 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev ac5a9c53 2022-10-26T00:00:00 Metal: Optimize ReplaceClipCullDistanceVariable The intermediate ANGLEClipDistance variable is not needed when generating MSL output directly. Bug: angleproject:6291 Change-Id: Ie3d32a903645be002f21c44a6233f9cd0155605a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3981716 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Kyle Piddington <kpiddington@apple.com>
Alexey Knyazev c97edf51 2022-10-24T00:00:00 Metal: Enable APPLE_clip_distance Adjusted direct-to-Metal shader translator to support gl_ClipDistance built-in. Bug: angleproject:6291 Change-Id: Ice4cc3e4d7c131cbaac9726e845a5c1e59787e69 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3976428 Reviewed-by: Kyle Piddington <kpiddington@apple.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi adde4265 2022-10-19T23:33:48 Vulkan: Separate pipeline cache query and insertion In preparation for VK_EXT_graphics_pipeline_library usage, the query and insertion functions of the graphics pipeline cache are separated. This will allow the implementation using VK_EXT_graphics_pipeline_library to query the monolithic pipeline cache, and if a pipeline is not found, create it through the pipeline library caches. Bug: angleproject:7369 Change-Id: Iebf7669ae3ea95e180646198c4861cc59d67e580 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963854 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Sungyong Choi c6390143 2022-10-12T09:57:55 Vulkan: Make compatible with GCC Resolves below warnings occurred with GCC build. 1) deperecated-copy Overriding an assignment operator without a copy constructor caused the deprecated-copy warnings. 2) unused-function 3) parenthesis Warnings occurred due to missing parenthesis around some logical expressions, add them to quiet the warnings. 4) unused variable 5) 'maybe-unused' attribute ignored Introduces 'ANGLE_MAYBE_UNUSED_PRIVATE_FIELD' macro to avoid 'attribute ignored' warning which is only occurred with GCC because GCC doesn't warn about 'unused non static data member' whereas Clang has Wno-unused-private-field. Signed-off-by: Sungyong Choi <sywow.choi@samsung.com> Bug: angleproject:7764 Change-Id: I8e7410a5ed8cb9b8f8b3202073d779fea63d6b75 Reviewed-by: Jeff Vigil <j.vigil@samsung.com> Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963830 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev fec93f40 2022-10-14T00:00:00 GL: Support clip and cull distance extensions Use EXT_clip_cull_distance on OpenGL ES to expose APPLE_clip_distance; use ARB_cull_distance on OpenGL to expose EXT_clip_cull_distance. Added disableClipCullDistance OpenGL workaround. Bug: angleproject:4452 Change-Id: I458cad29c10b9d9193c5233e24bac53361ba104e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3956075 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
George Burgess IV 54d094fe 2022-05-23T13:05:46 angle: fix potential nullptr dereference `checkIsScalarBool` immediately deref's `typedCond`, which may be NULL. Prevent that. Caught by the static analyzer: > device/generic/vulkan-cereal/third-party/angle/src/compiler/translator/ParseContext.cpp:893:9: warning: Called C++ object pointer is null [clang-analyzer-core.CallAndMessage] Bug: b/206470603 Test: None Change-Id: I2c055d637fb3ef254c0cebfae32bfbe17bf850ea Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3935460 Auto-Submit: Greg Schlomoff <gregschlom@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton 2d31fe98 2022-09-22T21:04:22 Implement PLS on Apple Silicon Implements a subset of EXT_shader_framebuffer_fetch in the Metal translator that is sufficient to support pixel local storage. Metal's "programmable blending" feature is available on all Apple family GPUs beginning with version 2. Support for non-Apple GPUs will come later via readWrite textures, which can also be coherent by annotating them with [[raster_order_goup(0)]]. Bug: angleproject:7279 Change-Id: Ic74f6c0d21e87eb919e1f487163388d08d126857 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3916794 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Gregg Tavares <gman@chromium.org>
Chris Dalton b5514bb2 2022-09-21T20:47:00 Support pixel local storage on ES 3.0 Now that the application-facing API is implemented, we don't have to rely on ES 3.1 anymore. Expose and test the extension on ES 3.0. Bug: angleproject:7279 Change-Id: I5635620b9088201c20bafd283813092a329225d6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3915327 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Chris Dalton <chris@rive.app> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton a7dc51f2 2022-10-01T08:49:11 Add a framebuffer fetch implementation of PLS The framebuffer fetch implementation works by attaching PLS backing textures to the framebuffer, and then rewriting PLS uniforms as "inout" fragment variables. The compiler's existing machinery takes it from there and makes it work on GL and Vulkan, and soon Metal. EXT_shader_framebuffer_fetch is now the preferred backend for pixel local storage, but we also use EXT_shader_framebuffer_fetch_non_coherent if shader images can't be coherent. This is especially interesting for Vulkan, since noncoherent framebuffer fetch is possible without any extensions. Bug: angleproject:7279 Bug: angleproject:7683 Bug: angleproject:7684 Bug: angleproject:7724 Change-Id: I33f3b2c6df9a5709969d9165c448ea71b096c9e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3900142 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton a81679bc 2022-09-26T23:56:34 Support EXT_shader_framebuffer_fetch on GLES All the frontend functionality for EXT_shader_framebuffer_fetch is already present, but only supported on Vulkan. This change wires it up for the native GLES backend as well. Bug: angleproject:7279 Bug: angleproject:7703 Change-Id: Ie1fce79e08a78662c8af65d33f3d8417c96cf58e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3920577 Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 583fd03e 2022-09-29T16:28:05 Translator: Fix ClampIndirectIndices vs. unsized arrays A deepCopy() was missing from this code path, which led to an AST validation error. However, clamping indices for unsized arrays is not strictly correct. For example, an out of bounds write with robustness is expected to be dropped, not overwrite the last element. Since robustness already covers storage blocks, this clamping is no longer done. Bug: angleproject:7712 Change-Id: I96dd18ef47cd453f19391bdccbd4372c24854ade Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3924863 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Corentin Wallez 90201481 2022-09-30T17:37:15 Add missing include for std::function A roll of libc++ in Dawn finds these issues. Bug: dawn:1532 Change-Id: I5e3f8e89630b13e22b2942e10648761bed80920c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3925805 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Chris Dalton 493bab09 2022-09-15T14:20:41 Add an ShPixelLocalStorageType enum Adds ShPixelLocalStorageType to ShCompileOptionsPLS and adds a getNativePixelLocalStorageType() call to ContextImpl. For now this enum only tells the translater whether PLS formats needs to be packed into r32 images, but it will soon also be able to select framebuffer fetch, native pixel local storage, and other PLS implementations. Bug: angleproject:7279 Change-Id: Ifbd419b20550b8711ae3044782177806796216f1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3900498 Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Solti 0af9aa03 2022-08-30T22:24:21 use proper TPrecision when creating TType Overview Using "EbpUndefined" when create the inputAttachmentType(TType) causes the maximum precision in SPIR-V. The maximum precision is not required and may degrade performance. This CL makes the creation using a proper precision based on declared variables. Tests ===== confirm the precision in SPIRV ===== - Using genshin_impact trace to verify - Using RenderDoc - Executable Path: com.android.angle.test/#DefaultActivity - Intent Argument: -e org.chromium.native_test.NativeTest.StdoutFile /sdcard/chromium_tests_root/out.txt -e org.chromium.native_test.NativeTest.CommandLineFlags "--gtest_filter=TracePerfTest.Run/vulkan_genshin_impact" - Capture frame 9 with the drivers built with and without CL. - Magically found one vkCmdDrawIndexed(396, 1) that "TextureViewer" has "ANGLEInputAttachment" as inputs. In "Pipeline State", the "FS" uses shader module 9556 - then compare the shader module 9556 sources from the 2 drivers. Confirmed the differences: - GLSL (SPIRV-Cross): https://screenshot.googleplex.com/A8gWMGR2EmnZwHv.png - SPIR-V (RenderDoc): https://screenshot.googleplex.com/5yqKc4pWL3qLaEj.png Bug: angleproject:7281 Change-Id: I86b315ddf057325638e58d5a0d7f8b203d8b74f8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3866573 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Solti Ho <solti@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Jamie Madill f39a9659 2022-09-09T10:09:58 Update flex/bison binaries. These binaries were updated using update_flex_bison_binaries.py. Please see instructions in tools/flex-bison/README.md. flex is at version 2.6.4. bison is at version 3.8.2. Bug: None Change-Id: Ia3189b678fc8ddacdf14bbfd3f4750f938d32ac3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3886807 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Patrick To fc51d98f 2022-08-11T03:29:16 Add Direct Composition offset to gl_FragCoord DComp usually gives us an offset at (0, 0), but this is not always the case. It is valid for DComp to give us an offset into a texture atlas, for example with some video overlays. If we do have an offset, gl_FragCoord must also be offset to point to the correct pixel in the surface. Bug: chromium:1269749 Change-Id: I3ca39860d176bcf9f1d520d781cfed2d1d1ad1dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3827081 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Kimmo Kinnunen 6937ea98 2022-09-08T14:15:10 Use base name of the generator script in various generated files Increases compiler cache hits especially in cases where the file is run during build. Bug: angleproject:7642 Change-Id: I769dae2d7cca2cf1e238531f4cb356bad41b06dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3880323 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Kimmo Kinnunen c10326f1 2022-08-26T11:37:59 Make shader dump code compile after ShCompileOptions API change Make the output directory configurable with the define that turns on the dump feature. Write each aggregate struct in its own block of memory, so that if an aggregate changes, the binary format does not change so easily. Choose the filename based on the contents hash, so that multiple dump sessions do not produce excessive amount of dumps. Bug: angleproject:7612 Change-Id: Ifccd2d83e3361dc4633b601fd18f425c9ec44790 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3858263 Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Eddie Hatfield ba4b6913 2022-08-23T09:34:27 Fix data race in BlobCache * Re-enable shader cache feature * Improve BlobCache thread-safety test * Improve EGLProgramCacheControlTest to not check the size of the BlobCache, since the shader cache interferes with this. * Include the arguments to ConstructCompiler() and Compile() in the key hash for the shader cache. Bug: angleproject:7036 Change-Id: Ied4e11f9160552f2f9358d99b5656315239ba856 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3851161 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Eddie Hatfield <eddiehatfield@google.com>
Chris Dalton 6ba8582b 2022-08-05T16:16:01 Add a fix on all backends for images as function arguments The ESSL spec has a bug with images as function arguments. The recommended workaround is to inline functions that accept image arguments. Bug: angleproject:7484 Change-Id: I8fc0826f330c68150de5c3d1758c10c3e37bbf04 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3813050 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton 9d41585e 2022-08-12T14:20:34 Make PLS coherent on D3D 11.3 Adds a new internal memory qualifier to the compiler called "rasterOrdered", which we set in RewritePixelLocalStorage.cpp when D3D 11.3 Rasterizer Order Views are supported. The HLSL translator then generates RasterizerOrderedTexture2D<> instead of RWTexture2D<> when this qualifier is set. Bug: angleproject:7279 Change-Id: I39b8c3279b7bff93b7e57272e8fb84d9c0312616 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3830288 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton 51de3837 2022-07-28T00:05:54 Enable PLS on D3D Bug: angleproject:7279 Change-Id: Ide498e6ebadc5cd567dc64cd1efed52e777aa32e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3790473 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 80a9ee71 2022-08-25T01:03:09 Fix translator fuzzer The GLSL mac-only options were being listed as unsupported only when the output is not GLSL. However, they should also be listed as unsupported on GLSL output when not on mac. Bug: chromium:1355076 Bug: chromium:1355281 Change-Id: I5a87d9a529e534b2ea6c030ad7132cd0f698e7d1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3855700 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Kyle Piddington 58392791 2022-04-07T16:14:12 Translator: Fix crashes with monomorphizing loops Monomorphize functions crashes when trying to deep-copy a while loop, and a continue statement. Null check these values before performing a copy, as this is still valid AST syntax. Bug: angleproject:7190 Change-Id: I822c0aa062ed844f86aa2b603899d73cbd48255e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3573079 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Kyle Piddington <kpiddington@apple.com> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Chris Dalton 4a636cdd 2022-07-20T22:44:30 Require all PLS formats to consume exactly 4 bytes of storage D3D 11.0 UAVs only support R32_FLOAT, R32_UINT, R32_SINT formats. EXT_shader_pixel_local_storage explicitly states that all PLS variables consume exactly 4 bytes. ESSL images can only have both read and write access if their format is r32f, r32i, r32ui. (We were able to circumvent this via aliasing, but it was a huge source of bugs.) There is a large precedent for only supporting 4 bytes of storage in the capabilities we use for PLS, so this CL removes support for all PLS storage formats that are not 4 bytes. It also implements an "R32" mode for PLS, that does manual packing and unpacking of r32* image formats. If the application wants larger formats, it can always define multiple PLS planes and piece them together. Next up we ought to be able to support rg16* types with more packing/unpacking. With aliasing gone, and with a bit of tweaking, the PLS tests now pass on the Pixel 4 GLES bot. Bug: angleproject:7279 Bug: angleproject:7388 Bug: angleproject:7524 Bug: angleproject:7527 Change-Id: I6b8f62c2428ade6cb5413e33360d734e55dda0eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3782579 Reviewed-by: Stephen White <senorblanco@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton fa3d7d5c 2022-08-05T00:57:40 Make PLS coherent on Vulkan Uses the VK_EXT_fragment_shader_interlock extension to make the shader image implementation of PLS coherent on Vulkan. This extension is supported on AMD, Apple, NVIDIA, and Intel. Bug: angleproject:7279 Change-Id: Ic0253eb20932eb6be0b1f433ba454e48b57be2f5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3813816 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kyle Piddington aef9603f 2022-08-02T18:30:08 Separate Struct declarations earlier Metal translator backend asserts with compound struct definitions. Move SeparateCompoundStructDeclarations before SeparateCompoundExpressions. This change does revert some changes for angleproject:6386, but the tests fixed there continue to pass. Bug: angleproject:6489 Change-Id: I6adc606ac0b14453eb5e3e90f6501bf02c2d2768 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3806616 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Gregg Tavares <gman@chromium.org> Commit-Queue: Kyle Piddington <kpiddington@apple.com>
Shahbaz Youssefi 493b5aff 2022-08-09T14:57:24 Vulkan: Workaround ARM bug with stencil write mask Bug: angleproject:7556 Change-Id: I0aa17c178071cc15d8ee15f700b0c4932819c72a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3821367 Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Amirali Abdolrashidi 8050079c 2022-08-08T16:35:10 Vulkan: Remove basicGLLineRasterization * Removed basicGLLineRasterization from the ANGLE features. * Removed "viewport" from the extended driver uniform classes. Bug: angleproject:2830 Bug: angleproject:7558 Change-Id: I289b1e2b536a6bd0c1ab24844835221e617a296d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3818165 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 6f80f0f0 2022-08-06T02:29:19 Translator: Clean up the compile flag passing interface Historically, compile flags were sent to the translator as a bitmask. Recently, we were getting close to running out of bits. Additionally, direct-to-metal work had started to introduce constants to be passed to the translator, which were misplaced in ShBuiltInResources and Caps. Recent work on Pixel Local Storage adds even more constants, aggravating the situation. In this change, the interface to passing compile flags is reworked. A struct is passed (instead of a bitmask) that has one bit for each flag. This can be indefinitely extended. Additionally, the constants needed by metal and PLS are also placed in this struct. In turn, the backends can set these options directly, and don't have to hack them into Caps to further get hacked into ShBuiltInResources. Bug: angleproject:7559 Change-Id: If93f1e1b8818ad3a0ac708ab04ab93b4b397d114 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3812562 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 8474a95e 2022-08-05T22:15:04 Translator: Don't validate structs on non-root nodes Struct validation needs to know about structs that may have been defined outside the scope of the node, so this validation (similar to variable and function call validation) is disabled when validation a subtree of the AST. Bug: angleproject:7531 Bug: b/239207278 Change-Id: Id6dcee041a40f09f0c36a9ef3bfc238433b69c58 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3812047 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Amirali Abdolrashidi 7fe0694c 2022-07-14T16:42:30 Vulkan: Use push constants for driver uniforms * Updated the driver uniforms so they would be defined as push constants in SPIR-V. Their data would be updated via pushConstants() when handling the driver uniform dirty bits. * Updated TOutputVulkanGLSL to be able to generate the push constants as required. * When handling the driver uniform dirty bits, we no longer allocate a buffer. * Removed the driver uniform descriptor set from the pipeline layout. * Removed the binding-related functions and flags for the driver uniforms. * In invalidateGraphicsDescriptorSet(), DIRTY_BIT_DESCRIPTOR_SETS is used instead of DIRTY_BIT_DRIVER_UNIFORMS_BINDING. (Same for invalidateComputeDescriptorSet()) * DIRTY_BIT_DRIVER_UNIFORMS_BINDING is replaced with DIRTY_BIT_DRIVER_UNIFORMS in other places. * Removed mDriverUniform and DriverUniformsDescriptorSet from ContextVk. * Added mSupportedVulkanShaderStageMask to RendererVk, which is used in creating the pipeline layout and updating the push constants. * Added a TODO note for driverUniformsDescriptorSetIndex. Bug: angleproject:6858 Change-Id: I91037d378528962a816b12ff3f21249ee17b7652 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3782570 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Chris Dalton c554b92b 2022-08-08T10:08:33 Apply memory qualifier decorations in SPIR-V Bug: angleproject:7279 Change-Id: I9390261aa572fe4b39152a6f7bdd2b100b34f616 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3818162 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Lingfeng Yang 3ccaddf9 2022-07-26T10:02:01 Vulkan: EXT_YUV_target: layout(yuv) support This CL adds support for layout(yuv) in the shader, via a new decoration. The SPIRV decoration enum number is WIP and depends on final spec. The decoration is only active if enabled via a flag in ShaderLang, which will be connected with the feature supports_yuv_target in a future CL. Bug: b/223456677 Change-Id: I29a724e689d1336a3e42c83d7afa944a11e07353 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3765890 Auto-Submit: Lingfeng Yang <lfy@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Lingfeng Yang <lfy@google.com>
Shahbaz Youssefi 4e046256 2022-07-25T17:17:28 Translator: Fix deep copy of loops and branches Fixed nullptr dereference when the loop or branch doesn't have an expression. Bug: angleproject:7518 Change-Id: Ib888634e409dcbc27ef060bb46017e8911097eef Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3785294 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton d57ce815 2022-07-16T16:33:08 Use "readwrite" PLS images when possible We actually only need readonly/writeonly aliases on ESSL, non r32f/r32ui. For all other cases, this change updates the compiler to emit a single readwrite image. We also optimize this image with the "restrict" qualifier since PLS specifically disallows aliasing. Removing the aliased load and store also eliminates our issue with an Intel driver bug, and all the PLS tests now pass without any workarounds. Bug: angleproject:7279 Bug: angleproject:7398 Change-Id: I350b239793647da33add96509b8f4b1bbef02245 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3767537 Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Chris Dalton aa7e6751 2022-07-15T23:33:30 Automatically enable early_fragment_tests when PLS is declared When PLS is polyfilled by shader images, we need early_fragment_tests in order to match the same depth/stencil behavior as when it is implemented as framebuffer fetch. Bug: angleproject:7279 Change-Id: I37f5a8682cc96a14ef247d53ed243e4aceb15f39 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3767535 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton 77aa34ae 2022-07-16T13:08:00 Add support for PLS as function arguments Bug: angleproject:7279 Change-Id: I89d5c02148cbdbbd02dc4840ffada2c96c2a849b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3767534 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
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>
Lingfeng Yang b860fa45 2022-07-14T13:14:06 Vulkan: account for yuvCscStandard in switch validation The previous condition only accounted for ints, but needs to account for yuvCscStandard in order to support the new emulated yuv<->rgb builtins. Bug: b/223456677 Change-Id: I25e0c88b9c8eb5f8caf3e7640fe391a9b9c10bf1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3764431 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
Shahbaz Youssefi 5f7e0e50 2022-07-15T21:58:11 Translator: Remove early fragment tests transformation We no longer add early_fragment_tests as an optimization. Bug: angleproject:7347 Change-Id: Ic12d8491a4d24d546b6b19257cd63c71074ba3a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3769546 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi 3baa867c 2022-07-14T23:08:42 Vulkan: Fix image arguments passed to functions in GLSL It's impossible to provide the format qualifier to an image function parameter in GLSL, because `layout()` is not acceptable there. SPIR-V doesn't accept formatless image parameters without the StorageImageReadWithoutFormat and StorageImageWriteWithoutFormat capabilities, which are not universally available. Instead, this change monomorphizes functions with image parameters. Note that this was already previously done for R32F images for emulation purposes. Bug: angleproject:7484 Change-Id: Id287c4a93b32deb3fd8be982c32fa58fd2c848d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3763074 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton 15cc0013 2022-07-14T23:32:05 Add a GL_ANGLE_shader_pixel_local_storage extension Plumbs through "GL_ANGLE_shader_pixel_local_storage" and "GL_ANGLE_shader_pixel_local_storage_coherent" extension strings advertised by ANGLE and stubs out an initial spec document. This change doesn't add any new procedures or shader constructs, but it does allow the PLS tests to start checking for the real extension strings and requiring the GL_ANGLE_shader_pixel_local_storage extension. Bug: angleproject:7279 Change-Id: I36877fe4117185a2121f803288123cd69a447cf3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3739590 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Kyle Piddington eaf77ef3 2022-07-07T10:25:16 Metal fails to compile uniform blocks in ternary statements When creating an intermediate type for type expansion, Metal was copying over information about which uniform block a type appeared in. This led to a later pass, RewriteNamelessUniformBlocks, failing. This patch helps address a compile failure in the Godot engine. Bug: angleproject:7487 Change-Id: If0724f93017e41260ff11e59a5c28e8578563891 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3751106 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kyle Piddington <kpiddington@apple.com> Reviewed-by: Gregg Tavares <gman@chromium.org>
Shahbaz Youssefi 4f7d2d02 2022-07-12T11:55:19 Vulkan: SPIR-V Gen: Apply Flat to gl_ViewID_OVR in FS Follow up to https://chromium-review.googlesource.com/c/angle/angle/+/3756612 Bug: angleproject:7491 Change-Id: I0a5fdfba6474cf22b3cfcd56f02d7418f4928981 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3758703 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c525ccf7 2022-07-11T17:07:09 Vulkan: SPIR-V Gen: Apply Flat to int inputs in FS Not directly specified by the spec itself, but required according to this more generic statement: > Fragment shader inputs that are, or contain, integral types must be > qualified with the interpolation qualifier flat. This was previously fixed for gl_Layer in https://chromium-review.googlesource.com/c/angle/angle/+/3652746, but applies to gl_SampleID and gl_PrimitiveID as well. Bug: angleproject:7491 Change-Id: Ideae78ba57fe927ad0aa39460a5940dd5313ce9d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3756612 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 9070e279 2022-06-30T09:35:59 Vulkan: Handle platforms that have imprecise float division issues Even when the dividend and divisor have the same value some platforms do not return 1.0f. We need to emit sepcial division code on such platforms. Bug: angleproject:3586 Tests: KHR-GLES31.core.blend_equation_advanced.blend*HSL* Change-Id: Ibb81f57c959ae2c8edb6d361bf6241c019dfb988 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3738439 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 1154cc46 2022-07-04T14:45:25 Vulkan: Fix round-after-dither logic | was used instead of &, effectively enabling this on all platforms. Bug: angleproject:6953 Change-Id: I73846368c689d70ad9679e0caa47b7004177d678 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3744361 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: mohan maiya <m.maiya@samsung.com> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Geoff Lang 785353fd 2022-05-24T12:40:16 Support Desktop OpenGL context creation in end2end tests Validation of Desktop GL versions and profile masks is unimplemented. Bug: angleproject:7360 Change-Id: Ifae94215b6aada895c2b02318a1d05c9515e9b96 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3664916 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Eddie Hatfield 7eb96f2a 2022-06-21T18:46:18 Refactor builtin symbol generation for C++17 Bug: angleproject:6747 Change-Id: I81a87b68298abc32fee7bb843c27a4a1b6009c87 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3719000 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Eddie Hatfield <eddiehatfield@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi 79185677 2022-06-22T16:22:35 Translator: Fix validation of struct with same-name struct field In the following: ``` struct S { S s; }; ``` The `S` in the field refers to a previous declaration of `S` in an outer scope. The validation code mistakenly attempted to ensure it refers to the same `S` being declared. Bug: chromium:1337628 Change-Id: I86184be63bc59e608fe5b24369cd4c40b3bb3b31 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3716965 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Eddie Hatfield 91976352 2022-06-21T15:41:02 Use C++17 attributes instead of custom macros Bug: angleproject:6747 Change-Id: Iad6c7cd8a18d028e01da49b647c5d01af11e0522 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3718999 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Frédéric Wang 97e0157a 2022-06-21T17:00:07 Fix compilation errors with deprecated sprintf function This commit modifies sprintf calls to fix the following compilation errors using XCode 14.0 beta on MacOS: > 'sprintf' is deprecated: This function is provided for > compatibility reasons only. Due to security concerns inherent > in the design of sprintf(3), it is highly recommended that you > use snprintf(3) instead. Bug: angleproject:7448 Change-Id: I2d72e09a1289a3746f457508c3dae9e922fe6b98 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3721635 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Amirali Abdolrashidi 3b988fef 2022-06-01T10:54:03 Vulkan: Remove enableLineRasterEmulation * Removed the Bresenham line raster emulation specialization constant, along with related variables and functions. Bug: angleproject:7366 Change-Id: If17c8ce9b459ad801bae8e887e5674bd9a3ff2bf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3680860 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi ce3c0fe9 2022-06-06T12:09:45 Vulkan: Make depth-correction uniform controlled This change makes sure SPIR-V transformations are not required for depth correction, having the number of potential pipelines. Bug: angleproject:5881 Change-Id: If3f66b34bdd1127ae588cbc822ea7cf01fa8621f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3691801 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Stephen White ccf53e3d 2022-06-03T10:40:17 Translator/HLSL: fix image load/store handling. Don't output the image load/store string unless we're outputting HLSL 4.1 (D3D11). Also do some preventative initialization. Bug: chromium:1327872 Change-Id: Ic757fd6c0c92637f565dc39469ee60dfae145353 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3687335 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Kyle Piddington 2f6dcf77 2022-06-01T14:51:47 Metal shaders fail to compile with "error: unknown type name 'uint' Replace 'uint' with uint32_t in emitted MSL. Some legacy configurations are showing compile errors when using this type. Bug: angleproject:7384 Change-Id: I7f262d417eaf46eed71da24e8b2c110b11677ab6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3684952 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Kyle Piddington <kpiddington@apple.com> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Shahbaz Youssefi 23f213d1 2022-05-26T23:43:44 Vulkan: Make drawable size uniform As a specialization constant, it's impossible to predict the value the drawable size may take, which in turn makes it impossible to warm up the Vulkan pipeline cache at link time. Bug: angleproject:7366 Change-Id: Ia3d1860a4fcb8e3078fdcb8d02a2e0cd173ea028 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3671976 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 73019ede 2022-05-27T14:15:51 Vulkan: SPIR-V Gen: No RelaxedPrecision on bitCount() and findLSB() Similarly to findMSB(), RelaxedPrecision shouldn't be applied to these instructions. They return lowp, but RelaxedPrecision affects the parameters as well. Bug: b/234143723 Change-Id: Iab7c1c0497bbc832569ced7456eaefbf52d796d6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3672847 Reviewed-by: Chia-I Wu <olv@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 2df17a12 2022-05-25T16:18:37 Vulkan: Pack driver uniforms Previously 5 vec4s were used for driver uniforms + 2 vec4s if specialization constants couldn't be supported. The driver uniforms are rearranged and packed such that only 2 vec4s are normally used, which include fallback for specialization constants as well. In the future, most of the specialization constants may turn into uniforms, and this change prepares for that. Additional uniforms are used (3 vec4s) only if common extensions are missing; transform feedback and bresenham lines. This change makes it more practical for driver uniforms to be turned into push constants. Additionally, these uniforms could potentially be loaded and cached at the beginning of the shader for more efficient memory access. On Pixel6, with this change, the traces show no difference in wall time. On most traces, CPU time shows up to ~7% improvement. Bug: angleproject:7366 Change-Id: I0f47f863955af06a19c69d1f1d7c45b97d95476e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3668151 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 98c2e169 2022-05-20T16:17:49 Vulkan: Reduce pre-rotation spec const to bool The specialization constant now only dictates whether x and y should be swapped. The complete 8 possible states of rotation and y-flip are achieved by using this swap in combination with a driver uniform for x and y flip. Swapping is still a specialization constant to avoid degrading performance of dFdx/dFdy which otherwise would need both to be evaluated instead of one. On platforms which don't support pre-rotation, the specialization constant will never change and driver uniforms entirely govern y-flip. On platforms that do support pre-rotation, only two variations of the pipeline are needed. Bug: angleproject:7366 Change-Id: I73f84e89fa9349d2098fa5b21573aee57d93a30c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3663151 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Lingfeng Yang <lfy@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Amirali Abdolrashidi fea19567 2022-05-17T17:44:06 Vulkan: Remove removeEarlyFragmentTestsOpt flag * Removed removeEarlyFragmentTestsOptimization and the related SPIRV transformation and variables. * Removed mUsesEarlyFragmentTestsOptimization. * Removed SH_EARLY_FRAGMENT_TESTS_OPTIMIZATION. * Merged updateUsesEarlyFragmentTestsOptimization() into updateFragmentInoutRange(). Bug: angleproject:7347 Change-Id: I7299bd4e8ab5363e5cf06eb48419d4f469106e12 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3648217 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Faye Zhang c608df69 2022-05-23T17:19:02 Code Cleanup In Debug.h, we unconditionally set UNREACHABLE_IS_NORETURN to 0. Since UNREACHABLE_IS_NORETURN is only used in #if directives and it is always false, we can remove all uses of UNREACHABLE_IS_NORETURN. Bug: angleproject:6134 Change-Id: I3aa88d802099d70990eae697d4f056a3f650b48d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3661376 Commit-Queue: Faye Zhang <ffz@google.com> Auto-Submit: Faye Zhang <ffz@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Faye Zhang <ffz@google.com>
Stephen White 615b2c68 2022-05-24T12:29:40 D3D: implement whole-struct assignment in SSBOs. Bug: angleproject:7395 Change-Id: I18159c5fe60585b319d3f3f282fc25fb742746b5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3664917 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Stephen White 88f582f6 2022-05-19T09:48:21 D3D: fix whole-array assignment to SSBOs. SSBOs in HLSL are implemented as RWByteAddressBuffer, which can only Load() or Store() up to 16 bytes at a time, so value-assignment of arrays doesn't work. The fix is to implement a traversal which unfolds such assignments into an element-by-element for-loop. Bug: angleproject:7334 Change-Id: I840c8ff7b62b67dc8935d4c09589d955798d96ee Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3656070 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Brian Osman e71a3e5f 2022-05-05T10:08:18 Insert Metal polyfill for Matrix /= Scalar when needed Bug: skia:13290 Change-Id: Id82398581b84f1990fef632006604d12341e29be Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3630018 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Stephen White d3eb61d4 2022-05-18T11:00:34 D3D11: fix SSBO load in a return statement. Add a special case to load from an SSBO in a return statement. Add tests that exercise reading from an SSBO in a function, in both a fragment shader and a compute shader. Bug: angleproject:7226 Change-Id: I08e6c695bf080eb23661ef4df047f0f1a787b06e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3645442 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Hailin Zhang b7474d0a 2022-04-28T14:44:54 D3D11: Add GL_EXT_texture_buffer support tested: deqp-gles31.exe --deqp-gl-context-type=egl --deqp-case=dEQP-GLES31.functional.texture.texture_buffer.* passed Bug: b/206367167 Change-Id: I31a6f84bd701a737735a6bac2f4eef780c24a979 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3639722 Commit-Queue: Hailin Zhang <hailinzhang@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 87ea0c7d 2022-05-17T22:33:57 Vulkan: SPIR-V Gen: Apply Flat to gl_Layer in FS Not directly specified by the spec on gl_Layer itself, but required according to this more generic statement: > Fragment shader inputs that are, or contain, integral types must be > qualified with the interpolation qualifier flat. Bug: angleproject:7332 Change-Id: Ieaa389e9b1318d3f13147cba7949cff6491c4b61 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3652746 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Brandon Schade <b.schade@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Stephen White b4ec8eac 2022-04-12T12:16:40 D3D11: implement image load/store for non-compute shaders. Output image metadata and image2d replacement string in other shader types. Implement the actual HLSL transform for fragment shaders. Re-enable problematic test. Bug: angleproject:7121 Change-Id: I49b815695757e822e6fdfe599e07ceb5b1d6a75c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3550544 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 14ca09bc 2022-05-17T15:40:22 Metal: Remove the long type from program preludes The long types were not added until Metal 2.2 but they are not needed to represent any ESSL types so simply remove them. Bug: chromium:1323265 Change-Id: I10e96c72067ef8c002395010e0dbc6130b8b4b78 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3652737 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 62fe36d3 2022-05-04T22:46:52 Vulkan: Emulate YUV built-ins In this change, the rgb_2_yuv and yuv_2_rgb built-ins are emulated with normal functions that perform matrix multiplication based on the given conversion function. Bug: angleproject:6818 Change-Id: I67adb029109aaf6a674b1ee75105c1b352325eb2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3630599 Reviewed-by: Shahbaz Youssefi <syoussefi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gregg Tavares 4a7dd942 2022-05-12T12:34:29 Metal: Fix dangling pointer warning in IntermRebuild.cpp I don't think anything was wrong with the original code. This code is doing exactly the same thing but maybe won't trigger the warning? I have another version using std::vector if this fix is unacceptable. Bug: angleproject:7288 Change-Id: I122b8fc6600f6860ba96339c93a4ab9791ec789a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3645992 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Geoff Lang c8c4109c 2022-05-02T11:29:24 HLSL: Disambiguate functions that have int/uint parameters. If a bit-shift expression is passed as a function parameter in HLSL, the compiler cannot tell if it is intended as a uint or int when doing overload resolution. Explicitly disambiguate functions that have int and uint parameters when generating the HLSL. Bug: chromium:1319332 Change-Id: I11c9518e060e9940550bbb04dd7cb953d99c2bb8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3621316 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Lingfeng Yang <lfy@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 5113ae8e 2022-04-29T22:42:59 Vulkan: Explicitly enable per-sample shading if `sample` used The Vulkan spec is not explicit about the `Sample` decoration implicitly enabling per-sample shading. While this is being corrected in the spec, the ARM Vulkan driver does not have this implicit behavior. A workaround is added such that the usage of the `sample` qualifier is reported, and used to explicitly enable per-sample shading through the API. Bug: angleproject:6876 Change-Id: Idb8345aacdcfa45cb37fefcd30aa5405168d21e3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3615738 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Brian Osman 9200ba53 2022-04-26T12:05:07 Reland "Make SPIRV optional for Metal backend" Updated default conditions to match old behavior. This is a reland of commit 29287e1fc7ad3dff0619736a89e64b3598af8659 Original change's description: > Make SPIRV optional for Metal backend > > This allows clients (ie Skia) to build ANGLE without needing > all of the additional Vulkan dependencies. Developer builds > will continue to include both the direct and SPIRV paths, for > debugging purposes. > > Bug: angleproject:7155 > Change-Id: I1c38ee19e747df8b25fd2f8e8efa3b420a4d7766 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3605764 > Commit-Queue: Kenneth Russell <kbr@chromium.org> > Reviewed-by: Kenneth Russell <kbr@chromium.org> > Auto-Submit: Brian Osman <brianosman@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:7155 Change-Id: I439160f2e1f05a3dbe22df82336246a73a0a7d0b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3615012 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Cody Northrop 437053a1 2022-04-28T09:05:43 Revert "Make SPIRV optional for Metal backend" This reverts commit 29287e1fc7ad3dff0619736a89e64b3598af8659. Reason for revert: Possible root cause of Mac failures http://crbug.com/1320588 Original change's description: > Make SPIRV optional for Metal backend > > This allows clients (ie Skia) to build ANGLE without needing > all of the additional Vulkan dependencies. Developer builds > will continue to include both the direct and SPIRV paths, for > debugging purposes. > > Bug: angleproject:7155 > Change-Id: I1c38ee19e747df8b25fd2f8e8efa3b420a4d7766 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3605764 > Commit-Queue: Kenneth Russell <kbr@chromium.org> > Reviewed-by: Kenneth Russell <kbr@chromium.org> > Auto-Submit: Brian Osman <brianosman@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: chromium:1320588 Change-Id: Id160118146dad1b8f1af40c60ddefd717516cd1d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3614527 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Kenneth Russell <kbr@chromium.org> Auto-Submit: Cody Northrop <cnorthrop@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Brian Osman 29287e1f 2022-04-26T12:05:07 Make SPIRV optional for Metal backend This allows clients (ie Skia) to build ANGLE without needing all of the additional Vulkan dependencies. Developer builds will continue to include both the direct and SPIRV paths, for debugging purposes. Bug: angleproject:7155 Change-Id: I1c38ee19e747df8b25fd2f8e8efa3b420a4d7766 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3605764 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 3b65b803 2022-04-27T11:04:22 Vulkan: Work around Qualcomm imprecision with dithering On qualcomm, sometimes the output is ceil()ed instead of round()ed. With ditering emulation affecting values, some dEQP tests fail due to the excessive change in value when dithering bumps the value slightly over to the next quantum. In this change, a workaround is added to round() the value before outputting it. Bug: angleproject:6953 Change-Id: Iae7df5ca20055b4db3185c6153f3c0bf4ba07f68 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3611064 Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Lubosz Sarnecki 039660a0 2022-04-14T13:32:33 Translator: Drop const from opaque parameter types `const` is ineffective on opaque types like sampler2D. That qualifier is now dropped as it was tripping SPIR-V gen up. New validation is added to make sure such parameters are not reintroduced. Test credit of Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Test: angle_end2end_tests --gtest_filter="GLSLTest.ConstSamplerParameter*/*_Vulkan" Bug: angleproject:7201 Bug: angleproject:7205 Change-Id: I310a47a8eb162ddafb2ab44682520f546f8a5512 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3587345 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c5271e8e 2022-04-04T23:28:35 Vulkan: Emulate GL_KHR_blend_equation_advanced Based on a change by Brandon Schade <b.schade@samsung.com> In the translator, when advanced blend is enabled, an input attachment is added. Based on the listed advanced blend equations, emulation code is added that performs those equations' functions. The blend equation itself is passed through a driver uniform. Note that the advanced blend extension only allows a single output to use advanced blend, and that should be at location 0. In the Vulkan backend, when advanced blend is used, the driver uniform to select the equation is updated and normal blending is disabled. Bug: angleproject:3586 Change-Id: Icc42e8be238d34fca149087eb9cfe616a7643a6b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3575738 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Stephen White 6803a2d0 2022-04-01T16:52:49 D3D11: implement SSBOs in pixel and vertex shaders. Since the 'u' register space for UAVs in pixel shaders is shared with render targets, and the number of render targets may vary depending on GL state, this required deferring register allocation until draw-time output in DynamicHLSL. Since non-compute shaders aren't able to immediately output the SSBO declaration, initial register allocation was broken out from ResourcesHLSL::shaderStorageBlocksHeader() into ResourcesHLSL::allocateShaderStorageBlockRegisters() with the former only called for compute shaders. These initial allocations are offset by the number of RTs at draw time. Since Raw UAVs may now be created at draw time for non-compute shaders, call markRawBufferUsage() from the Renderer11::draw*() entry points as it is from dispatchCompute*(). Bug: angleproject:7156 Change-Id: I6ab65af1ff36df0313e3c1f8f79661b1547ab9a2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3565562 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Shahbaz Youssefi b169f6f9 2022-04-01T14:41:12 Vulkan: Fix no location decoration vs framebuffer fetch The input attachment index is identical to the location qualifier. If there's only one output, GLSL is allowed to not specify the location qualifier, in which case it would implicitly be at location 0. Bug: angleproject:6947 Change-Id: Ib8e31ab524f6f4d4fe1d3e49386a374724da06a1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3566221 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Lingfeng Yang <lfy@google.com>
Cody Northrop e10803f7 2022-01-20T09:03:55 Compiler: Allow deferred array sizing in geometry shaders Based on work by Brandon Schade <b.schade@samsung.com>. When a shader sets an array input size in a GS after declaring input variables, compilation would fail. Example shader - in vec3 normal[]; in vec3 view_dir[]; in float patch_dist[]; in float e_patch_wire_scale[]; ... layout(triangles) in; layout(triangle_strip, max_vertices=3) out; void main() { ... Update translator to handle such cases. Also add a new check that there are no remaining unsized arrays when compilation has completed. Test: GeometryShaderTest.DeferredSetOfArrayInputSize Bug: angleproject:3571 Bug: angleproject:7125 Change-Id: I4853832c27f9551284bcca92b98cbf5f3a63aaf5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3564259 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi cd3c74af 2022-03-30T11:48:41 SPIR-V Gen: Fix aliasing out parameters In ANGLE, when an unindexed lvalue was passed as an out parameter to a function, SPIR-V was generated such that the lvalue is passed in directly. A Skia test revealed a difference in SPIR-V and GLSL semantics where aliasing out parameters are expected to work on local copies until the end of the function. Bug: b/226904235 Change-Id: I476af01eb7d065272825967111cd208faf88c275 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3561278 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Zequan Wu 6a76aa3f 2022-03-28T09:40:36 Fix -Wunused-but-set-variable Bug: chromium:1309955 Change-Id: Ib5f7c73dd9a9f4ec27e43b0cb818864b2aaf48d1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3554363 Auto-Submit: Zequan Wu <zequanwu@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 7a85d114 2022-03-25T15:01:17 Use [[nodiscard]] on RAII classes Scoped* classes provide an RAII way of adding cleanup/restore state/etc in a robust way. Unfortunatley, it's very easy to mistakenly leave the variable name, leading to the destructor being called immediately instead of at the end of the scope: { ScopedX(parameters); // instead of ScopedX x(parameters); // Code here is run after destructor } The [[nodiscard]] attribute, if specified on the ScopedX class would lead to a warning (turned to error with -Werror). This change does that for classes named *Scoped* in ANGLE. Bug: chromium:1103817 Change-Id: I65c9922c9b4eba1f9c033e093fe8fe534648ab62 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3552092 Reviewed-by: Lingfeng Yang <lfy@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Hans Wennborg 0c23c72b 2022-03-25T17:19:37 Suppress -Wunused-but-set-variable in Bison-generated code Recent Clang versions have enhanced the warning, causing it to fire in preprocessor_tab_autogen.cpp and glslang_tab_autogen.cpp. Since those are generated by Bison, we can't fix the code and instead should suppress the warning there. Bug: chromium:1309955 Change-Id: I31aa83571162310bef47a7ce84841446713a2d04 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3550200 Commit-Queue: Hans Wennborg <hans@chromium.org> Auto-Submit: Hans Wennborg <hans@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Alexey Knyazev 18c36f8a 2022-03-19T19:22:08 Metal: Fix transform feedback with base instance Added TransformFeedbackTest.BaseInstance test case. Bug: angleproject:6963 Change-Id: Ie7b2a5dd2be456172505f07ea60ca291075bf07e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3536660 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Kyle Piddington <kpiddington@apple.com> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi 15fe0474 2022-03-21T00:06:38 Translator: Work around tool paranoia w.r.t repeated std::move An unknown diagnostic tool has flagged a usage in PruneNoOps, where an empty vector is std::move'd on multiple iterations of a loop, as error-prone. That was intended behavior. To silence the tool however, the empty vector declaration is moved inside the loop. Bug: chromium:1304953 Change-Id: Ie4b0c78e3f4a845db2b3b3a18d4ca095f0ba746b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3539443 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi 40afbe4b 2022-03-20T23:39:57 Translator: Fix SimplifyLoopConditions producing dead code This causes the tree to fail validation. Dead code could be generated if the loop body ended in a branch. In such a case, no additional instructions are added to the transformed loop body after the original body. Bug: chromium:1300782 Change-Id: I4ec46c170ab5a45fa9b9b73d4e2b62c9c4fa24a3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3539442 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 7c616871 2022-02-01T15:12:53 Metal: Implement ANGLE_base_vertex_base_instance Includes command buffer and MSL translator updates. The DrawElementsInstancedBaseVertexBaseInstance tests from DrawBaseVertexVariantsTest suite fail for dynamic draw and stream draw buffer usages. Bug: angleproject:6963 Change-Id: I6caa144860356d5fc85948b72458bec282ea3a3b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3429819 Reviewed-by: Kyle Piddington <kpiddington@apple.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Shahbaz Youssefi 1e773db9 2022-02-22T10:51:15 Vulkan: Shader support for KHR_blend_equation_advanced Translator can accept the layout qualifiers for the advanced blend equation. No emulation code is currently generated, and ANGLE will initially rely on the corresponding Vulkan extension. Based on change by Brandon Schade <b.schade@samsung.com> Bug: angleproject:3586 Test: angle_unittests --gtest_filter=*KHRBlendEquationAdvanced* Change-Id: I3b728c5f144386d7030bbbb301ddb07daa1492b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3481309 Reviewed-by: Brandon Schade <b.schade@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi e47a67e4 2022-02-22T11:40:23 Update Python scripts to run with Python 3 * Updated the scripts used in run_code_generation.py so they could be run with Python 3 with no errors. Bug: angleproject:5707 Change-Id: Iad7ff61a34ce53b6d54821cdd53ee846dc4afc3c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3482156 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 8dc9e83e 2022-02-16T21:48:53 Translator: Fix RunAtTheEndOfShader w.r.t discard RunAtTheEndOfShader wrapped main() if it ended in discard. However, it didn't account for the fact that the discard instruction could be wrapped in a block. This change makes RunAtTheEndOfShader more conservative w.r.t discard and has it wrap main() on any encounter of discard. The change additionally adds AST validation to ensure transformations don't generate dead code after branches. Test credit to Cody Northrop. Test: GLSLTest_ES3.ConstantConditionGuardingDiscard Test: GLSLTest_ES3.NestedUnconditionalDiscards Bug: angleproject:7033 Change-Id: Ie9d5210a5cfbb13449720a8a3f44666df9443d98 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3471014 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Kyle Piddington eeddb050 2022-01-27T11:36:10 Metal: Incorrect parenthization for assignment expressions Fix for Webgl tests conformance/ogles/GL/build/build_017_to_024.html Create intermediate values for assign-equals operations, as they cause issues on expansion later. Bug: angleproject:6489 Change-Id: I7fea162bd1f59c7c765868af739d6ddfc1c1747f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3421527 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Kyle Piddington <kpiddington@apple.com>
Brandon Schade 06edae72 2022-01-11T11:13:20 Vulkan: Allow duplicated block name in different shader interface In OpenGL ES 3.2 Shading Language specification(4.3.9), A block name is allowed to have different definitions in different shader interfaces within the same shader. Bug: angleproject:5557 Test: KHR-GLES32.core.tessellation_shader.single.max_patch_vertices Change-Id: I49f149cfd8f6f063fc5045aa154cc401d3e38cfb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3429684 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Brandon Schade <b.schade@samsung.com>
Alexey Knyazev 6d30de10 2022-02-05T02:25:36 Metal: Fix ANGLEUniformBlock alignment To pass Metal validation, the length of ANGLEUniformBlock structure must be aligned to 16 bytes. Bug: angleproject:5505 Change-Id: I1e2becaac48739966afb44e087fc4a70f7b21d02 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3440067 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>