src/image_util/loadimage.h


Log

Author Commit Date CI Message
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>
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>
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>
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>
Stuart Morgan 9d737966 2019-08-14T12:25:12 Standardize copyright notices to project style For all "ANGLE Project" copyrights, standardize to the format specified by the style guide. Changes: - "Copyright (c)" and "Copyright(c)" changed to just "Copyright". - Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1"). - Fixed a small number of files that had no copyright date using the initial commit year from the version control history. - Fixed one instance of copyright being "The ANGLE Project" rather than "The ANGLE Project Authors" These changes are applied both to the copyright of source file, and where applicable to copyright statements that are generated by templates. BUG=angleproject:3811 Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Courtney Goeltzenleuchter 01867144 2019-07-19T14:51:29 Vulkan: Add support for D32F_S8 depth_texture Test: angle_deqp_khr_gles3_tests --deqp-egl-display-type=angle-vulkan --gtest_filter=dEQP.KHR_GLES3/packed_depth_stencil_verify_read_pixels_depth24_stencil8 angle_deqp_khr_gles3_tests --deqp-egl-display-type=angle-vulkan --gtest_filter=dEQP.KHR_GLES3/packed_depth_stencil_clear_buffer_depth32f_stencil8 Full passing results are blocked by suspected driver issues: Bug: angleproject:3683 Bug: angleproject:3689 Bug: angleproject:3457 Change-Id: I7ce1a7824802ebca2c0479a3467fac26013829eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1704791 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Geoff Lang <geofflang@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>
Courtney Goeltzenleuchter 943fe34e 2019-06-24T16:51:57 Vulkan: Upload packed depth-stencil Bug: angleproject:3437 Test: angle_end2end_tests --gtest_filter=DepthStencilFormatsTest.VerifyStencilData/* Change-Id: Iffab48eaea6aa35888560859e9f502a4f814b833 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1674663 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Tom Anderson 08146a27 2019-05-17T10:40:44 Remove non-source sources from binary targets No behavior changes. BUG=chromium:964411 Change-Id: I843757e65f110882c01514fe6bf4aed28e07dd21 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1617011 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
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>
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>
Geoff Lang 4107dda9 2016-07-13T14:19:49 Clamp float32 depth data when uploading. BUG=angleproject:1095 Change-Id: I4c272aef0f94733fc7b5297ddaa1fa2bc765fe62 Reviewed-on: https://chromium-review.googlesource.com/360029 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 5695fc99 2016-07-05T14:47:30 Clean up the SSE detection logic. * Include the correct header right in the SSE check in platform.h. * Don't use separate SSE versions of the load functions, have them use SSE automatically. BUG=612205 Change-Id: I70f9a5513e144db4d16c1f3ad922debeb6c50268 Reviewed-on: https://chromium-review.googlesource.com/358108 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6e4cfceb 2016-06-13T15:06:31 Refactor ANGLE's image manipulation code into a static library. Allows for chromium to make use of some of the functionality. BUG=612205 Change-Id: Ib4435ca44775a3a554b0fb3bd384bd4d31d7952d Reviewed-on: https://chromium-review.googlesource.com/351753 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>