scripts/code_generation_hashes/Metal_default_shaders.json


Log

Author Commit Date CI Message
Shashank Sharma c6b3440b 2025-06-06T23:34:33 Vulkan: Add G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 support. Add support for YCBCR_P010 format. Bug: b/408996471 Change-Id: I899533b604e5b2fd0ad1fb1e940dd1f119179794 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6628658 Reviewed-by: Solti Ho <solti@google.com> Auto-Submit: Shashank Sharma <shawshanks@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Xin Yuan cdcf6a63 2025-04-22T10:19:33 Add R10X6G10X6B10X6A10X6 support on angle Bug: angleproject:409355677 Change-Id: I8115ca73a038360f673552532e9d9b87ff846867 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6438114 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Le Hoang Quyen 0f9feb49 2025-03-15T23:51:04 Metal: Use render passes for B2T PBO copies. This would make it possible to avoid setting ShaderWrite usage to all textures in future. Bug: chromium:392521084 Change-Id: I25145f3578589c71ee469df08162d3a3f17c8cbe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6356129 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
Cody Northrop db48967f 2025-03-05T09:07:10 Reland "Add GL_BGRA_EXT as a sized renderable format" This reverts commit 4bfb9da6f98b3e28905cc759a77bff750dfe3ff7. Reason for revert: More mapping fixes for GL backend Original change's description: > Revert "Reland "Add GL_BGRA_EXT as a sized renderable format"" > > This reverts commit 8f2fbbd1a0d16471596afad57c88f950a1ee3032. > > Reason for revert: http://anglebug.com/399913714 > > Original change's description: > > Reland "Add GL_BGRA_EXT as a sized renderable format" > > > > This reverts commit 22dfe435daa7c680c07bb8d4f1d98ab765e60ad0. > > > > Reason for revert: Fixed mapping back to BGRA_EXT for GL backend > > > > Original change's description: > > > Revert "Add GL_BGRA_EXT as a sized renderable format" > > > > > > This reverts commit 80093a7d8f850c3ab551ddb4972c2f1f27511433. > > > > > > Reason for revert: suspect for blocking rolling ANGLE into Chroimum > > > https://chromium-review.googlesource.com/c/chromium/src/+/6283973 > > > https://ci.chromium.org/ui/p/chromium/builders/try/chromeos-amd64-generic-rel-gtest/372754/overview > > > > > > Original change's description: > > > > Add GL_BGRA_EXT as a sized renderable format > > > > > > > > dEQP tests were updated to cover GL_BGRA_EXT as a sized renderable > > > > format. It was apparently always supposed to be, based on the > > > > wording of the spec. > > > > > > > > This CL adds that support and updates expectations, along with a few > > > > extra tests. > > > > > > > > Includes contributions from Robic.Sun@arm.com. > > > > > > > > Test: angle_end2end_tests, angle_deqp_*_tests > > > > Bug: b/42267264 > > > > Bug: angleproject:394384906 > > > > Change-Id: Ia10bcd61f66c5d99a3d27a2cfd6008c991ddcaa7 > > > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6235444 > > > > Reviewed-by: Geoff Lang <geofflang@chromium.org> > > > > Commit-Queue: Cody Northrop <cnorthrop@google.com> > > > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > > > > > Bug: b/42267264 > > > Bug: angleproject:394384906 > > > Change-Id: I64572361cfed33b4ea17eabf278f580471d045c2 > > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6285628 > > > Auto-Submit: Yuly Novikov <ynovikov@chromium.org> > > > Commit-Queue: Yuly Novikov <ynovikov@chromium.org> > > > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > > > Bug: b/42267264 > > Bug: angleproject:394384906 > > Change-Id: I1bd9df904d93fd54286cbfce53fe89db89e842b9 > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6310699 > > Commit-Queue: Cody Northrop <cnorthrop@google.com> > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > Reviewed-by: Geoff Lang <geofflang@chromium.org> > > Bug: b/42267264 > Bug: angleproject:394384906 > Bug: angleproject:399913714 > Change-Id: I9f79f39a6d9cba3b23c261005bc3e012d70cd1cf > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6312977 > Auto-Submit: Cody Northrop <cnorthrop@google.com> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bug: b/42267264 Bug: angleproject:394384906 Bug: angleproject:399913714 Change-Id: Ifc98fcbb0883dc4a55ad358825e9c1935fa26eaa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6330036 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop 4bfb9da6 2025-02-28T12:49:28 Revert "Reland "Add GL_BGRA_EXT as a sized renderable format"" This reverts commit 8f2fbbd1a0d16471596afad57c88f950a1ee3032. Reason for revert: http://anglebug.com/399913714 Original change's description: > Reland "Add GL_BGRA_EXT as a sized renderable format" > > This reverts commit 22dfe435daa7c680c07bb8d4f1d98ab765e60ad0. > > Reason for revert: Fixed mapping back to BGRA_EXT for GL backend > > Original change's description: > > Revert "Add GL_BGRA_EXT as a sized renderable format" > > > > This reverts commit 80093a7d8f850c3ab551ddb4972c2f1f27511433. > > > > Reason for revert: suspect for blocking rolling ANGLE into Chroimum > > https://chromium-review.googlesource.com/c/chromium/src/+/6283973 > > https://ci.chromium.org/ui/p/chromium/builders/try/chromeos-amd64-generic-rel-gtest/372754/overview > > > > Original change's description: > > > Add GL_BGRA_EXT as a sized renderable format > > > > > > dEQP tests were updated to cover GL_BGRA_EXT as a sized renderable > > > format. It was apparently always supposed to be, based on the > > > wording of the spec. > > > > > > This CL adds that support and updates expectations, along with a few > > > extra tests. > > > > > > Includes contributions from Robic.Sun@arm.com. > > > > > > Test: angle_end2end_tests, angle_deqp_*_tests > > > Bug: b/42267264 > > > Bug: angleproject:394384906 > > > Change-Id: Ia10bcd61f66c5d99a3d27a2cfd6008c991ddcaa7 > > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6235444 > > > Reviewed-by: Geoff Lang <geofflang@chromium.org> > > > Commit-Queue: Cody Northrop <cnorthrop@google.com> > > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > > > Bug: b/42267264 > > Bug: angleproject:394384906 > > Change-Id: I64572361cfed33b4ea17eabf278f580471d045c2 > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6285628 > > Auto-Submit: Yuly Novikov <ynovikov@chromium.org> > > Commit-Queue: Yuly Novikov <ynovikov@chromium.org> > > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > Bug: b/42267264 > Bug: angleproject:394384906 > Change-Id: I1bd9df904d93fd54286cbfce53fe89db89e842b9 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6310699 > Commit-Queue: Cody Northrop <cnorthrop@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: b/42267264 Bug: angleproject:394384906 Bug: angleproject:399913714 Change-Id: I9f79f39a6d9cba3b23c261005bc3e012d70cd1cf No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6312977 Auto-Submit: Cody Northrop <cnorthrop@google.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cody Northrop 8f2fbbd1 2025-02-27T13:33:06 Reland "Add GL_BGRA_EXT as a sized renderable format" This reverts commit 22dfe435daa7c680c07bb8d4f1d98ab765e60ad0. Reason for revert: Fixed mapping back to BGRA_EXT for GL backend Original change's description: > Revert "Add GL_BGRA_EXT as a sized renderable format" > > This reverts commit 80093a7d8f850c3ab551ddb4972c2f1f27511433. > > Reason for revert: suspect for blocking rolling ANGLE into Chroimum > https://chromium-review.googlesource.com/c/chromium/src/+/6283973 > https://ci.chromium.org/ui/p/chromium/builders/try/chromeos-amd64-generic-rel-gtest/372754/overview > > Original change's description: > > Add GL_BGRA_EXT as a sized renderable format > > > > dEQP tests were updated to cover GL_BGRA_EXT as a sized renderable > > format. It was apparently always supposed to be, based on the > > wording of the spec. > > > > This CL adds that support and updates expectations, along with a few > > extra tests. > > > > Includes contributions from Robic.Sun@arm.com. > > > > Test: angle_end2end_tests, angle_deqp_*_tests > > Bug: b/42267264 > > Bug: angleproject:394384906 > > Change-Id: Ia10bcd61f66c5d99a3d27a2cfd6008c991ddcaa7 > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6235444 > > Reviewed-by: Geoff Lang <geofflang@chromium.org> > > Commit-Queue: Cody Northrop <cnorthrop@google.com> > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > Bug: b/42267264 > Bug: angleproject:394384906 > Change-Id: I64572361cfed33b4ea17eabf278f580471d045c2 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6285628 > Auto-Submit: Yuly Novikov <ynovikov@chromium.org> > Commit-Queue: Yuly Novikov <ynovikov@chromium.org> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: b/42267264 Bug: angleproject:394384906 Change-Id: I1bd9df904d93fd54286cbfce53fe89db89e842b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6310699 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yuly Novikov 22dfe435 2025-02-20T06:46:07 Revert "Add GL_BGRA_EXT as a sized renderable format" This reverts commit 80093a7d8f850c3ab551ddb4972c2f1f27511433. Reason for revert: suspect for blocking rolling ANGLE into Chroimum https://chromium-review.googlesource.com/c/chromium/src/+/6283973 https://ci.chromium.org/ui/p/chromium/builders/try/chromeos-amd64-generic-rel-gtest/372754/overview Original change's description: > Add GL_BGRA_EXT as a sized renderable format > > dEQP tests were updated to cover GL_BGRA_EXT as a sized renderable > format. It was apparently always supposed to be, based on the > wording of the spec. > > This CL adds that support and updates expectations, along with a few > extra tests. > > Includes contributions from Robic.Sun@arm.com. > > Test: angle_end2end_tests, angle_deqp_*_tests > Bug: b/42267264 > Bug: angleproject:394384906 > Change-Id: Ia10bcd61f66c5d99a3d27a2cfd6008c991ddcaa7 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6235444 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Cody Northrop <cnorthrop@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: b/42267264 Bug: angleproject:394384906 Change-Id: I64572361cfed33b4ea17eabf278f580471d045c2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6285628 Auto-Submit: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop 80093a7d 2025-02-03T08:50:21 Add GL_BGRA_EXT as a sized renderable format dEQP tests were updated to cover GL_BGRA_EXT as a sized renderable format. It was apparently always supposed to be, based on the wording of the spec. This CL adds that support and updates expectations, along with a few extra tests. Includes contributions from Robic.Sun@arm.com. Test: angle_end2end_tests, angle_deqp_*_tests Bug: b/42267264 Bug: angleproject:394384906 Change-Id: Ia10bcd61f66c5d99a3d27a2cfd6008c991ddcaa7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6235444 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 31ccf78b 2025-01-07T15:46:15 Inline GetVertexFormatID using lookup tables Before this change the switch produced >1KB of assembly due to all the branching. This reduces the .so size by ~3KB and avoids the function call into a seemingly cold page. No obvious perf improvement in my tests from just this change. Changing underlying enum type to minimize table sizes. Bug: b/383305597 Change-Id: I724aa093ab5edf7af016b5b04764437a345517d1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6153395 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev e6c8f06a 2024-11-29T00:00:00 Metal: Remove line markers from internal shaders Line markers generated by Clang preprocessor are platform-dependent and cause extra git noise. Metal shader compiler does not need them anyway. Fixed: angleproject:382564808 Change-Id: I792a523ac9269a097c7f52a4cd64a24ed6145567 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6074518 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Quyen Le <lehoangquyen@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Panfeng Hou a504b6a2 2024-11-25T15:59:05 Support GL_OES_required_internalformat Enable GL_OES_required_internalformat GLES extension. Bug: angleproject:364069034 Change-Id: Ia57548469abff189472aa20b13ca99179c45f2c0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6038448 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Panfeng Hou <panfeng.hou@arm.com>
Rafay Khurram 9db2e88b 2024-05-14T11:44:01 CL/Vulkan: Add support for required image formats * Included adding cases for CL_DEPTH, CL_DEPTH_STENCIL, CL_sRGBA, and CL_BGRA Bug: angleproject:42266936 Change-Id: Ie7bd3ee6c6413d8fa89357c81d19f4c807883f36 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5800265 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Rafay Khurram a21b7ad0 2024-04-24T02:11:42 CL/Vulkan: Add skeleton for CLSamplerVk * It is setup to be a wrapper for the SamplerHelper interface Bug: angleproject:42266936 Change-Id: Iac7e80c4d5262687d98a8188a60a24a9be190dc2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5801184 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
hoonee.cho 2ee914a4 2024-03-04T06:54:29 CL: Add cl_image_format map autogeneration * Added map JSON files containing CL image formats * Updated ANGLE format table generator to include CL foramts Tests-Passing: GN Build Signed-off-by: hoonee.cho <hoonee.cho@samsung.com> Bug: angleproject:42266936 Change-Id: I2967ea6d26f69223ffa3ca12d469c05a3844200f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5798054 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Rafay Khurram <r.khurram@samsung.com>
Alexey Knyazev 9968e98c 2024-07-16T00:00:00 Metal: Fix compute path for 16-bit PBO readbacks Added 16-bit normalized pixel formats to internal copy shaders. Fixed and simplified floatToNormalized usage for signed inputs. Bug: angleproject:352700368 Change-Id: Icbb79381991c6621004d53706b97662d33c25cd8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5717929 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Quyen Le <lehoangquyen@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Liza Burakova 3e997419 2024-06-25T18:41:03 Add format conversions for WebGPU formats. This CL adds a Format class, as well as a generator script to generate methods to map between WebGPU and ANGLE formats. Fallback mappings are listed but this CL only implements support for required webgpu formats. Bug: angleproject:344814096 Change-Id: I2588a57353eafc4e87f40df3bbe3f9375e5ed8c6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5598178 Reviewed-by: Matthew Denton <mpdenton@chromium.org> Commit-Queue: Liza Burakova <liza@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 05e9ec11 2023-11-23T00:00:00 Metal: Saturate floating-point depth textures on upload Metal does not clamp uploaded floating-point depth texture values to the normalized range. Used a compute shader to enforce the expected OpenGL ES semantics. Fixed the following tests on Intel and Apple GPUs: dEQP-GLES3.functional.texture.specification .teximage2d_depth.depth_component32f .teximage2d_depth.depth32f_stencil8 .teximage2d_depth_pbo.depth_component32f .teximage2d_depth_pbo.depth32f_stencil8 .teximage3d_depth.depth_component32f_2d_array .teximage3d_depth.depth32f_stencil8_2d_array .teximage3d_depth_pbo.depth_component32f_2d_array .teximage3d_depth_pbo.depth32f_stencil8_2d_array .texsubimage2d_depth.depth_component32f .texsubimage2d_depth.depth32f_stencil8 .texsubimage3d_depth.depth_component32f_2d_array .texsubimage3d_depth.depth32f_stencil8_2d_array Fixed: angleproject:8422 Fixed: angleproject:8426 Change-Id: I843024f098fef2fbca15e7b6124052681d05b6ad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5062710 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev c8f707f8 2023-11-16T00:00:00 Metal: Simplify MSL sRGB conversions * Used metal::powr instead of metal::pow because the arguments are non-negative. * Reduced nesting. Bug: angleproject:8366 Change-Id: Ibc50880060c12217b4ee8452c662d346a1cb273a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5040993 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Quyen Le <lehoangquyen@chromium.org>
Alexey Knyazev 4256d055 2023-11-09T00:00:00 Metal: Use a quad for blit with draw Adjusted blit emulation to use a two-triangle quad instead of an implicitly clipped triangle to avoid interpolation artifacts on Apple silicon. Reduced the BlitParams struct size from 48 to 32 bytes. Disabled perspective correction as it has no effect anyway. Fixed the following tests on Apple silicon: dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_src_x dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_src_y dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_dst_x dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_dst_y dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_src_dst_x dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_src_dst_y dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_y dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_dst_y Fixed: angleproject:8408 Change-Id: Iba8dd1c206ff859aa3e635d72adab45608496e7a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5018858 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Quyen Le <lehoangquyen@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 06819324 2023-10-12T00:00:00 Metal: Linearize PVRTC1 blocks for buffer uploads PVRTC1 blocks are stored in a reflected Morton order and need to be linearized for buffer uploads in Metal. Fixed: angleproject:8376 Change-Id: I59497aaf49eb57aa93e346d62d56c69535555fd9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4973955 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Geoff Lang db38707a 2023-10-19T18:08:51 Metal: Compile mtllib at build time. Reworks gen_mtl_internal_shaders.py to only generate the combined metal source file, mtl_internal_shaders_autogen.metal. metallibs are now compiled at build time using gn actions. This allows the Chrome and WebKit build process to use the same code for loading the builtin shaders even though they compile them in different ways. We now only build the mtllib for the OS we're currently building for. Bug: chromium:1385510 Change-Id: Ie3b4f66c48a7e0eccd5fe664f988e407f452795c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4583134 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com>
Charlie Lao c153d4a5 2023-10-18T18:12:19 Set isYUV to true for "EXTERNAL" formats These external formats are all YUVs so far. It is more correct to set isYUV to true than set to false. Bug: b/223456677 Change-Id: Ib9eb937754f4c085fbcc6768bb7a93d3c28317c1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4953919 Reviewed-by: Chris Forbes <chrisforbes@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao 3870655e 2023-10-10T17:04:04 Vulkan: Add 8 external format ID for external_format_resolve For external formats ANGLE does not know the exact that is. The idea is we reserve 8 external format ID for these driver defined formats. Each ID represents one uniquely defined external format. Then we will use this format ID pass around ANGLE just like any other format ID. Eventually vulkan backend will convert this formatID to the actual external format structure that returned from driver. Right now we reserved 8 IDs for this usage. Based on our survey, this is more than enough for now. We will deal with it if we need more than 8 in future. This CL is split from Chris Forbes's CL on android gerrit. Bug: b/223456677 Change-Id: I9cf442179af95e04a44796125e0c03dde702a8f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4929749 Reviewed-by: Chris Forbes <chrisforbes@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Christopher Cameron b480ba30 2023-09-18T17:30:09 CopySubTexture: Fix premultiplied alpha When copying from an sRGB texture to a non-sRGB texture, un-do the sRGB-to-linear transform independently of the premultiply vs unpremultiply properties of the texture. The sRGB-to-linear transform performed during sampling is performed on the RGB part of the pixel, independent of the alpha channel's value. Un-do this part immediately before examining the alpha channel's value (and its premultiply vs unpremultiply state). Bug: angleproject:7907 Change-Id: I50c8f56182a46957febcd1f7b7887b0956074bb8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4872047 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: ccameron chromium <ccameron@chromium.org>
Christopher Cameron 58c8fc8b 2023-09-06T23:54:20 CopySubTexture: Handle sRGB source in Metal backend CopySubTexture should ignore the color encoding of both the source and destination. The implementation currently ignores the color encoding of the destination (and CopyTextureVariationsTest tests this). The implementation does not always ignore the color encoding of the source. As an example of the consequences of this, an RGBA pixel value of 0xFF/80/00/FF, when copied from a GL_SRGB8_ALPHA8 texture to a GL_RGBA8 texture may result in a value of 0xFF/37/00/FF, if the copy was executed using a shader (in which case the sRGB-to-linear function was applied 0x80, resulting in the 0x37). Update the Metal shaders that do this blit, adding an option to apply a linear-to-sRGB transformation to undo the transformation applied by the sampler. The linear-to-sRGB transformation must be applied on unpremultiplied values. Ensure that the sequence of operations in all shaders is first unpremultiply, then linear-to-sRGB, then premultiply. Also remove optimizations to have the unpremultiply and premultiply cancel each other out, if there is also a linear-to-sRGB being applied. Bug: angleproject:7907 Change-Id: I7237bde1c61251a2f83968755e98a139ba949b59 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4848327 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 519d330c 2023-08-28T15:41:18 Add GL_RGBX8_SRGB_ANGLEX and GL_BGRX8_SRGB_ANGLEX formats If app creates AHB with sRGBX format, and then create a EGLImage, Image::initialize() will retrieve the sized format from AHB, which is GL_RGBX_ANGLE, and then try to convert to sRGB color space. The bug here is that GetNonLinearFormat will pick GL_SRGB8 for all these formats :GL_RGB8, GL_BGRX8_ANGLEX, GL_RGBX8_ANGLE. This means that different AHBS with these three different format will end up createing a tetxure with same format which sRGB. I think the reason somone did it this way initially simply because there is no sRGB corresponding format available for BGRX8 and RGBX8. This CL adds sRGB internal version of these two formats, thus make it straight forward to pick the correct sRGB format. The other change here is for AHBs, right now we are always force mRequiredImageAccess to be Renderable. This actually workedaround the bug that mentioned earlier that we are picking the wrong format. Because of forced renderable, we end up with SRGB fallback to SRGBA. But external images should not fallback, we should use its existing format as is since it can be accessed via AHB interface directly. Bug: b/298037344 Change-Id: I6119c4015cc5bf0effdf0530cb756b6c4656c38f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4819053 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Kimmo Kinnunen 34a99db4 2023-08-03T16:46:36 Metal: Check the full generated default shader in Add the default MSL shader text in the repo. Fix an error with include path setup to make the script runnable from an arbitrary directory, for WebKit purposes. WebKit would compile that to a compile-specific metallib and then attach that metallib to the compilation as .h. Current upstream behavior is to compile the metallib once few platforms. Bug: angleproject:8284 Change-Id: Icbf7c0055718496cb380fad0b73d5b9b0d0abb0e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4748400 Commit-Queue: Kenneth Russell <kbr@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Geoff Lang 9aadc7aa 2023-07-13T11:44:51 Metal: Require MSL 2.1. We had previously shipped both MSL 2.0 and 2.1 shaders to support MacOS 10.13 (MSL 2.0 only) while also supporting the stencil blit fast path that MSL 2.1 provides with the has_shader_stencil_output feature. Each configuration of precompiled shaders is ~300kb so we will drop support for MacOS 10.13 and only ship the MSL 2.1 shaders. Rework of the disablement for NVIDIA and GPU family 1 to be more readable. The features themselves are always true because "disable on NVIDIA" is always true and the check for "is NVIDIA" is moved to the code which fails the initialization. Bug: angleproject:8258 Change-Id: Icc8c69540e43fd2b0b237fffbfe170bb3422903f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4681130 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 8447e279 2023-05-30T13:56:19 code_generation_hashes json files end with newline Bug: None Change-Id: Iddd2c1777a1d5486a4d390c6e3d56ffb09f47f02 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4574569 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Geoff Lang fbca2b29 2023-05-08T16:19:54 Metal: Build built-in shaders from source on the simulator Compiling the built-in shaders with iphonesimulator sdk generates the same shaders as on iOS which do not work on the simulator. Fall back to simply building them from source on the simulator. Bug: chromium:1385510 Change-Id: If6a3846fd06a4ff12c1e46c31f207e2a7b6c50bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4515521 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 7f04dc7d 2023-04-19T15:05:47 Reland: Metal: Embed precompiled default shaders. Compile all builtin shaders to an embedded mtllib to avoid the overhead of compiling them at startup. This reland adds ios simulator precompiled shaders. Bug: chromium:1385510 Change-Id: Ic8585ffe566875e705f2fb00f8e665e8a80797f6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4512494 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Quyen Le <lehoangquyen@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Cody Northrop d925c5c9 2023-05-04T16:16:11 Revert "Metal: Embed precompiled default shaders." This reverts commit 9f6c9f6630b63f541f5fd875aef87ce2a26fd618. Reason for revert: iOS Metal tests broken downstream: https://ci.chromium.org/ui/p/chromium/builders/ci/ios-blink-dbg-fyi/4972/overview Original change's description: > Metal: Embed precompiled default shaders. > > Compile all builtin shaders to an embedded mtllib to avoid the overhead > of compiling them at startup. > > Bug: chromium:1385510 > Change-Id: I1c31ae0088babae01a9e42d63b3c2c30b65f4476 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4450126 > Commit-Queue: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Quyen Le <lehoangquyen@chromium.org> > Reviewed-by: Kenneth Russell <kbr@chromium.org> Bug: angleproject:8152 Bug: chromium:1385510, chromium:1441754 Change-Id: I7f253f7aa14117b93d1e09ed61db0c4563fc9c3d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4508064 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 9f6c9f66 2023-04-19T15:05:47 Metal: Embed precompiled default shaders. Compile all builtin shaders to an embedded mtllib to avoid the overhead of compiling them at startup. Bug: chromium:1385510 Change-Id: I1c31ae0088babae01a9e42d63b3c2c30b65f4476 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4450126 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Quyen Le <lehoangquyen@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Saifuddin Hitawala 877cd04c 2023-03-02T10:24:14 Reland "Add vulkan format image fallback for R16G16B16" Suppressed misbehaving trace test in https://crrev.com/c/4317088 This is a reland of commit 71f6d54c8d3662693283281651e57c994a10cf08 Original change's description: > Add vulkan format image fallback for R16G16B16 > > This change adds a vulkan format image mapping fallback from R16G16B16 > to R16G16B16A16, R32G32B32_FLOAT and R32G32B32A32_FLOAT for both > UNORM and SNORM variants. > > This is done because in Chrome we want to use R16/RG16 formats which > are exposed to Skia over the EXT_texture_norm16. Currently, > EXT_texture_norm16 requires RGB16_EXT which if not present is not > supported even if R16_EXT and RG16_EXT are supported. This fallback > helps us support R16/RG16 as well over RGBA16. > > It also updates validationES checks for GL_RGBA signed and unsigned > normalized checking if type is GL_SHORT or GL_UNSIGNED_SHORT. > > It adds a method LoadToFloat that allows a type (GLushort or GLshort) > to be loaded into float format types. This is then used as part of > fallbacks for load_functions_data.json. > > Bug: None > Change-Id: I5c6879cd2ed5dd6e3440877f4891f269d96d88a1 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4294694 > Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Geoff Lang <geofflang@chromium.org> Bug: None Change-Id: I101dd9e8c62e6794692c9f89c4944297e195f710 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4317089 Reviewed-by: Cody Northrop <cnorthrop@google.com> Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Roman Lavrov b3178411 2023-03-07T15:08:46 Revert "Add vulkan format image fallback for R16G16B16" This reverts commit 71f6d54c8d3662693283281651e57c994a10cf08. Reason for revert: crashing win-trace https://ci.chromium.org/ui/p/angle/builders/ci/win-trace/3527/overview Also reproducible on Linux: % src/tests/capture_replay_tests.py --gtest_filter="Texture2DNorm16TestES3.TextureNorm16R16 Original change's description: > Add vulkan format image fallback for R16G16B16 > > This change adds a vulkan format image mapping fallback from R16G16B16 > to R16G16B16A16, R32G32B32_FLOAT and R32G32B32A32_FLOAT for both > UNORM and SNORM variants. > > This is done because in Chrome we want to use R16/RG16 formats which > are exposed to Skia over the EXT_texture_norm16. Currently, > EXT_texture_norm16 requires RGB16_EXT which if not present is not > supported even if R16_EXT and RG16_EXT are supported. This fallback > helps us support R16/RG16 as well over RGBA16. > > It also updates validationES checks for GL_RGBA signed and unsigned > normalized checking if type is GL_SHORT or GL_UNSIGNED_SHORT. > > It adds a method LoadToFloat that allows a type (GLushort or GLshort) > to be loaded into float format types. This is then used as part of > fallbacks for load_functions_data.json. > > Bug: None > Change-Id: I5c6879cd2ed5dd6e3440877f4891f269d96d88a1 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4294694 > Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Geoff Lang <geofflang@chromium.org> Bug: None Change-Id: I8373aee3a1d2c2279a3882ff7203d88483e29f4e No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4316422 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Saifuddin Hitawala 71f6d54c 2023-03-02T10:24:14 Add vulkan format image fallback for R16G16B16 This change adds a vulkan format image mapping fallback from R16G16B16 to R16G16B16A16, R32G32B32_FLOAT and R32G32B32A32_FLOAT for both UNORM and SNORM variants. This is done because in Chrome we want to use R16/RG16 formats which are exposed to Skia over the EXT_texture_norm16. Currently, EXT_texture_norm16 requires RGB16_EXT which if not present is not supported even if R16_EXT and RG16_EXT are supported. This fallback helps us support R16/RG16 as well over RGBA16. It also updates validationES checks for GL_RGBA signed and unsigned normalized checking if type is GL_SHORT or GL_UNSIGNED_SHORT. It adds a method LoadToFloat that allows a type (GLushort or GLshort) to be loaded into float format types. This is then used as part of fallbacks for load_functions_data.json. Bug: None Change-Id: I5c6879cd2ed5dd6e3440877f4891f269d96d88a1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4294694 Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev 93e311f7 2023-02-07T00:00:00 Add channel info to compressed formats in angle::Format Fixed: angleproject:8011 Change-Id: I2ea08f30523c08b7ca11ee327990a110a448ca42 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4232118 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Constantine Shablya e82eaff9 2022-09-22T16:01:06 Stubs for paletted images Bug: angleproject:7599 Change-Id: Idb49f8ba07ebd3b6cad461fa9e90b856af666183 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3909396 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Constantine Shablya <constantine.shablya@collabora.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>
Gregg Tavares 8a0351a5 2022-05-26T14:29:21 Metal:Dynamically choose max draw buffers. The code was hard coded to 4 which is lower than OpenGL's 8. This implementation keeps a hard coded array of size 8 in rx::mtl::RenderPassDesc and rx::mtl::RenderPipelineOutputDesc but only uses up to the display's limit. Bug: angleproject:7280 Bug: angleproject:5730 Change-Id: Idd7e64dc47697882b44540804159566158e1e924 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3671695 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Gregg Tavares <gman@chromium.org>
Alexey Knyazev a20cd8b7 2022-01-22T01:40:34 Fix initialization for ETC2 punchthrough alpha formats * Zero-filled ETC2_A1 data must be treated as opaque black * Removed init functions when emulation is not needed * Fixed initialization for emulated ETC2_R8G8B8A1_SRGB_BLOCK Bug: angleproject:6936 Bug: angleproject:6941 Change-Id: Ie5555bbaa6b1a2bcfd9c22cb9c17d1a96e72aa70 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3406761 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Kyle Piddington cfc4db34 2021-11-04T16:54:15 Metal: Provoking vertex support for Metal DrawArrays Add in provoking vertex rewrite support for drawArrays command, enabling 6 dEQP tests. GLES3/functional_rasterization_flatshading_line_loop GLES3/functional_rasterization_flatshading_line_strip GLES3/functional_rasterization_flatshading_lines GLES3/functional_rasterization_flatshading_triangle_fan GLES3/functional_rasterization_flatshading_triangle_strip GLES3/functional_rasterization_flatshading_triangles This patch adds a new shader to the Provoking Vertex helper that generates draw commands for all simple data types. Fix bug in provoking vertex helper that caused reused index buffers to suffer from allocation issues. Also fix Provoking vertex for triangle fan generation Bug: angleproject:5325 Change-Id: I7a1211dfcd99329868269ea0666eef1915d487b5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3261635 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kyle Piddington <kpiddington@apple.com>
Gregg Tavares ee1d3cf7 2021-12-10T12:29:16 Metal: Integrate Metal Binary Shader generation Bug: angleproject:6801 Change-Id: I2eb7072ed342f2b4cb5d9ee50ca9db75c5c7df69 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3331206 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kyle Piddington <kpiddington@apple.com> Commit-Queue: Gregg Tavares <gman@chromium.org>
Tim Van Patten ef65edf2 2021-11-22T14:23:35 Add extension: ANGLE_rgbx_internal_format Add the extension ANGLE_rgbx_internal_format, which exposes the ANGLE internal format GL_RGBX8_ANGLE. The format GL_RGBX8_ANGLE enables emulating RGB8 formats with RGBA8 within ANGLE. This also renames the format GL_RGBX8_ANGLEX to GL_RGBX8_ANGLE, since it's being exposed. Bug: angleproject:6690 Test: Texture2DTestES3.TextureRGBXImplicitAlpha1 Change-Id: I5548a3578a14e2f2a4006bbf59983b01f694b7f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3296625 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Kenneth Russell da3db87e 2021-07-06T14:00:58 Upstream latest changes to Metal backend from Apple to 7/1/2021 This CL merges in the ANGLE changes between these two WebKit commits: https://git.webkit.org/?p=WebKit.git;a=commit;h=8648b353ab1d7730438c2e08319e1a4d64982c31 https://git.webkit.org/?p=WebKit.git;a=commit;h=166e4924a52971d6a32ad48247a439b16c00e062 Include provoking vertex buffer out of bounds fix from https://bugs.webkit.org/show_bug.cgi?id=230107 Fix bad merge of resetting of dirty bits, breaking DepthStencilFormatsTest.DepthTextureRender test and perhaps others. Disable GL_APPLE_clip_distance when the direct-to-Metal compiler is active. It can not yet handle the gl_ClipDistance array. Disable use of rectangular textures for IOSurfaces. Metal can bind IOSurfaces to 2D textures, and this was passing all tests in the SPIR-V Metal backend. Introducing rectangular textures breaks the SPIR-V Metal backend, and the tests currently fail on the direct-to-Metal backend. Fix several bugs with ProvokingVertex, which was causing both the SpirV and Direct backends to incorrectly draw indices. (https://bugs.webkit.org/show_bug.cgi?id=230107) Skip the following tests on the Metal backend which is still failing RobustResourceInitTestES3.BlitDepthStencilAfterClearBuffer GLSLTest_ES3.GLVertexIDIntegerTextureDrawArrays/ES3_Metal With these changes, angle_end2end_tests again runs to completion. Bug: angleproject:6395 Change-Id: I3cc58f531426a95fc8f177a4ad87f56c1855a546 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3167010 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kyle Piddington <kpiddington@apple.com>
Alexis Hetu c0aa6108 2021-09-17T16:22:55 Add new GL_RGBX8_ANGLEX format Currently, IOSurface objects using {GL_RGB, GL_UNSIGNED_BYTE} are natively represented with GL_BGRX8_ANGLEX, which we use instead of other RGBA formats in order to avoid issues when a canvas uses 'no alpha': https://source.chromium.org/chromium/chromium/src/+/main:third_party/swiftshader/third_party/angle/angle/src/libANGLE/renderer/vulkan/mac/IOSurfaceSurfaceVkMac.mm;l=44 This unfortunately causes some other issues because of the implicit RGB <-> BGR conversion like type mismatches in subresource updates. This CL adds a new type, RGBX8, which will be usable by IOSurface objects and which behaves exactly like the BGRX8 format with the B and R channels flipped. Bug: chromium:1209250 Change-Id: I345eadc8addd05a0964cae30d89c20005479e37b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3188910 Commit-Queue: Alexis Hétu <sugoi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Mohan Maiya e66e3344 2021-07-12T13:28:54 Vulkan: Add GL_ANGLE_yuv_internal_format extension 1. Add a new extension to support creation of immutable textures with sized internal YUV formats 2. Rename YUV format enums from *_ANGLEX to *_ANGLE 3. Move YUV format enums from angleutils.h to glext_angle.h Bug: angleproject:5773 Change-Id: Ibfe732f4c9a4a536be56481f33e4768f6227c212 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2820153 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Kyle Piddington d33a2222 2021-04-26T16:56:15 Upstream Apple's direct-to-Metal backend: compile libANGLE. This change is meant to merge the metal backend changes from Apple's direct-to-Metal backend. Taken from Kyle Piddington's CL: https://chromium-review.googlesource.com/c/angle/angle/+/2857366/ The goal of this CL is to merge the metal backend code in a state that compiles, but not to switch the Metal backend over to using the direct-to-metal backend yet. Bug: angleproject:5505 Bug: angleproject:6127 Change-Id: If6783e06e0086b3a1dd25c6f53caca5cfc96cb86 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2950067 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Alexey Knyazev 835bcb1e 2021-05-08T13:24:58 Vulkan: Support GL_EXT_texture_sRGB_RG8 For completeness, added mappings of R8_SRGB and R8G8_SRGB to OpenGL and Metal. Bug: angleproject:4932 Change-Id: Ic8e44e3a94c114e985f6965fcd43fbcb8071432d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2880661 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 7828506a 2021-04-06T23:42:16 Vulkan: Cleanup buffer format fallbacks - Fallbacks for formats that have required vertex attribute support are removed. - Fallbacks are changed to ones with smaller sizes - A bug is fixed where CopyNativeVertexData wasn't initializing the alpha channel appropriately, which was not exercised due to fallback to 32-bit float formats. Bug: b/184163871 Change-Id: Icd9afa49d94c65545d1f3fcf521881726d64529d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2809441 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev f2b47418 2021-04-22T18:32:37 Align BPTC format names in angle::FormatID Use the same naming convention as other similar formats. Bug: angleproject:5731 Change-Id: I187881f4bc4691a0963502ed41f42ab0ebf4171c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2846824 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Cody Northrop 14f8918c 2021-04-16T09:17:29 Migrate more scripts to python3 Test: python3 scripts/run_code_generation.py Bug: angleproject:5707 Change-Id: I5abae69c1c6bf03cc418f10beaabc80288fa1c94 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2828979 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi 0273ea3f 2021-04-06T16:23:39 Vulkan: Use RGBA16_FLOAT for buffer format fallback ... instead of RGBA32_FLOAT. VK_FORMAT_R16G16B16A16_SFLOAT has mandatory support for vertex buffers. Bug: b/184163871 Change-Id: I7ef2933cd15e46bb984e6fd1b020d2ec15b9c60e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2807780 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Mohan Maiya f54191ab 2021-03-25T12:27:02 Vulkan: Add YUV G8_B8R8_2PLANE_420_UNORM support. Add support for YCbCr_420_888 and YCrCb_420_888 formats, more commonly known as NV12 and NV21. Bug: angleproject:5773 Change-Id: I1568d543c221ad110e7f199eb2ffd5df23a6134e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2787251 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 5163cd0c 2021-03-18T18:17:11 Add isYUV to angle::Format In preparation for adding support for more YUV formats add an 'isYUV' field that tracks whether a format is a YUV format. For now it is set if the format string contains the substring 'PLANE'. This is not the case for all known YUV formats but the condition can be expanded when required. Bug: angleproject:5773 Change-Id: Icb574037dc8105584931835dab0b60e8bafa3262 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2774762 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Jamie Madill 2e9161e4 2021-01-12T11:29:29 Vulkan: Add YUV G8_B8_R8_3PLANE_420_UNORM format. Bug: angleproject:5438 Change-Id: I525a51256a5ee83fa69c8705aa90790fb32a6602 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2623813 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Le Hoang Quyen cb6176f3 2020-09-29T01:08:00 Metal: Support tri-fan & line-loop with primitive restart Triangle fan: - If primitive restart is NOT enabled and there is no active render pass, use Compute Shader to generate indices. - If primitive restart is enabled, use CPU to generate indices. Line loop: - If draw non-instanced without primitive restart, generate and draw only one additional last segment (fastest). - If draw instanced, primitive restart is NOT enabled, and there is no active render pass, use Compute Shader to generate indices (OK). - Otherwise, use CPU to generate indices (slowest). Also Disable OcclusionQueriesTest.ClearNotCounted failure on NVIDIA. Bug: angleproject:2634 Bug: angleproject:5307 Change-Id: Ia5529825807a964f5fcb2a4af8844778896cd42a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2435859 Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Le Hoang Quyen 8a50b42b 2020-10-24T19:29:12 Metal: Convert index & vertex format on GPU when possible. - When converting vertex buffer: - if there is no render pass active, use compute shader to convert. - if there is a render pass active and device supports explicit memory barrier then convert the buffer in vertex shader with direct buffer write and insert a memory barrier. - if there is a render pass active and device doesn't support explicit memory barrier then convert the buffer on CPU. Bug: angleproject:2634 Change-Id: I5346e3a2adb855f40e46a3912d9db404a4482e0f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2434025 Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Jamie Madill 5f7eeb93 2020-10-17T11:52:40 Add isSRGB flag to angle::Format. Bug: angleproject:5176 Change-Id: I85fc78206456439ba7dab55c093187fb94364823 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2482290 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill 188d0fe6 2020-10-18T14:33:28 Make Metal shader-gen cross platform. This switches the generator script use the hermetic Clang instead of the system gcc/clang. It also uses common Python routines to manage the temporary file so that it works consistently on Win. Bug: angleproject:5186 Change-Id: I52906d1a708db8b925061a9d5578b3d54a6dc862 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2483464 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Le Hoang Quyen <le.hoang.q@gmail.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Le Hoang Quyen 5b7c5b34 2020-10-18T17:19:51 Metal: don't precompile default shaders. Default shaders will be compiled from source at runtime, this is because they depend on ANGLE format table and there is currently no way to pre-compile metal shaders in a cross-platform manner. Using default shaders' source instead of pre-compiled form seems to reduce the libGLESv2's binary size. However, the startup time will be increased due to runtime cost of compilation, thus the compilation now will be done asynchronously. Bug: angleproject:5186 Change-Id: I0e1987d6c76692d5169255736fbb8e215185c33b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2482405 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com>
Le Hoang Quyen 119d867c 2020-09-26T18:27:39 Metal: autogen blit & clear shaders for integer textures Bug: angleproject:2634 Change-Id: I20d0bf3fca354a7964ce5893a605ab72a8a9012d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2433328 Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Le Hoang Quyen e0eb7d2e 2020-09-21T03:19:07 Metal: Fix wrong FormatID enum order used by PBO autogen shaders. FormatID_autogen.h's enums' order was altered by CL https://chromium-review.googlesource.com/c/angle/angle/+/2413165 However, Metal default shaders relied on old order thus the result PBO related computation based on enum value has become wrong. This CL reuse gen_angle_format_table.gen_enum_string() function to generate format enums for both - src/libANGLE/renderer/FormatID_autogen.h (used by C++) - src/libANGLE/renderer/metal/shaders/format_autogen.h (used by Metal default shaders) Bug: angleproject:2634 Change-Id: I52fad168d1932e0386dcf789574f06d341dbd9c3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2418500 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Le Hoang Quyen 63c91a3b 2020-08-04T20:09:05 Metal: autogen for PBO related shaders. Bug: angleproject:2634 Change-Id: I36e5a6a4cb11d82f666c410b33fdb39ad35a5e80 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2336557 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Le Hoang Quyen 966a62cb 2020-08-04T12:08:00 Metal: autogen for EXT_occlusion_query_boolean. Bug: angleproject:2634 Change-Id: I4d6a6378a269ea9e38e9282d6dbfa45e4e3d4d5a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2336126 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Le Hoang Quyen 7ce9947d 2020-08-04T12:08:00 Metal: autogen for 3D texture's mipmap generating shader. Bug: angleproject:4921 Bug: angleproject:2634 Change-Id: I5c379d750114e2ca1c5dd0203e94bb63dac1e0bf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2336125 Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Le Hoang Quyen defeda29 2020-08-04T12:08:00 Metal: autogen for EXT_draw_buffers & ANGLE_framebuffer_blit Bug: angleproject:2634 Change-Id: I8f8ee91fb673301b8bd97c359ee39c411e2bf8da Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2336124 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Le Hoang Quyen 9385eb35 2020-08-02T23:21:54 Metal: Generate default shaders to separate files. Generate default shaders' OS specific versions to separate files to avoid mtl_default_shaders_autogen.inc becoming too big. Bug: angleproject:2634 Change-Id: Ie2a39971ec46c36ce13bf5cb72f998f2cbc0ab64 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2332145 Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Le Hoang Quyen 3e0b61a9 2020-07-06T01:18:22 Metal: Compile default shader source files separately. - Previously all default shader files were included in one file named master_source.metal. - Now they will be compiled separately and link together to generate binary shader. - Also generate a debug binary variant that will be used in debug build. Bug: angleproject:2634 Change-Id: Ic040835c4a729666e73afeba52f5be839b632396 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2281784 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Le Hoang Quyen 9277ee74 2020-07-06T12:40:58 Metal: Implement MSAA default framebuffer. GL_SAMPLE_COVERAGE_VALUE is implemented by inserting gl_SampleMask writing logic to fragment shader. New test added: MultisampleTest.ContentPresevedAfterInterruption. - Skip on D3D11 (Bug: angleproject:4609) Bug: angleproject:2634 Change-Id: Ib44daf0baccc36ea320596d81713156047da059c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2281783 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Le Hoang Quyen c0c938af 2020-05-11T00:50:00 Metal: draw 1 triangle instead of 2 for fullscreen shaders. Reference article in favour of one big triangle instead of 2: https://michaldrobot.com/2014/04/01/gcn-execution-patterns-in-full-screen-passes/ According to this article, the performance could be increased by ~10% for fullscreen shaders. Bug: angleproject:2634 Change-Id: Ia5b04c40f0587e3cb8680c0f30f7b68d9d7a3efe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2193192 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Le Quyen fe26bae4 2019-10-29T18:38:53 Metal backend implementation pt 2 This is without Metal specific shader translator implemented yet. Bug: angleproject:2634 Change-Id: I95d589442251c9ba111bd05a2dc379a36739046c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1855069 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Le Quyen 25301999 2019-10-11T14:49:00 Metal implementation pt 1: autogen resources Autogen format table and internal shaders for Metal. Bug: angleproject:2634 Change-Id: I4d81fcd17a0e9959ba9c38a250acc7abb168f54c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1855067 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>