src/libANGLE/renderer/load_functions_table_autogen.cpp


Log

Author Commit Date CI Message
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 17931e23 2023-01-27T00:00:00 Fix stencil and depth/stencil data uploads Multiple changes were made to depth and stencil load functions, removing redundant code and fixing issues. Failures were caused by incorrect assumptions about component locations in combined formats. * D32_FLOAT_S8X24_UINT has the same layout as GL_FLOAT_32_UNSIGNED_INT_24_8_REV * D24_UNORM_S8_UINT has stencil data in its MSBs, while GL_UNSIGNED_INT_24_8 puts it in LSBs. Bugfixes * Added LoadD24S8ToS8D24 that swaps D24 and S8 components * Added LoadS8ToS8X24 for stencil-only uploads on D3D * Replaced LoadD24S8ToD32F with LoadD32ToD32F * Fixed D and S extraction in LoadD24S8ToD32FS8X24 * Fixed stencil load and store in LoadD32FS8X24ToS8D24 and LoadD32FS8X24ToD32FS8X24 * Fixed S8_UINT subresource updates in Vulkan * Fixed D24_UNORM_S8_UINT subresource updates from GL_FLOAT_32_UNSIGNED_INT_24_8_REV data in Vulkan Cleanup * Renamed LoadUNorm16To32F to LoadD16ToD32F * Removed LoadUNorm32To32F, replaced it with LoadD32ToD32F * Renamed LoadR32ToR24G8 to LoadD32ToX8D24 * Renamed LoadD32FS8X24ToD24S8 to LoadD32FS8X24ToS8D24 * Removed unused LoadG8R24ToR24G8 * Removed Metal-specific LoadS8D24S8ToD32FX24S8, made use of the fixed LoadD24S8ToD32FS8X24 instead * Simplifed LoadD24S8ToD32F Added Texture2DTestES3.TexImageWithStencilData. Fixed: chromium:1408004 Fixed: angleproject:5317 Change-Id: I231345353aa4a7cebe46ded8458ac80de2c59e01 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4203427 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi 025504b9 2022-10-17T17:03:03 Pass worker pools to image load functions In preparation for the ASTC decoder using threaded decoding. Bug: b/250688943 Change-Id: I70d669bcb57b900dbb633304182e174aec362203 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3961339 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Greg Schlomoff <gregschlom@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Yiwei Zhang df946856 2022-08-22T20:36:52 Map RGBX AHB to GL_RGBX8_ANGLE and fix the load function AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM was false mapped to GL_RGB8, which will write back to the backing exteranl storage with 3 channel layout. Angle actually has ANGLE_rgbx_internal_format to fix the mapping with GL_RGBX8_ANGLE. However, the load function must align with GL_RGB8 if the actual storage is 4 channel. This change also fixes that to use LoadToNative3To4<GLubyte, 0xFF>. Bug: b/238460927 Test: CtsNativeHardwareTestCases#SingleLayer_ColorTest_*_R8G8B8X8_* Test: ImageTestES3.RGBXAHB* pass without VVL error Change-Id: Ic5db4cb4adba252949d64e560ff32e492a045912 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3846413 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Lingfeng Yang <lfy@google.com>
Lubosz Sarnecki 45e5cf01 2022-06-03T14:29:23 Vulkan: Implement ASTC emulation. Implement ASTC emulation using the astc-encoder library. Add copy_image tests to deqp_gles31_test_expectations for desktop cards. Add emulatedAstc limitation. Don't expose emulated ASTC from WebGL contexts. Introduce ANGLE_HAS_ASTCENC define to check for build availability. Only build on angle_standalone configurations. DEPS: Add astc-encoder. image_util: Decode ASTC to RGBA. TracePerfTest: Skip car_chase and genshin_impact on NVIDIA. Bug: angleproject:7415 Change-Id: Ib2f3fd3f710164a2ecd5d5edf780227031bbfb84 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3697999 Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
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>
Gregg Tavares 604610b4 2021-11-01T12:03:31 Metal: Use Depth32F for DEPTH_COMPONENT16 depth16unorm is broken on Metal. This is a workaround. Bug: angleproject:6597 Change-Id: I1748f9fab587b22980d13e8a141fa880eb6f9db0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3255666 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Gregg Tavares <gman@chromium.org>
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 5c8bf081 2021-06-08T13:12:24 Vulkan: Add support for YUV internal format extension 1. Add a function to upload YUV image data to textures 2. Modify stageSubresourceUpdate method to account for YUV images 3. Create VkSamplerYcbcrConversion when initializing ImageHelper 4. Update hasImmutableSampler to account for native YUV format support 5. Skip initializeNonZeroMemory for YUV formats Bug: angleproject:5773 Test: Texture2DTestES3.TexStorage2D*Yuv*Vulkan* Change-Id: I270f04bbf903cf2bf19f100eb95f32953d491c39 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2947767 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@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>
Sunny Sachanandani 5ee3826e 2021-04-01T16:23:27 Support GL_EXT_texture_type_2_10_10_10_REV on D3D backend Bug: angleproject:5817 Change-Id: Ie572a252946f87d125f9074f2144928bb43d78b2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2802861 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Sunny Sachanandani <sunnyps@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>
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>
Jeff Vigil 7a92d958 2020-07-21T16:32:49 Implement GL_OES_texture_stencil8 Add extension to Caps and code gen files. Add to Validation of TexImage Add all the autogen for new extension Fix swizzle for stencil only Add LoadFunction Fix formatutils Add validation Test: angle_deqp_egl_tests --deqp-case=GLES31.functional.stencil_texturing.format.stencil_index8_2d Bug: angleproject:3231 Change-Id: Id59c7d183ea1658732887e99637d9c8faab938e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404327 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Geoff Lang 49108a12 2020-06-30T11:53:23 Support BGRA_1010102 IOSurfaces in CGL and Vulkan. Bug: chromium:1100599 Change-Id: I7bc2c2e35490e28e9f6fe8f2e0c26cdea50650b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2275731 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Brandon Schade a156df23 2020-03-20T08:12:34 Vulkan: add support for EXT_texture_sRGB_R8 Added support for EXT_texture_sRGB_R8. The GL_SR8_EXT format will be available if the VK ICD supports VK_FORMAT_R8_SRGB. This does not add support for emulation of this format. Bug: angleproject:4503 Bug: angleproject:3609 Test: dEQP-GLES3.functional.texture.*.srgb_r8_* Change-Id: Ifaec92ac1a8561881f54ddb7fdf0975112711736 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2135853 Commit-Queue: Brandon Schade <b.schade@samsung.com> Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Charlie Lao c5b3cbdb 2020-03-09T16:58:37 Vulkan: Use VK_FORMAT_D24_UNORM_S8_UINT for 24 bit depth if available And if the format we picked has extra bits, try to clear it instead of load the value. Don't store these extra bits as values as well. Bug: angleproject:4459 Change-Id: If5d0e31aca1453deab970d0dbcf8886a5e6ed51c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2095850 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Tobin Ehlis <tobine@google.com>
Alexey Knyazev 58fc8b11 2020-01-31T19:03:12 Implement RGTC (BC4, BC5) compressed texture formats gl.xml was modified as two enums were missing from their proper group. dxgi_support_data.json was fixed to not expect BC4 and BC5 on FL9_3 Bug: angleproject:3149 Change-Id: Ieb97a8cf8e92258c1b44e090e823fac227997174 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033068 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Courtney Goeltzenleuchter cb2b5136 2020-01-10T11:04:38 Vulkan: Simplify format table generation Remove the "override" table. That gets in the way of some solutions. If a format cannot be supported by a native Vulkan format as indicated in the "map" table, then check fallbacks. Also add support for native RGBA4 and R5G5B5A1 support. Previously those formats would be emulated with RGBA8 due to the override, but now code will check if the native format is available and use it. Bug: angleproject:4282 Change-Id: Ib33ea40543d91a2c2a95075b277f825a8822037c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1994538 Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Courtney Goeltzenleuchter f567bac0 2019-12-20T09:29:35 Vulkan: Add fallback for D32_UNORM for Swiftshader Swiftshader does not have support for D24_S8 (typical fallback for 32bit DEPTH_COMPONENTS) but does have D32_FLOAT, so add fallback to that format. This then allows ANGLE to support OES_depth_texture extension when using Swiftshader which is needed to allow Vulkan swiftshader to replace GL swiftshader. Bug: angleproject:4232 Change-Id: Iaf04fcf0bea8d9cca0b9e7a18e3351ce8c704355 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1986413 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 2fa9d734 2019-10-07T16:35:38 Partially Revert "Convert DXT1 RGB data to DXT3 RGBA when uploading to the GPU." This reverts commit e6582161b04beaa368f3081897912ede89d7800d. Remove the DXT1->DXT3 transcoding but leave in the MacOS workarounds for fixing the alpha channel of DXT1 textures. BUG=angleproject:3729 Change-Id: Ib276c1e4a58155866da8c661cba2063a4e4304fe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1846015 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Courtney Goeltzenleuchter a333b87c 2019-09-27T14:00:14 Vulkan: Handle D24 -> D32FS8X24 depth fallback Swiftshader's depth support requires that ANGLE fall back to using the D32FS8X24 depth format. Some conversion routines needed to be added to support that use. Test: dEQP.GLES3/functional_texture_format_sized_* Bug: angleproject/3937 Change-Id: I979dc5e9b01dac40f564daad4f4817b61bd056ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1829170 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang e6582161 2019-09-16T12:39:18 Convert DXT1 RGB data to DXT3 RGBA when uploading to the GPU. DXT1 has a specific 'BLACK' code that results in transparent black pixels when sampled. D3D does not have specific RGB-only DXT1 formats like OpenGL does so when this code is encountered, we sample 0 alpha for these pixels when GL would expect 1 because the alpha channel should not exist. Work around this by converting to DXT3 RGBA, adding an extra block of 1.0 alpha pixels for each color block. Mac Intel OpenGL requires additional workarounds to always sample 1.0 alpha. Set the texture swizzle parameters to force it. BUG=angleproject:3729 Change-Id: Ia3647085acd97bb01af4e95ef3f6f21dcfb6a554 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1804880 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com>
Mohan Maiya 6caa2652 2019-09-11T08:06:13 Vulkan: Support float textures and renderbuffers Fixed support in the vulkan backend for legacy GLES2.0 formats (luminance, alpha, luminance_alpha) Correctly exposed the following extensions: OES_texture_float OES_texture_half_float OES_texture_float_linear OES_texture_half_float_linear EXT_color_buffer_float EXT_color_buffer_half_float Some of the above extensions have different requirements depending on other extension support and the context client version, and were incorrectly assuming the most restrictive requirements to be exposed. Implemented end2end tests for: OES_texture_float OES_texture_half_float OES_texture_float_linear OES_texture_half_float_linear EXT_color_buffer_float EXT_color_buffer_half_float Bug: angleproject:2898 Bug: angleproject:2726 Test: ./angle_end2end_tests --gtest_filter='Texture2DFloatTest*' Change-Id: I7024aa1393eadafb5a0fb83c23e9035aae650b67 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1740276 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jaedon Lee 3b46885e 2019-07-30T16:50:36 Vulkan: Implement EXT_texture_type_2_10_10_10_REV - Expose GLES 3.0 feature of 2_10_10_10_REV texture type on GLES 2.0 as EXT. - Handle alpha channel value as 1.0 when used with RGB format. - Add test for "RGB+UNSIGNED_INT_2_10_10_10_REV" case into TextureUploadFormatTest. BUG=angleproject:3232. Test: dEQP-GLES2.capability.extensions.uncompressed_texture_formats.GL_EXT_texture_type_2_10_10_10_REV dEQP-GLES2.functional.fbo.completeness.renderable.texture.*2_10_10_10_rev dEQP-GLES3.functional.fbo.completeness.renderable.texture.*2_10_10_10_rev KHR-GLES2.core.internalformat.*2_10_10_10_rev* KHR-GLES3.core.internalformat.*2_10_10_10_rev* Change-Id: Iac00517971f9242161115c7256117a69093fb5df Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1732618 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten cbabea73 2019-07-11T17:24:17 Vulkan: Desktop ETC/EAC formats support Initial attempt to give desktop ETC/EAC formats support. Bug: angleproject:3676 Change-Id: Id147b0c1808e30df77097d0c7ff6a06534554b93 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1699307 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang d9c17107 2019-07-10T14:56:26 Add support for GL_OES_texture_compression_astc This extension adds 3D compressed texture formats, something ANGLE has not seen before. This requires tracking a compressed block depth for validation and image size computations. Update the ldr and hdr extension checks to be in line with the spec. HDR requires LDR and is not detectable by texture formats alone. Expose all of the ASTC extensions on the GL backend. BUG=angleproject:3675 Change-Id: Id04c7c8ef8541e9556579536cdba899b64303caf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1695923 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Ian Elliott 9d943af7 2019-07-11T17:53:37 Vulkan: Support more texture format-type combination tests. This is a partial fix for 3455, which contains a number of different root-causes. This CL addresses two sets of them. 1) Partial fix for KHR-GLES3.copy_tex_image_conversions.forbidden.* Recent changes, including adding support for GL_RGBA8-to-GL_RGB5_A1, plus adding support for GL_RGB10_A2-to-GL_RGB5_A1 eliminate the crashes for 56 of the 70 tests. 2) Most of the KHR-GLES3.packed_pixels.rectangle.r* tests now pass. Recent changes, including potentially the above get another 34 tests passing, and another 15 no longer crashing. 3) Vulkan: Fix errant glCopyTextImage validation code. I got all but 2 of the KHR-GLES3.packed_pixels.rectangle.r* tests passing. I fixed bugs in the validation code (with at least two more bugs that I haven't fixed yet). More details below. 3a) Fix the IsValidES3CopyTexImageCombination() function for SNORM. The code wasn't rejecting SNORM cases, which are missing from the table of effective internal formats, meaning that support is undefined. The GLES 3.2 spec says that a GL_INVALID_OPERATION error should be generated "if the effective internal format of the source buffer does not match the effective internal format of the new image." 3b) There's a caveat that was overlooked that means that internal formats like GL_RGB10_A2 are not supported. Bug: angleproject:3455 Bug: angleproject:3693 Bug: angleproject:3697 Change-Id: Ie4399a2d7cd969ec29acc926f32e6608775609c6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1693325 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Ian Elliott 5e1b3777 2019-07-08T09:38:38 Vulkan: Add support for GL_RGBA8-to-GL_RGB5_A1 This support was missing and caused dEQP crashes. Bug: angleproject:3627 Change-Id: Idc06cc92df676061f8a08d0f32a1b3e7f03a66f4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1691102 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Tim Van Patten 5f388c24 2019-03-14T09:54:23 Vulkan: dEQP-EGL.functional.image.modify.* Determine the destination internalFormat correctly. dEQP-EGL.functional.image.modify.renderbuffer_rgb565_tex_subimage_rgb8 dEQP-EGL.functional.image.modify.renderbuffer_rgba4_tex_subimage_rgba8 dEQP-EGL.functional.image.modify.tex_rgb565_tex_subimage_rgb8 dEQP-EGL.functional.image.modify.tex_rgba4_tex_subimage_rgba8 dEQP-EGL.functional.image.modify.tex_rgba8_tex_subimage_rgba5_a1 dEQP-EGL.functional.image.modify.tex_rgba8_tex_subimage_rgba4 dEQP-EGL.functional.image.modify.tex_rgba5_a1_tex_subimage_rgba8 dEQP-EGL.functional.image.modify.tex_rgba5_a1_tex_subimage_rgba4 dEQP-EGL.functional.image.modify.tex_rgba4_tex_subimage_rgba8 dEQP-EGL.functional.image.modify.tex_rgba4_tex_subimage_rgba5_a1 dEQP-EGL.functional.image.modify.renderbuffer_rgba4_tex_subimage_rgba8 dEQP-EGL.functional.image.modify.renderbuffer_rgba4_tex_subimage_rgba5_a1 dEQP-EGL.functional.image.modify.renderbuffer_rgb5_a1_tex_subimage_rgba8 dEQP-EGL.functional.image.modify.renderbuffer_rgb5_a1_tex_subimage_rgba4 Bug: angleproject:3170 Change-Id: Ic9870390b2d4a0dcbe561efd3fb1597faadb7d79 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1524404 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi cf8735dc 2019-03-18T16:48:45 Vulkan: Add support for ETC1 The ETC2 format is backwards compatible with ETC1. ETC1 RGB8 is thus supported by implicitly using the ETC2 RGB8 Vulkan format. Bug: angleproject:2670 Change-Id: I59a112da5ed3a0b90f90a8b4c350c94d43b31120 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1520987 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 507e8d30 2019-03-15T16:49:48 Add missing entries in texture load functions map GetLoadFunctionsMap() is expected to cover all possible combinations of texture internalformat and upload data format. Several of these combinations were missing, especially w.r.t to compressed types. This change adds the missing combinations that are hit on any of the configurations being tested. An assert is added to catch missing conversion functions in the future. Bug: angleproject:2670 Change-Id: I793ac2c57f65eeb1cc8da8f1b223f6a9a44c7708 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1524462 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 0f34f3f2 2019-03-11T10:18:57 Use auto_script in run_code_generation. Cleans up the generator scripts to prepare for listing outputs in the generated hashes file. Also reorganizes the scripts somewhat to make them a bit more maintainable. Bug: angleproject:3227 Change-Id: If40946c2004941d3f6cd51d5521c7db8cc0b52df Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1512052 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho f2ed2995 2018-10-04T13:54:42 Add support for EXT_texture_compression_bptc After validation, the enums are simply forwarded to the native drivers. The BPTC formats are supported on both OpenGL and D3D. The included test coverage covers the API quite well, but only has basic coverage for correct decoding of texture data. More coverage for texture data could be added later. BUG=angleproject:2869 TEST=angle_end2end_tests Change-Id: I3de37972dcf13c6fa3fc1bc429a2627523a4a082 Reviewed-on: https://chromium-review.googlesource.com/c/1261675 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill ba365939 2018-07-18T17:23:46 Rename angle::Format::ID to angle::FormatID. This allow for predeclaring the enum. It solves some include dependency issues. Bug: angleproject:2729 Change-Id: Ibbbab0796e466c62848404ba277c5f454fd9ac62 Reviewed-on: https://chromium-review.googlesource.com/1142299 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Luc Ferron 49cef9a5 2018-03-21T17:28:53 Vulkan: Support of A8 textures Bug:angleproject:2358 Change-Id: I56a86de7cc21dee00a95f1d054d2940262797ca7 Reviewed-on: https://chromium-review.googlesource.com/974305 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Luc Ferron 41918387 2018-03-13T11:37:54 Vulkan: Additional texture formats support. RGB565, RGBA4444, RGBA5551 Bug:angleproject:2358 Change-Id: I4dc19f9e4cc7b51f215b57d440a108cdf17aec24 Reviewed-on: https://chromium-review.googlesource.com/960573 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Luc Ferron 5164b797 2018-03-06T09:10:12 Vulkan: Support GL_LUMINANCE and GL_LUMINANCE_ALPHA The dEQP tests cannot be turned on before immediate data for drawElements is supported. Bug:angleproject:2364 Change-Id: Id5fd6fbc0c74f2dba08341f36ca0091d540f4ed8 Reviewed-on: https://chromium-review.googlesource.com/951402 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Nico Weber 41b072b6 2018-02-09T10:01:32 Prepare for -Wimplicit-fallthrough in ANGLE. Disable the warning for flex-generated output, which contains lots of intentional fallthrough. Fixes a bug where GL_SAMPLE_ALPHA_TO_ONE_EXT would fall through to GL_COVERAGE_MODULATION_CHROMIUM and hence behave like that. Fixes a bug in the D3D9 state management where invalidating DIRTY_BIT_POLYGON_OFFSET would also invalidate the stencil bits. One somewhat common incorrect pattern in ANGLE is nested switch statements that look like so: switch (a) { case a1: switch (b) { case b1: ... break; } case a2: ... } The assumption here seems to be that the breakk exits the outer case (here a1), while it in fact only exits the inner switch, so that we fall through to a2. In most places, I fixed this by adding an explicit `break` after the inner switch. This fixes a bug wher GL_PATH_JOIN_STYLE_CHROMIUM would fall through to GL_PATH_MITER_LIMIT_CHROMIUM in validation (but since the join style enum is always > 0, this happened to not have an effect in practice). This also fixes 87 bugs in GetLoadFunctionsMap() where invalid values would previously return an unrelated function map instead of the empty load function map. Bug: chromium:810767 Change-Id: Ib51388c73fbfc229160e2c10f8fb9364cc7c996c Reviewed-on: https://chromium-review.googlesource.com/911529 Commit-Queue: Nico Weber <thakis@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 44dcb911 2018-02-02T12:51:41 Decode R11 and RG11 EAC formats into 16-bit textures. 8-bit textures are not precise enough but no tests were failing because dEQP was using 4-bit backbuffers. Preserve the old decode-to-8-bits paths because they are still used by Chrome. BUG=angleproject:2336 Change-Id: Ieb651325e2a05c85bcc97f8e6d868afaf37aff0d Reviewed-on: https://chromium-review.googlesource.com/899701 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Minmin Gong 390208b5 2017-02-28T18:03:06 Implements ETC lossy decode for ETC2 formats. This is the 2nd payload of GL_ANGLE_lossy_etc_decode feature. In this change, RGB8, SRGB8, RGB8A1, and SRGB8A1 formats in ETC2 family can be converted to BC1. BUG=angleproject:1285 Change-Id: I96fe2f07c62716a31d37f20a202b6cabbb4ebbd2 Reviewed-on: https://chromium-review.googlesource.com/447846 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kai Ninomiya 02f075c8 2016-12-22T14:55:46 Support EXT_texture_compression_s3tc_srgb on DX11 Also passes WEBGL_compressed_texture_s3tc_srgb conformance on WebGL 1/2 on DX11 BUG=angleproject:1553 BUG=chromium:630498 Change-Id: If1d17b54b1e8b998410079fd217626410015d7f1 Reviewed-on: https://chromium-review.googlesource.com/422585 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0ea0caeb 2016-08-10T12:39:29 Move load functions table to renderer layer. We will be able to use it for the Vulkan formats table. BUG=angleproject:1455 Change-Id: Iddc09fe560b06880af72a6fa8eb03fa2792e2f8c Reviewed-on: https://chromium-review.googlesource.com/367454 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>