src/tests/gl_tests/GetImageTest.cpp


Log

Author Commit Date CI Message
Mark Lobodzinski c9606f00 2024-10-07T10:15:14 Fix extensions moved to core in GLES 3.2 The GL_EXT_texture_cube_map_array, GL_EXT_texture_buffer, and GL_OES_texture_storage_multisample_2d_array extensions were moved into core in ES3.2, but validation still required enabling extensions. Added 3.2 as a sufficiency. Test: angle_end2end_tests --gtest_filter=*CompressedTexImageCubeMapArray* Bug: b/371940347 Change-Id: Ie73a76087b6b52775d44ae79efd7f48e9fc90eb9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5912120 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mark Łobodziński <mark@lunarg.com>
Constantine Shablia 0e3d200d 2023-06-21T07:01:42 Tests: Add paletted formats glGetTexImageANGLE tests Test: angle_end2end_tests --gtest_filter=GetImageTestES1.PalettedTexImage* Bug: angleproject:7710 Change-Id: I1c7edcbeae86d88076deffb2b8484ecd85a4b773 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4629690 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com> Auto-Submit: Constantine Shablya <constantine.shablya@collabora.com>
Cody Northrop 1ae9756e 2022-06-22T17:43:15 Textures: Centralize texture format emulation check Refactor in order to use the check in multiple places. Bug: b/236478448 Change-Id: I6df2e0d63c60fa3e8b2d65185fce164be0e7d961 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3719160 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Eddie Hatfield 89e38b57 2022-06-22T15:04:08 Refactor to use ANGLETest vs ANGLETestWithParam Bug: angleproject:6747 Change-Id: I72ad52d0268eae0e1a401f12f3e94cc5efa402f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3719002 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Lubosz Sarnecki 2893effa 2022-02-10T14:28:32 validationESEXT: Implement ValidateGetCompressedTexImageANGLE. Add CompressedTexImageNegativeAPI test. Bug: angleproject:6177 Test: angle_end2end_tests --gtest_filter="GetImageTest.CompressedTexImageNegativeAPI*" Change-Id: Ia7ed503a7a98f10e4b02deb3954f367f842da3fa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3452112 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Lubosz Sarnecki b1075951 2022-02-09T17:35:56 vk_helpers: Adjust CopyImageToBuffer extent to block size. When using readPixels with compressed formats, the VkBufferImageCopy bufferRowLength and bufferImageHeight need to be a multiple of the block size. This prevents the following Vk validation errors: VUID-vkCmdCopyImageToBuffer-bufferRowLength-00203 VUID-vkCmdCopyImageToBuffer-bufferImageHeight-00204 Add tests with texture sizes that are not multiple of block size. Test: angle_end2end_tests --gtest_filter="GetImageTest.CompressedTexImageNotBlockMultiple*" Test: angle_end2end_tests --gtest_filter="GetImageTest.CompressedTexImageCubeMap*" Test: angle_end2end_tests --gtest_filter="GetImageTestES32.CompressedTexImageCubeMapArray*" Bug: angleproject:6177 Change-Id: I34c788efece285753857500801e88abeaa6a8a78 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3452111 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Lubosz Sarnecki bdedf146 2022-01-14T13:35:30 TextureVk: Implement getCompressedTexImage. Extend ImageHelper::readPixels to support compressed formats. Implement readPixelsForCompressedGetImage. Add compression tests to GetImageTest. Implement CaptureGetCompressedTexImageANGLE_pixels in capture_gles_ext_params. Test: angle_end2end_tests --gtest_filter="GetImageTest*.CompressedTexImage*" Bug: angleproject:6177 Change-Id: I6e5b6d746b9c6cc9b885fa44f75a985660d8fb58 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3452110 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Lubosz Sarnecki 0a320d16 2022-02-09T13:36:18 GetImageTest: Enable on Vulkan SwiftShader. Add SwiftShader ES2 and ES3 Vulkan targets to ANGLE_INSTANTIATE_TEST. Bug: angleproject:6177 Change-Id: Idc964202d8b02f38118b69bbef7984bf4d22e61b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3452109 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Peter Kasting 4f2b2995 2021-09-23T09:50:46 Fix -Wshadow. This still disables the warning for glmark2 instead of fixing it, to avoid needing to upstream a patch. Bug: chromium:794619 Change-Id: Ice602996041d6090c9b09ee81c8ed095c4fa6b2e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3179860 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill a8f1a916 2021-08-26T17:53:56 GetTexImage: Remove syncState calls & add early error exit. Instead of calling syncState to force the Vulkan staged textures to flush, we ensure the Texture is marked initialized by sending a message up to the Texture when there are no more pending updates. Also adds handling for textures with extra mips. Instead of crashing, we now return an error with a warning. Also adds a test with a texture that has extra (outside the mip chain) defined levels. Also adds a test and handling for empty texture levels. This should lead to more consistent behaviour in the trace test serialization logic, where often the prior logic would behave differently depending on if GetImage was called from MEC or from the serialization code. Also updates the generateMipmap logic to syncState after calling initializeContents so the updates happen in the correct order on Vulkan. Bug: angleproject:5133 Bug: angleproject:6336 Change-Id: Iab1c2a22b9f9435e7f3c0f870c86bbed3460482e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3123168 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill c61fd919 2021-08-25T08:29:55 Fix array texture readback with GetTexImage. According to the desktop GL specs, GetTexImage retrieves entire mips of a texture for 2D array and cube array textures. The prior code was only retrieving one layer and didn't have any way to get the layers other than layer zero. Fix this by using similar logic to how we read back 3D textures. Also adds regression tests to GetImageTest. Bug: angleproject:5133 Bug: angleproject:6132 Change-Id: I8b22bc10ac1fdfe6389ac309450b92681f087cda Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3118266 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 4686da27 2021-08-06T18:13:14 Add GetImage test with RGB. This test covers a case in T-Rex with an unused RGB texture that was tripping up serialization. It isn't currently possible to make the test fail but it does cover some new code paths. Bug: angleproject:5133 Change-Id: I87c066779f270752bed3c1c1882951c71f16d378 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3076133 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Yuly Novikov c03a4235 2021-02-20T16:14:37 Suppress UNINSTANTIATED_PARAMETERIZED_TEST failures on Nexus 5X GTest complains that we don't run some tests on GLES backend. Bug: chromium:1180570 Change-Id: I9427ac25c3b6f06f3c042caa3c0afc7000cf1599 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2710783 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Austin Sullivan f18b92ad 2021-02-17T19:40:53 testing: Mark uninstantiated GL & EGL test suites googletest CL 315255779 causes test binaries to fail when they include test suites / parametrized tests that are not instantiated, and when they include empty test suites. This CL uses the GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST() macro to annotate the suites / tests that are causing test failures. This is necessary to get googletest rolled past CL 315255779. Bug: chromium:1163396 Change-Id: I05c0619186ffc265b8e32e8b69d6680a6acdbb48 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2701292 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Cody Northrop cc846039 2020-07-27T21:05:11 Capture/Replay: Fix GetTexImage on Luminance GetTexImageANGLE and GetRenderbufferImageANGLE use ReadPixels to pull texture data. Luminance is not a renderable format, so it is not supported by ReadPixels. To support this, override Luminance formats to their underlying internal format. Test: angle_end2end_test --gtest_filter="*GetTexImage*" Bug: b/160014453 Bug: angleproject:4058 Change-Id: Id19344c2e2c06386a871338833e35b7747cb966b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2321740 Reviewed-by: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jamie Madill 422ebad2 2019-10-31T16:02:48 Fix ANGLE_get_image cube map handling. Was missing a layer parameter. Also includes a regression test. Also updates incomplete texture handling in Vulkan. Will try to sync the texture storage if the texture has never been used. Bug: angleproject:3944 Change-Id: I5fcd6931f9cb9e008faaeaecb1f6df275a2af73f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1894142 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill bb35bb4e 2019-10-29T17:17:04 Vulkan: Implement simple case ANGLE_get_image. A couple cases are left unimplemented: Incomplete/unused Textures. This leads to a slightly more tricky implementation. Since we need to read back from the staging buffer we will need to flush the Image contents to a temporary buffer. Depth/stencil readback. Requires a more complex pixel packing step. 3D/Cube/2D Array readback. Also requires a more complex packing step. Bug: angleproject:3944 Change-Id: Ic5d9a606177ba7e3e5ab945feb5f555afa11741f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1879964 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill dfc20daf 2019-10-28T13:51:42 Plumb more logic for ANGLE_get_image. Also implements and tests validation / negative API. Bug: angleproject:3944 Change-Id: I3385a4255f4fab6a12eee2abfa5ffcce2107359a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1879961 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>