src/tests/gl_tests/FramebufferFetchTest.cpp


Log

Author Commit Date CI Message
Shahbaz Youssefi 9620d4d3 2024-05-23T16:12:52 Vulkan: Emit SPIR-V 1.4 where available In preparation for optimizations possible for SPIR-V 1.4. This change makes ANGLE output SPIR-V 1.4 if supported, and SPIR-V 1.3 otherwise. It handles the following differences between the two versions: - OpEntryPoint in SPIR-V 1.4 includes all global variables, as opposed to SPIR-V 1.3 where only the Input and Output variables are listed - Storage buffers use a dedicated storage class in SPIR-V 1.4 Bug: angleproject:342316794 Change-Id: I157ed46449ff2d0f14d284b883b4ddc1b4b46fd1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5565224 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c6fbf93d 2024-01-19T09:57:12 Vulkan: Fix input attachments leaking into uniform list To communicate the existence of input attachments added to the shader, the translator was adding `ShaderVariable`s for each to the list of uniforms exported from the shader. This was incorrect, as this list is visible to the application through `glGetActiveUniform`. Additionally, this was unnecessarily causing these uniforms to go through program link. Reserving SPIR-V ids for these uniforms, all that is needed from the translator is the mere existence of these input attachments. This change removes the addition of uniforms, and instead exports a bitset. Elsewhere, that bitset is consulted and reserved SPIR-V ids are used. Bug: b/320563594 Bug: angleproject:5792 Change-Id: Id93846cbc3996248f391fd2d5a65af1e48d6d46e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5215089 Reviewed-by: mohan maiya <m.maiya@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi e394cb46 2023-06-10T23:12:35 Vulkan: Refactor framebuffer fetch shader emulation This change fixes simultaneous usage of EXT_shader_framebuffer_fetch and ARM_shader_framebuffer_fetch, which previously declared two identical input attachment variables. The code is additionally greatly simplified. Bug: angleproject:8196 Bug: angleproject:8197 Bug: angleproject:8198 Change-Id: Iaaa2a5539a95727e67001a4da1d45092c9db4f2c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4615187 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: mohan maiya <m.maiya@samsung.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop 1148a662 2023-02-15T08:25:51 Update GL_ARM_shader_framebuffer_fetch token support These were missed during initial implementation because the target app doesn't use them, and there are no tests for vendor extensions. The implementation is basically a noop, but allows setting and querying state, unblocking apps. Also add a test that has basic usage. Test: FramebufferFetchES31.BasicTokenUsage_ARM Bug: b/269233744 Bug: angleproject:8025 Change-Id: Ic107150d4afd9c4c4984c58a1dafb1c18e608997 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4255965 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Sean Risser b96d1955 2023-01-20T16:06:34 Implement GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch allows fragment shaders to read gl_LastFragColorARM. The extension is similar to GL_EXT_shader_framebuffer_fetch, but is more limited in its capabilities. GL_ARM_shader_framebuffer_fetch was removed from HasFramebufferFetch() because it acts differently from GL_EXT_shader_framebuffer_fetch in significant enough ways that it should not be included in that single-use function. Tests: FramebufferFetchES31.*_ARM Bug: b/242419750 Bug: angleproject:7882 Change-Id: Id3a25c8ee50ca3e2a4c30a2261f507b0b53511ec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4083108 Commit-Queue: Sean Risser <srisser@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yuxin Hu 0d3ecf46 2022-06-24T16:37:17 Vulkan: Multisample Framebuffer Fetch Implement Multisample Framebuffer Fetch. This should fix the deqp failure dEQP.GLES31/functional_blend_equation_advanced_msaa_colorburn Bug: angleproject:7351 Bug: angleproject:3586 Bug: angleproject:6195 Bug: b/234173199 Change-Id: Idd7559dcba3d91e36d8f253f1554fb931a7a6775 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3724165 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Charlie Lao <cclao@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>
Shahbaz Youssefi 0bc70e96 2022-06-10T22:27:04 Vulkan: Rename getShareGroupVk to getShareGroup + other miscellaneous clean up Bug: angleproject:7375 Change-Id: I25690860478a2fd181a67ce2b6cb4d7aac7dbaa7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3700197 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0b533e64 2022-05-30T13:09:17 Make GLProgram non-copyable. This will prevent unexpected glDeleteProgram calls from showing up. Found when working in FramebufferFetchTest. Bug: angleproject:7375 Change-Id: Id0f01d693a40edd3357a26fe13e7a7e0c1b98dd8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3673828 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi b169f6f9 2022-04-01T14:41:12 Vulkan: Fix no location decoration vs framebuffer fetch The input attachment index is identical to the location qualifier. If there's only one output, GLSL is allowed to not specify the location qualifier, in which case it would implicitly be at location 0. Bug: angleproject:6947 Change-Id: Ib8e31ab524f6f4d4fe1d3e49386a374724da06a1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3566221 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Lingfeng Yang <lfy@google.com>
Shahbaz Youssefi 041c4c6d 2022-03-25T16:30:03 Vulkan: Track color attachment usage like D/S in render pass That is in preparation for optimizing mid-render-pass clears, which requires an answer to the following query: "has this color image been read from / written to so far in the render pass?" With this change, a future CL will also be able to optimize color attachment invalidates, which currently break the render pass unconditionally, the same way depth/stencil is optimized. Bug: angleproject:5048 Change-Id: I3d3ee40d8444e6861c06340d5d52b17f5ee895b4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3542989 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Lingfeng Yang <lfy@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop e56f0e29 2022-01-26T19:46:01 Vulkan: Check program fetch status when switching framebuffers Before this patch, we only checked whether to update the framebuffer fetch status when the program changes. We also need to check when the framebuffer itself changes. Test: FramebufferFetchES31.FramebufferMixedFetchTest Bug: angleproject:6893 Change-Id: I92ff1f30dfb3f17aee362e5931fc4c94d18142ba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3418842 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop 7d7cca47 2022-01-17T18:00:25 Vulkan: Update default FBO when fetch in use If the fetch mode of the default framebuffer changes, lazily create and use a new set of framebuffers (one per swapchain image) that are setup for fetch (i.e. have a matching renderpass). Test: FramebufferFetchES31.DefaultFramebufferTest Test: FramebufferFetchES31.DefaultFramebufferMixedProgramsTest Bug: angleproject:6893 Change-Id: Iff2b73d7c34b9b8ca9429c3f24aa700c2746cc81 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3401933 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop b5360798 2022-01-14T12:45:14 Vulkan: Support fetching from default FBO If GL_EXT_shader_framebuffer_fetch is enabled, specify framebuffer attachments as having VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT. Add new test FramebufferFetchES31.DefaultFramebufferTest which exercises the behavior. Also limit exposure of either framebuffer fetch extension to be Android only due to swapchain images requiring INPUT_ATTACHMENT. Test: FramebufferFetchES31.DefaultFramebufferTest Bug: angleproject:6893 Change-Id: I227e36a9844e2301f0fe0602f4e4d905874b32e3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3389791 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi f3d5dac3 2021-08-23T17:25:15 Vulkan: SPIR-V Gen: Drop dependency to glslang The SPIR-V gen path is now made default. Compilation through glslang is still supported for debugging, and is enabled on the GLSL* end2end tests for smoke testing. On release builds, glslang is not supported. To test with glslang, add the following gn arg (only necessary if dcheck is disabled): angle_enable_spirv_gen_through_glslang = true Then enable the generateSPIRVThroughGlslang feature. This can be done by setting an environment variable: ANGLE_FEATURE_OVERRIDES_ENABLED=generateSPIRVThroughGlslang ./angle_deqp_gles2_tests Binary size saving: - 1.3MB on Linux (SPIR-V gen itself: 240KB) - 730KB on Android (SPIR-V gen itself: 140KB) Perf tests: - LinkProgramBenchmark.Run/vulkan_compile_single_thread * Through glslang: truncated mean: 1287033.36 * Direct SPIR-V Gen: truncated mean: 244495.91 (~80% reduction) - LinkProgramBenchmark.Run/vulkan_compile_multi_thread * Through glslang: truncated mean: 4565894.83 * Direct SPIR-V Gen: truncated mean: 1158164.10 (~75% reduction) Bug: angleproject:4889 Bug: angleproject:6210 Change-Id: I486342702977c8114e90073b97183aba115a8b2d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3115140 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
angle-autoroll 66c89b0f 2021-10-06T16:28:42 Fix and disable MSVC warnings Needed because some warnings are no longer disabled after http://crrev.com/c/3189512. Also includes https://github.com/KhronosGroup/OpenCL-Headers/pull/179, needed after clang upgrade to llvmorg-14-init-5410-gd0473681 Bug: chromium:1257173 Change-Id: I4f844aa972362c488cb6d37244439e2126f2c1c3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3210629 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi e9decf0c 2021-07-19T14:29:21 Vulkan: SPIR-V Gen: Support framebuffer fetch Bug: angleproject:4889 Change-Id: Ia75b45b5d0f6cb3b6ca8a8f8a987bb857e45ad33 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3040120 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Ian Elliott f7843da2 2021-05-27T16:41:51 Create tests for GL_EXT_shader_framebuffer_fetch extension This CL refactors most of the existing tests for the GL_EXT_shader_framebuffer_fetch_non_coherent extension, sharing shader and test code with new tests for the coherent extension. Bug: b/188095445 Change-Id: I23eac5dae9055f1c8f9eeb9c33429fd1091e68fb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2923323 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Jamie Madill 010d61f2 2021-03-24T13:08:38 Disable Framebuffer Fetch test. See issue for more details. Bug: angleproject:5792 Change-Id: I7a72dfe75a85f2bf69e3528f35c01ca69c67f8f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2785420 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov a6b16d29 2021-03-02T19:04:57 Suppress UNINSTANTIATED_PARAMETERIZED_TEST failures on Ozone We only support ES2 on Ozone, so tests that depend on ES3 or ES31 support are not instantiated there. Bug: chromium:1183147 Change-Id: Id58bcd9b44a5b9a70b5ae8115e27c44f5dc81226 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2726550 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Mohan Maiya 550f2a3e 2021-02-24T09:49:42 Vulkan: Shader support for EXT_shader_framebuffer_fetch_non_coherent Translator can accept gl_LastFragData and 'inout' variable to gain access to framebuffer attachment data. The Vulkan translator replaces it with the SubpassInput type variable. Note that this works only for the noncoherent version of the extension. Bug: angleproject:5454 Test: *EXTShaderFramebufferFetchNoncoherent*.* Change-Id: I392f84ee3ad3eb9fbd09d0b7ff83731a9a3f33f6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598060 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Mohan Maiya 907a3cee 2021-02-17T08:07:45 Vulkan: Add support for EXT_shader_framebuffer_fetch_non_coherent EXT_shader_framebuffer_fetch_non_coherent is implemented using subpass input attachments. The extension will be enabled in a follow up change that adds required changes to the Vulkan translator. Bug: angleproject:5454 Test: FramebufferFetchNonCoherentES31.*Vulkan Change-Id: Ic73c66a476c4a21db5269431166a198841f1dc0c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598059 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>