src/libANGLE/renderer/vulkan/vk_format_table_autogen.cpp


Log

Author Commit Date CI Message
Yuxin Hu d0b01c81 2024-04-17T14:40:10 Remove duplicated fallback entry in vk_format_table_autogen Bug: b/335496851 Change-Id: Iff6a095aaffac099779b093e02b1a818b510dc0a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5464161 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi 60aaf4a0 2024-03-14T12:58:56 Vulkan: Move renderer to namespace vk This class is agnostic of EGL. This change moves it to namespace vk for use with the OpenCL implementation Bug: angleproject:8564 Change-Id: I57f7807d6af8b3d5d7f8efbaf8b5d537a930f881 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5371324 Reviewed-by: Austin Annestrand <a.annestrand@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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>
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>
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>
Chia-I Wu 155a94d7 2023-01-27T15:23:56 Vulkan: prefer D24_UNORM_X8_UINT as D32_UNORM fallback D24_UNORM_S8_UINT might need a separate plane or might not be compressible depending on gpus. Prefer D24_UNORM_X8_UINT. Test: glmark2 Bug: b/259570128 Change-Id: I8e30f8dbe35853cc9647f2452a2bde8b2c6a1e26 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4201091 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Chia-I Wu <olv@google.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>
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>
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>
Yuxin Hu 800c6971 2021-12-08T01:08:17 Modified buffer fallback format to smaller storage format Bug: angleproject:6726 Change-Id: I475d99fc0143f265e66cc4f7aa13fa0de8745169 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3315916 Reviewed-by: Lingfeng Yang <lfy@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@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>
Tim Van Patten eb1d2474 2021-10-04T20:23:26 Vulkan: Add R8G8B8_UNORM to vk_format_map.json The map of R8G8B8_UNORM -> VK_FORMAT_R8G8B8_UNORM is missing from vk_format_map.json. This leads to attempting to get format bits for angle::FormatID::NONE / VK_FORMAT_UNDEFINED. This CL adds R8G8B8_UNORM to vk_format_map.json, so devices that support it, like ARM, can use it. This allows those devices to import AHBs created with R8G8B8_UNORM. This CL also adds some additional ASSERT() and UNREACHABLE() calls to catch missing formats sooner. This allows the EGL tests to pass on ARM devices, but the tests are still skipped due to Qualcomm not having the necessary support for optimal tiling. Bug: angleproject:6277 Test: dEQP-EGL.functional.image* Change-Id: I41b7ead97a10ae80be4b6048d36d0d85ad71784f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3204152 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@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>
Charlie Lao 856a0e03 2021-09-01T18:09:14 Vulkan: Make vk::Format from struct to class With all the recent changes that there are two actualImageFormatIDs, retrieve the actual format requires pass in a renderable boolean. And the vertex format also has a similar requirement to the real format may differ depends on if it is compressed or not. This struct no longer safe to expose the underline data members directly. This CL turns it into a class and expose the actual format via method that requires renderable or compressed boolean. Bug: b/196456356 Change-Id: Ie2f8308cc408bde1b0787e0b392e143187cc4425 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3139236 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Tim Van Patten <timvp@google.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>
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>
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>
Jamie Madill 2e9706d8 2021-01-08T17:29:42 Vulkan: Use angle::FormatID instead of VkFormat. This change switches the internal enums we pass around from VkFormat to FormatID. The end goal of the refactor is to allow the Vulkan back-end to store packed tables indexed by FormatID. Because VkFormat has large gaps in its enum space we'd otherwise need to use unordered data structures like unordered_map. The change removes the redundant VkFormat storage from vk::Format and uses a new table query to return the VkFormat that 1:1 matches an angle::FormatID. We also include a reverse mapping for use with native Vulkan get functions for Android. Also moves sRGB conversion functions into renderer_utils. A couple sRGB formats that don't exist in GL are no longer handled by the sRGB conversion functions. These formats should be extremely rare. Bug: angleproject:5438 Change-Id: Id8b49773ca0c556f9f5a6a10fcf0d9762b93bbea Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2618204 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com>
Jamie Madill e91097bf 2020-12-29T14:05:56 Vulkan: Clean up "actual"/"intended" naming. Clarifies that the GL internal format is an "intended" format and the Vulkan formats are "actual" formats. This makes all the format fields use the same consistent naming pattern. Bug: angleproject:5438 Change-Id: I935a49895109e9e06eae5ef98d5614dfd1128ff8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2605728 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang f0b02054 2020-08-06T20:55:05 Add a Vulkan feature to compress float32 vertex formats. Use the vertex conversion pipeline in VertexArrayVk to detect static vertex data and convert float32 vertices to float16. This feature is useful for determining if an allication is vertex bandwidth bound and seeing what gains could be had by using smaller attributes. This feature could be implemented in ANGLE's frontend but new infrastructure for converting and storing the converted attributes would need to be added to gl::VertexArray. Our backends already have the functionality needed to handle unsupported attribute formats and this can be repurposed for compressing vertex formats. Bug: b/167404532 Bug: b/161716126 Change-Id: I9a09656a72e8499faa4124adf876d7261c8341c9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2342285 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Courtney Goeltzenleuchter f61272fb 2020-06-17T11:38:37 Add support for VK_KHR_sampler_ycbcr_conversion This adds ability for applications to import Android Hardware Buffers (AHBs) as OpenGL images which in turn can be sampled from and/or written. This was specifically tested with the common use case of importing a buffer created by an media decoder and using that as a texture source to include that video content on the screen. Tested with: - Angry Birds 2 video player (for ads) requires YUV conversion. - Basic Media Decoder example: https://github.com/android/media-samples/tree/master/BasicMediaDecoder Bug: b/155487768 Change-Id: I9255450f81aa4daa2aace7205d4f6c3f225abcca Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2175103 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@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>
Courtney Goeltzenleuchter ca04de85 2020-03-03T09:59:42 Vulkan: blacklist VK_FORMAT_R8G8B8_UNORM Chrome makes assumptions that depend on ANGLE implementing 24bit RGB as 32 RGBX. Since that was the behavior of ANGLE for a while, remove those formats from the VK format table to force that behavior again. Test: Chrome on Fuchsia Bug: angleproject:4282 Change-Id: I22a3f07b00d7870044ed6b3326dd528721b89af8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2085043 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org>
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>
Jamie Madill beacd8c8 2019-10-17T14:34:02 Vulkan: Rename format fields. Renames 'angleFormat' to 'intendedFormat'. Also renames 'bufferFormat' and 'imageFormat' to 'actualImageFormat' and 'actualBufferFormat'. This renaming should make it clearer to the reader what the meaning of the different format fields are. Intended format is the front-end format and the actual formats are the formats we pass to Vulkan. Also updates the documentation. Bug: angleproject:4009 Change-Id: If61bf7250e88f7ed3d452718574c963d718e27b2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1866077 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Le Quyen 6e653981 2019-10-09T15:19:02 Added PVRTC compression extension needed for Metal on iOS. Bug: angleproject:2634 Change-Id: I413f754fe5551b1e248bc2b824b327b92d8c70f9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1849076 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Mohan Maiya fea65766 2019-09-19T09:30:38 Vulkan: Add support for OES_vertex_type_10_10_10_2 - Add support to CPU/GPU convert vertex formats - Add test cases for type conversion in angle_end2end_tests - Fix a bug in shader script by adding a ceil when calculating bytes Bug: angleproject:3192 Test: angle_end2end_tests --gtest_filter=VertexAttributeTest*Packed1010102* Change-Id: I57bab9fc1c1041cd734746d0e52a33717b635ec0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1788495 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.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>
Mohan Maiya 8400d05c 2019-08-07T14:52:54 Vulkan: Support the vertex_type_2_10_10_10_rev format - Modify the python script and json file to generate the code which adds the function for vertex_type_2_10_10_10_rev. These functions handle the loading and conversion for vertex_type_2_10_10_10_rev. - Modify ConvertVertex.comp and ConvertVertex.comp.json to perform a GPU based conversion for vertex format of type 2_10_10_10_rev - Modify BindingIsAligned function to check that both stride and binding offset is aligned to the format size when the component size is not aligned to 8 bits. - Modify deqp3 expectations file to enable type_2_10_10_10_rev format vertex array tests. Bug: angleproject:3193 Test: dEQP-GLES3.functional.vertex_arrays.single_attribute.*2_10_10_10* Change-Id: I2358d0d8888f7dfd7eac999dc150f643167de817 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709035 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: 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>
James Dong 765ee7b7 2019-06-19T14:19:52 Vulkan: support for new vertex attribs in GLES 3.0 Fixes handling of packed vertex formats, adds new overrides for 32-bit [SU](NORM|SCALED) vertex types, and handles half-precision floats correctly. Pixel 2 does not natively support certain 10-10-10-2 vertex formats; this change does not add support for them. Test: ./angle_deqp_gles3_no_gtest --deqp-egl-display-type=angle-vulkan -n 'dEQP-GLES3.functional.vertex_arrays.*' Test: ./angle_end2end_tests --gtest_filter='AttributeLayout*/ES3_Vulkan' Test: ./angle_end2end_tests --gtest_filter='VertexAttribute*/ES3_Vulkan' Bug: angleproject:3193 Change-Id: I5ae4edd743e86e3e89e2697034c04dc4d9ecd1f9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1668230 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: James Dong <dongja@google.com>
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>
James Dong 8bb6baa0 2019-06-18T15:30:16 Vulkan: improve handling of RGB texture formats Adds fallback for some RGB textures using the corresponding RGBA formats and modifies fallback calculation to not require filtering/rendering for formats which are not required to support filtering by GL spec. Bug: angleproject:3190 Bug: angleproject:3196 Change-Id: I7beaf9881d63e3c6bd9339faede0333919a4174c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1665894 Commit-Queue: James Dong <dongja@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c5c937e1 2019-06-19T16:20:57 Vulkan: Support R11G11B10_FLOAT and R9G9B9E5_SHAREDEXP The keys in vk_format_map.json were incorrect. The format table generation script is enhanced to give an error in such a case. This revealed a number of entries with no corresponding angle format, which are also removed. Bug: angleproject:2898 Bug: angleproject:3190 Change-Id: I32caf2d2a8abb6f76b25436725670a8e84d576fb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1666700 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Courtney Goeltzenleuchter eaf2d928 2019-04-18T16:31:25 Add support for OES_depth_texture Note: Includes workaround for http://anglebug.com/3452 - some Android devices do not indicate filtering support on VK_FORMAT_D16_UNORM. Bug: angleproject:3103 Test: angle_end2end_tests --gtest_filter=DepthStencilFormatsTest.DepthTexture/* angle_end2end_tests --gtest_filter=DepthStencilFormatsTest.PackedDepthStencil/* angle_end2end_tests --gtest_filter=DepthStencilFormatsTest.DepthTextureRender/ES2_VULKAN Change-Id: Ic325fb94ab0e619a17c2e149e0e0865fa4142f3a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1575426 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 0631e19b 2019-04-18T16:09:12 Vulkan: Rename Vulkan "Texture" format to "Image" Also adds some comments to vk_format_utils.h. Bug: angleproject:3372 Change-Id: I529b9b189e4cdfd400c3c981a47139727d9954ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1565062 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@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>
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>
Shahbaz Youssefi 76bd848c 2019-02-13T13:00:44 Vulkan: Support ETC, S3TC and BPTC compressed textures Fixes the format table so the correct Vulkan format for the types are generated. Additionally, implements CHROMIUM_copy_compressed_texture as well as other functions relevant to initializing compressed textures. Bug: angleproject:2670, angleproject:2904 Change-Id: I682d36574262525027cddf8f329515f38cd77dc0 Reviewed-on: https://chromium-review.googlesource.com/c/1468048 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@google.com>
Shahbaz Youssefi b9039bf7 2019-02-12T15:30:48 Vulkan: fix numerous formats missing support Vulkan _SRGB formats have a suffix of _UNORM_SRGB in the corresponding angle name. Vulkan A2B10G10R10_*_PACK32 formats have angle names in the form R10G10B10A2_*. A16 and A32 formats are emulated similar to A8. Some formats that are not in the front-end are removed. Bug: angleproject:2364, angleproject:2405 Change-Id: I00718f450a374912d57d3c00ea167ce486e10aa0 Reviewed-on: https://chromium-review.googlesource.com/c/1468042 Reviewed-by: Jamie Madill <jmadill@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Shahbaz Youssefi eae081c6 2018-12-03T22:32:32 Vulkan: Fix ASTC_12x12_SRGB_BLOCK support A typo in the .json file made this format unavailable. Bug: angleproject:2357 Change-Id: I3214c6d8a00d9fa731573347b06bded8fb57a918 Reviewed-on: https://chromium-review.googlesource.com/c/1359619 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 96bd8fdf 2018-11-30T14:30:18 Vulkan: Fix format properties queries When querying format properties (in vk::GetFormatProperties), the mandatory feature support table was consulted to check whether a number of texture features are present. If so, the entry from that table was returned. The goal had been to speed up initialization by not issuing device queries if possible. That is, when vk::GetFormatProperties was called on a format, if it supported that select few texture features, the VkFormatProperties entry from the mandatory table would be returned. However, that function found its way to other uses (such as querying buffer format properties, or other image properties beyond the select few). As a result, when the VkFormatProperties from the mandatory table was returned, actual support for these other features was often not tested and assumed false (unless they happened to be mandatory as well). This commit reworks the format feature query functions such that the specific features to be tested are provided when querying the format properties. The mandatory table is consulted as before, and if the entry doesn't contain those features, the device is queried and the results cached. Bug: angleproject:2958 Change-Id: I28d046eb63c3bd5173468aa4cb3e4c63c83e67b1 Reviewed-on: https://chromium-review.googlesource.com/c/1357152 Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi d856ca48 2018-10-31T16:55:12 Vulkan: add clear test for emulated stencil or depth formats S8_UINT and D24_UNORM_X8_UINT are the only formats currently that are single-aspect and are possibly emulated with a packed depth-stencil format if it's not supported. A flag to FeaturesVk has been added as a way to force this behavior for the sake of testing. This test is added to ensure the correct clear algorithm is used for this case. Additionally, this case is detected and the other aspect is forcefully cleared to 0 whenever the original aspect is cleared. Bug: angleproject:2815 Change-Id: Ief3039d66bbf46468213b9e3224f7cc7541c3a2e Reviewed-on: https://chromium-review.googlesource.com/c/1312453 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 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 115e8a26 2018-09-26T07:51:30 Vulkan: Store "is packed" in buffer formats. This more easily allows us to compute the format alignment for use with the vertex input stage. Bug: angleproject:2797 Change-Id: If15281ce18fbed743b6a0c843cece4626bc4ce72 Reviewed-on: https://chromium-review.googlesource.com/1245841 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Frank Henigman 6c6be2ce 2018-09-10T14:23:57 Vulkan: add S8_UINT texture fallbacks. Add two fallbacks for S8_UINT. Enable tests. BUG=angleproject:2655 Change-Id: If7df23745a8de8a01d86ab6efa3bca67b5227d76 Reviewed-on: https://chromium-review.googlesource.com/1217282 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Frank Henigman 3b1fe64f 2018-09-04T13:15:35 Vulkan: allow a list of fallback formats. Allow a list of fallback formats as well as a single one in the format map. The first supported format is used. No functional change. BUG=angleproject:2655 Change-Id: Ica312b7899471a7a65184a6921713b79da056f31 Reviewed-on: https://chromium-review.googlesource.com/1214847 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Frank Henigman 67c388e6 2018-07-19T19:16:11 Vulkan: support GL_FIXED vertex data. Override fixed to float, generate code, enable tests. BUG=angleproject:2405 Change-Id: Ic3e9a31eaf22372023b94081b0f4a83770dcabbe Reviewed-on: https://chromium-review.googlesource.com/1144455 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill db9c69ed 2018-07-18T17:23:47 Make PackPixels take an angle::Format. This removes the format type parameter from places where it isn't needed. It also removes the 'write color' functions map. This map was redundant with the angle::Format write function. Bug: angleproject:2729 Change-Id: I24e4548a89342237d7ed25180fea156fba51ccab Reviewed-on: https://chromium-review.googlesource.com/1142300 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
Geoff Lang 38971fd1 2018-06-28T15:19:18 Vulkan: Support multiple depth stencil formats for backbuffers. Since the backbuffer's depth stencil is always emualted, it can support any depth stencil format. BUG=angleproject:2692 Change-Id: I29df62bb322c1ac4e9fcd54e4cbc4c219cf12e83 Reviewed-on: https://chromium-review.googlesource.com/1119075 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 799e075a 2018-07-17T13:27:21 Replace D24_UNORM with a packed version. Adding an explicit X8 channel packs the format into 32 bits. This gives the correct 4-byte alignment instead of a mysterious 3-byte version. Bug: angleproject:2729 Change-Id: Id38f74db4ba61c500baeb6526a9d14e1d31d4363 Reviewed-on: https://chromium-review.googlesource.com/1140739 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Frank Henigman 419acc8f 2018-06-24T19:57:31 Vulkan: Convert streamed vertex data as needed. Add two members to vk::Format: - vertex data copy function - flag indicating if the function converts or not Use the function when streaming vertex data so it gets converted if needed. Add fallbacks for integer formats. These formats will now work everywhere, as long as they are in client memory, not a buffer object. Adjust test expectations accordingly. BUG=angleproject:2405 Change-Id: I677221219d933c35740633a0ab7694293e218177 Reviewed-on: https://chromium-review.googlesource.com/1084328 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Frank Henigman d9618bf4 2018-06-24T19:57:31 Vulkan: prepare for buffer format fallbacks. Generate code for buffer fallbacks as well as texture fallbacks. No functional change. BUG=angleproject:2405 Change-Id: I9f30a2cbb3cd9ba1d18474f99cba434b030b0232 Reviewed-on: https://chromium-review.googlesource.com/1113026 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang cb8a921b 2018-06-28T12:30:36 Vulkan: Support RGB/BGR backbuffers emulated on RGBA/BGRA. BUG=angleproject:2692 BUG=angleproject:2523 BUG=angleproject:2715 BUG=angleproject:2716 Change-Id: I538b385f8b66fb97e176953b0fc4a6299849c005 Reviewed-on: https://chromium-review.googlesource.com/1118713 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org>
Frank Henigman 0bb02368 2018-05-27T20:35:11 Vulkan: add SCALED vertex formats to table. Add SCALED formats, which correspond to non-normalized integers, to Vulkan format table. Adjust test expectations accordingly. For now these new formats only work when the native Vulkan supports them. BUG=angleproject:2405 Change-Id: Ia6fdcbec61774536e6396cf713e46f28f49585c1 Reviewed-on: https://chromium-review.googlesource.com/1110710 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Frank Henigman 95fb2a17 2018-05-27T20:17:05 Add vertex formats and lookup function. Add an angle::Format for each ES2 vertex data format. Add function GetVertexFormatID() to get the angle::Format for a vertex attribute. These will be used later to support vertex formats in Vulkan (by mapping angle::Format to Vulkan format) and to eliminate the redundant enum gl::VertexFormatType. No functional change. BUG=angleproject:2405 BUG=angleproject:2531 Change-Id: I871ae23ce9fba57d90c554376e84b03f8514f7fc Reviewed-on: https://chromium-review.googlesource.com/1044874 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@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>
Jamie Madill 0cec82a5 2018-03-14T09:21:07 Vulkan: Implement basic depth/stencil buffers. This implements basic depth/stencil states and clearing. This also implements "fallback" texture formats in the texture generation. Fallback formats are those that are chosen at runtime for replacements for main formats which lack driver support. They are different from override formats, which are always used because we assume there is no driver support. The Vulkan spec only asserts that one of the two of D32 or D24 has mandatory support. In the case of AMD, D24 is not supported fully, and we need the fallback format support emulation. Bug: angleproject:2357 Change-Id: Ic86cede3c69ff9893a06b3a55c3b5d2d897fa55f Reviewed-on: https://chromium-review.googlesource.com/916701 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@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>
Olli Etuaho d66e1939 2018-01-17T11:36:24 Allow creating EGL pbuffers from typeless D3D textures A new extension EGL_ANGLE_d3d_typeless_texture_client_buffer is added that allows creating EGL pbuffers from typeless D3D textures. The extension increases the flexibility of the API compared to plain EGL_ANGLE_D3D_texture_client_buffer. The colorspace for the created EGL pbuffer can be set by using the EGL_GL_COLORSPACE attribute. Internally this sets the ANGLE format of the buffer. There are new ANGLE formats that are used specifically for typeless textures, separate ones for SRGB and linear views into the D3D textures. The extension is only supported on the D3D11 backend of ANGLE. BUG=angleproject:2300 TEST=angle_white_box_tests Change-Id: I6a6cb873d2cc0dca0b7f18a0f2cd35e7bafcb7d8 Reviewed-on: https://chromium-review.googlesource.com/873917 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 3c424b48 2018-01-19T12:35:09 Vulkan: Add vk_cache_utils.h. This file contains the Pipeline and RenderPass cache utils. Also renames renderervk_utils.h to vk_utils.h and the format utils file. Refactoring change only. Bug: angleproject:2163 Change-Id: I5113a9a2c6f0b0960d38e6c2d8e391fa2d9f5f6a Reviewed-on: https://chromium-review.googlesource.com/876505 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Sami Väisänen 935cb7c5 2017-11-08T15:53:41 Support B8G8R8A8_UNORM_SRGB as D3D11 texture format Support B8G8R8A8_UNORM_SRGB as D3D11 texture format. BUG=angleproject:2172 Change-Id: I2f15a55123601735d7fc6caa40bb056243a91b44 Reviewed-on: https://chromium-review.googlesource.com/758600 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 1d7be50a 2017-10-29T18:06:50 Vulkan: Upgrade RGB8 textures to RGBA8. It's unlikely any real hardware supports this format. Hack in a fixed fallback format for RGB8. We could consider implementing conditional support by checking the VkPhysicalDevice properties. This extends the Vulkan format support info in the RendererVk class to distinguish between a Buffer and Texture format. This is closely related to how Vulkan has separate format support bits for Linear Textures, Optimal Textures, and Buffers. We probably won't need to keep separate caps for Linear/Optimal, but it makes sense for Buffers to eventually use the same format tables. BUG=angleproject:2207 Change-Id: I8d427a99db15b314b13dd99f31aa1ac5055f0881 Reviewed-on: https://chromium-review.googlesource.com/742376 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 7b62cf97 2017-11-02T15:20:49 Refactor TextureFormatMap to store an array. std::map lookups are already showing up as a hot spot during some profile trace analysis. We can elimintate these by only doing a single switch at the entry point level to convert the GL internal format to an internal identifier or type info pointer. This change doesn't completely fix the hot spot, since now we are doing multiple switch statements, but it does remove the std::map storage in TextureCapsMap. It replaces it with a flat std::array indexed by angle::Format::ID, and gives us the option in the future to eliminate all by one switch statement. This should allow for a faster texture caps implementation in Vulkan. This also fixes the missing ANGLE format entries for ETC1 compressed formats. BUG=angleproject:2207 Change-Id: I74ea2082e582a6790d5fde90e33246a618a2da0e Reviewed-on: https://chromium-review.googlesource.com/742375 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 6a89d227 2017-11-02T11:59:51 Vulkan: Refactor format table. This moves the Vulkan format table to dynamically generated, but keeps it easily indexed. Because Vulkan format support is not able to be fully determined until runtime, we'll need a dynamic way to build the table. The most straight-forward way seems to be to keep a copy of the full table in the Renderer. Initializing it once at startup makes it a bit slower to init, but saves us from any threading shenanigans with lazy init when (and if) we ever support multi- threaded Contexts. BUG=angleproject:2207 Change-Id: Ib1ac879daa562c7ad1a965390be401fa2314e42c Reviewed-on: https://chromium-review.googlesource.com/742374 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill a8b73ed0 2017-11-02T09:22:29 Add a meta-script to run code generators. This script calls all the various GL and back-end python scripts to generate our internal format tables and entry points, etc. It uses a GYP-like scheme of inputs/outputs to check modified time before running the generators. It also will automatically call 'git cl format' if any generator was called. Also updates the copyright in a couple of touched files. BUG=angleproject:2207 Change-Id: I4187a7622accc1c97a8d779b8f87fe00b74855ea Reviewed-on: https://chromium-review.googlesource.com/742372 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill abaab233 2017-01-10T12:37:37 Vulkan: Introduce vk::Format. BUG=angleproject:1319 Change-Id: I88bcc6caa5d29565728848bada1563e47e383b29 Reviewed-on: https://chromium-review.googlesource.com/367753 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>