src/libANGLE


Log

Author Commit Date CI Message
Cody Northrop 596c2acf 2022-10-20T18:59:04 FrameCapture: Fix FenceSync for MEC Follow up to: https://chromium-review.googlesource.com/c/angle/angle/+/3957164 Test: MEC for Grimvalor Bug: angleproject:7758 Change-Id: Ia0895e923d9bee41bcfbff48d15bf9aa86e29d17 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3969519 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi adde4265 2022-10-19T23:33:48 Vulkan: Separate pipeline cache query and insertion In preparation for VK_EXT_graphics_pipeline_library usage, the query and insertion functions of the graphics pipeline cache are separated. This will allow the implementation using VK_EXT_graphics_pipeline_library to query the monolithic pipeline cache, and if a pipeline is not found, create it through the pipeline library caches. Bug: angleproject:7369 Change-Id: Iebf7669ae3ea95e180646198c4861cc59d67e580 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963854 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi 5c0b329e 2022-10-19T16:59:58 Vulkan: Clean up rotation spec const update Update during makeCurrent was done by invalidating the program, and then at pipeline creation time the spec const was updated. This is changed so that makeCurrent updates the spec const directly, and avoid invalidating the pipeline. Also removes spec const usage calculation, as it's unused. Bug: angleproject:7369 Change-Id: I79444ce4173c4db9c6800fb02afd9e8447a25f82 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963853 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Jamie Madill 6193274a 2022-10-10T21:00:12 Capture/Replay: Redesign in-memory call capture replay. This will allow the replay to use the call captures returned by the interpreter's parser. Bug: angleproject:7752 Change-Id: If1b281d9ce7ccfbdc23bea615e1e2258c8a029f9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963367 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Jamie Madill fd45cec3 2022-10-10T20:59:58 Entry Points: Move enum helper to registry_xml. This will make it accessible to other generators. Bug: angleproject:7752 Change-Id: I91bc9a4d6c919266ea329f66d271bf881d99d17a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963364 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Chris Dalton 01e6be3c 2022-10-19T20:42:30 Actually use EXT_shader_framebuffer_fetch_non_coherent for PLS Bug: angleproject:7279 Change-Id: I37099a917303ab41d86dbe1203183ac55229942f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3966074 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill d25911de 2022-10-10T20:59:53 Capture/Replay: Move trace fixture into util/ This will allow us to cleanly import the fixture headers outside of libANGLE. We'll need to call into the trace fixture in the trace interpreter, which will be in util/. Bug: angleproject:7752 Change-Id: I3438989db8482924272c69e78d7ac5702e510648 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963363 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Robert Mader 5b7113b6 2022-09-21T10:05:42 EGL: Implement EGL_EXT_device_drm and EXT_device_drm_render_node These extensions are needed by Exo for zwp_linux_dmabuf v4 support. Add the needed infrastructure to the EGL backend to support device queries and expose the extensions there. In the future we will want to support the extensions on Vulkan as well, however unfortunately this is not trivial, so leave it out for now. Bug: angleproject:7686 Change-Id: I0a54bf58dbaa9e87c8baac760cb9ac9027fea4c2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3964272 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jamie Madill 4bfb749f 2022-10-10T20:59:48 Capture/Replay: Move shared trace code into src/common. This will let them be accessible to the test harnesses. The trace tests interpreter will need direct access to the classes that we move in this CL. This CL also moves the GLenum utils into the common folder, where they were already used by some other tests. Bug: angleproject:7752 Change-Id: I97ad607938ef29bc316f6d40098478e002ea8128 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963362 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 5ec6f8dd 2022-10-10T20:59:42 Capture/Replay: Only inline strings. This will simplify the trace code and the parsing logic. Previously we wrote some integer data in the cpp file, e.g.: const GLenum glDiscardFramebufferEXT_attachments_0[] = {...}; glDiscardFramebufferEXT(..., glDiscardFramebufferEXT_attachments_0); Bug: angleproject:7731 Change-Id: If7924b1bf231f584f4677a438232bedc7ea9bd69 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3953338 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Jamie Madill 8403e4c5 2022-10-10T20:59:29 EGL: Resource IDs for Surface, Context and EGL Image. This will make these classes play nicely with resource maps. As these objects are used in a lot of places, and simplified C can't handle unordered_map, it's necessary to index the maps by simple packed IDs in capture/replay code. This indirection will also have increased safety as we validate EGL resource ID handle values before accessing the memory directly. Also hides some of the other EGL capture methods behind helper methods to simplify the C code and hide assignments and other complex maps. Bug: angleproject:7758 Change-Id: Ibc7bb56430d3068bd38877c9dfb011979d4ea234 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3957164 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Sungyong Choi c6390143 2022-10-12T09:57:55 Vulkan: Make compatible with GCC Resolves below warnings occurred with GCC build. 1) deperecated-copy Overriding an assignment operator without a copy constructor caused the deprecated-copy warnings. 2) unused-function 3) parenthesis Warnings occurred due to missing parenthesis around some logical expressions, add them to quiet the warnings. 4) unused variable 5) 'maybe-unused' attribute ignored Introduces 'ANGLE_MAYBE_UNUSED_PRIVATE_FIELD' macro to avoid 'attribute ignored' warning which is only occurred with GCC because GCC doesn't warn about 'unused non static data member' whereas Clang has Wno-unused-private-field. Signed-off-by: Sungyong Choi <sywow.choi@samsung.com> Bug: angleproject:7764 Change-Id: I8e7410a5ed8cb9b8f8b3202073d779fea63d6b75 Reviewed-by: Jeff Vigil <j.vigil@samsung.com> Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963830 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop 315b07b2 2022-10-19T22:06:44 FrameCapture: Fix UniformBlockBinding Follow up to: https://chromium-review.googlesource.com/c/angle/angle/+/3953334 Test: MEC for Grimvalor and Wild Arena Survivors Bug: angleproject:7731 Change-Id: I2a246c5701aaf42d77fd45487804f0f21562342e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3967870 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 7b4b56f0 2022-10-19T00:05:22 Vulkan: Missing output mask in GraphicsPipelineDesc Currently, there's some program state used in creating pipelines alongside what's in GraphicsPipelineDesc. This works because the pipeline cache lives in the program executable. With VK_EXT_graphics_pipeline_library however, we could create vertex input and fragment output partial pipelines that are independent from and are shared between multiple programs. To support this, any program state that's necessary for pipeline creation should be part of the GraphicsPipelineDesc structure. This change places the state affecting fragment output in GraphicsPipelineDesc. Bug: angleproject:7369 Change-Id: I2e48fc9da220475e1b2ed376fc947ce13489610e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963652 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi f0e3d8f9 2022-10-18T13:51:31 Vulkan: Shader component type in GraphicsPipelineDesc Currently, there's some program state used in creating pipelines alongside what's in GraphicsPipelineDesc. This works because the pipeline cache lives in the program executable. With VK_EXT_graphics_pipeline_library however, we could create vertex input and fragment output partial pipelines that are independent from and are shared between multiple programs. To support this, any program state that's necessary for pipeline creation should be part of the GraphicsPipelineDesc structure. This change places the state affecting vertex input in GraphicsPipelineDesc. A follow up change will do the same for state affecting fragment output. Bug: angleproject:7369 Change-Id: Iccf691a1597d786efa1625f7b1c22f906201f2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3964751 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi 025504b9 2022-10-17T17:03:03 Pass worker pools to image load functions In preparation for the ASTC decoder using threaded decoding. Bug: b/250688943 Change-Id: I70d669bcb57b900dbb633304182e174aec362203 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3961339 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Greg Schlomoff <gregschlom@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi b5929ac6 2022-10-17T18:06:32 Move worker pools to Display It doesn't make sense for each context to have its own set of CPU-count workers. This change also facilitates access to the thread pools where gl::Context is not available (but egl::Display is). Bug: b/250688943 Change-Id: I240353abba26c15338d59631b4179a58dfd662f5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3961334 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi fbd7d5fa 2022-10-17T17:20:09 Move thread pool classes to common/ In preparation for access by image_util files. Bug: b/250688943 Change-Id: I24777269a5071eae9a60f939635d01ed7246461f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3961454 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Greg Schlomoff 60592f3c 2022-10-13T17:58:18 Reland "Make ANGLE's Worker Pool actually pool the threads." This is a reland of commit 0a4a7ea77661703e467293bc0f6d79c95061fa76 Original change's description: > Make ANGLE's Worker Pool actually pool the threads. > > When starting a lot of short-lived tasks, this increases performance by > over 70 times on my machine. > > Old code, decoding a 16x16 ASTC texture with 8 threads: > *RESULT AstcDecoderPerfTest.cpu_time: run= 2,847,708 ns > *RESULT AstcDecoderPerfTest.wall_time: run= 1,841,014 ns > > New code: > *RESULT AstcDecoderPerfTest.cpu_time: run= 81,602 ns > *RESULT AstcDecoderPerfTest.wall_time: run= 27,088 ns > > Bug: angleproject:7757 > Change-Id: Ib643405675c50b2ed8ccd24d6caa7e57335130e1 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3953905 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Greg Schlomoff <gregschlom@google.com> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:7757 Change-Id: Ib06b37c8776dac5a2b1ea67921a9cd8687485ee2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963370 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev fec93f40 2022-10-14T00:00:00 GL: Support clip and cull distance extensions Use EXT_clip_cull_distance on OpenGL ES to expose APPLE_clip_distance; use ARB_cull_distance on OpenGL to expose EXT_clip_cull_distance. Added disableClipCullDistance OpenGL workaround. Bug: angleproject:4452 Change-Id: I458cad29c10b9d9193c5233e24bac53361ba104e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3956075 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 0d203aef 2022-10-16T10:08:01 EGL: Add ID types for egl::Surface and egl::Image. This is in preparation for using resource maps for Context, Surface and EGLImage. The map change will make it much easier to work with the trace fixture. It will also have a small benefit in safety as we will longer be casting raw pointers for these types. As these objects are used in a lot of places, and simplified C can't handle unordered_map, it's necessary to index the maps by simple packed IDs in capture/replay code. Bug: angleproject:7758 Change-Id: Ib1d19622a4f2a6f0458cc28f5bbe30bb9f349b98 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3957163 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Robert Mader 67915fb4 2022-09-19T15:08:54 Reland "Reland "EGL: Implement EGL_EXT_image_dma_buf_import_modifiers"" This is a reland of commit f53eac299fb2e0083fa386af1f04038b32faebe4 New changes: - Disable the extension on old proprietary Mali drivers Original change's description: > Reland "EGL: Implement EGL_EXT_image_dma_buf_import_modifiers" > > This is a reland of commit 1d8dce2587a23b59f911c801856372996bdb2f64 > > New changes: > - fail softly on buggy drivers (which are part of the CI) > > Original change's description: > > EGL: Implement EGL_EXT_image_dma_buf_import_modifiers > > > > This reverts Ifbb0a182171646df8161f6f42eafe2a476fea6b2 and implements > > the previously missing bits. Inspired by the corresponding Vulkan > > implementation. > > > > The extension is used by an upcoming Exo feature which was successfully > > tested with this patch, see > > https://chromium-review.googlesource.com/c/chromium/src/+/3857556 > > > > Bug: angleproject:7664 > > Change-Id: I951d1a787e1db3a77b19fcea6186b7aa0a29872f > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3904345 > > Reviewed-by: Geoff Lang <geofflang@chromium.org> > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > > Bug: angleproject:7664 > Change-Id: I732fc9dad54366553987104fa035bde2afe08ecd > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3924350 > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:7664 Change-Id: I1f4cf04eb725d789d3dadb35fb6e59b0d3e470a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3949029 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jamie Madill bb420af7 2022-10-10T20:59:24 Capture/Replay: Rewrite map buffer calls. This wraps the map calls into simple helper functions that hide the return value assignment, which in turn will simplify C parsing. Allows us to remove storing the mapped buffer ID in the params. Bug: angleproject:7731 Change-Id: I756574cc0fa3d63cce4e0103b8f2861d093de186 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3953335 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Christian Dullweber fba70715 2022-10-18T12:53:53 Revert "Make ANGLE's Worker Pool actually pool the threads." This reverts commit 0a4a7ea77661703e467293bc0f6d79c95061fa76. Reason for revert: Suspected to cause flakiness in angle_unittests on https://ci.chromium.org/p/chromium/builders/ci/Linux%20CFI?limit=200 Original change's description: > Make ANGLE's Worker Pool actually pool the threads. > > When starting a lot of short-lived tasks, this increases performance by > over 70 times on my machine. > > Old code, decoding a 16x16 ASTC texture with 8 threads: > *RESULT AstcDecoderPerfTest.cpu_time: run= 2,847,708 ns > *RESULT AstcDecoderPerfTest.wall_time: run= 1,841,014 ns > > New code: > *RESULT AstcDecoderPerfTest.cpu_time: run= 81,602 ns > *RESULT AstcDecoderPerfTest.wall_time: run= 27,088 ns > > Bug: angleproject:7757 > Change-Id: Ib643405675c50b2ed8ccd24d6caa7e57335130e1 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3953905 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Greg Schlomoff <gregschlom@google.com> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:7757 Change-Id: I35c721ca770b4a62aa135fd2f80ae597d7ea14fa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963528 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Christian Dullweber <dullweber@chromium.org>
Jamie Madill 4f85f862 2022-10-10T20:59:19 Capture/Replay: Remove references to uniform block indexes. This removes the references in captured traces to the uniform block index map. Because uniform block indexes use a double indirection, we store them in an unordered map. Moving to plain C precludes all uses for templated types, so we need to funnel the calls through a custom function. Bug: angleproject:7731 Change-Id: I35ae010b880ee669df09d750d5fb26d3baf907cd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3953334 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi b521be4c 2022-10-14T23:09:26 Vulkan: Decouple shader-set from pipeline caches In preparation for VK_EXT_graphics_pipeline_library, where different pipeline caches (for the complete pipelines and the shaders subset partial pipelines) may create pipelines from the same shader set, the pipeline caches are pulled out of ShaderProgramHelper. In an upcoming change, ProgramExecutableVk will have more than one GraphicsPipelineCache instance, both creating pipelines through the same ShaderProgramHelper. The pipeline creation methods in ShaderProgramHelper are now const. This means a thread would be able to create pipelines using an object of this class while the main thread creates other pipelines using the same object, but in a different pipeline cache. Bug: angleproject:7369 Change-Id: Ib8a76dedf1105ba9dfcad9e972157c92ba18e349 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3956944 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jiawei Shao e1da4916 2022-10-18T15:29:53 Remove unused enum CacheResult Bug: angleproject:2516 Change-Id: Ib2f4f66279ebb54e05b26559cf5759ca78020f03 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3960887 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jiajia Qin <jiajia.qin@intel.com>
Gregg Tavares 968041b5 2022-08-19T12:11:23 Metal: Optimized BufferSubData per device Adds a staging buffer path which means there are 4 paths for bufferSubData. 1. direct copy * get a pointer to the buffer * copy the new data to the buffer * if the buffer is managed, tell metal which part was updated 2. use a shadow copy * copy the data to a shadow copy * copy the entire shadow to a new buffer * start using the new buffer 3. use a new buffer * get a new buffer (or unused) * put the new data in the new buffer * blit any unchanged data from the old buffer to the new buffer * start using the new buffer 4. use a staging buffer * get a staging buffer * put the new data in the staging buffer * blit from the staging buffer to the existing buffer. Further, there are 3 types of memory storage modes. Managed, Staged, Private. Based on the GPU type different storage modes and different paths in different sitatutions are more performant. So, add feature flags to select paths by GPU. Bug: angleproject:7544 Change-Id: I741dd1874201043416374194bd2001ded8dbd9b4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3842641 Reviewed-by: Kyle Piddington <kpiddington@apple.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Quyen Le <lehoangquyen@chromium.org> Commit-Queue: Gregg Tavares <gman@chromium.org>
Shahbaz Youssefi 09b079bb 2022-10-14T14:28:10 Vulkan: Move pipeline subset out of pipeline desc This way, the same pipeline desc can be used to query multiple caches with different subsets. This design requires the pipeline cache to be templated, while the previous design required the desc to be copied (so the subset bits would be different). Bug: angleproject:7369 Change-Id: Id3fd92e6f9b059069952ff092a5c867e79287604 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3956940 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi eaa71709 2022-10-14T11:47:07 Vulkan: s/ContextVk/Context in pipeline creation With VK_EXT_graphics_pipeline_library, pipeline creation may happen on a thread. This change prepares the interface such that only a vk::Context is needed, instead of ContextVk. Bug: angleproject:7369 Change-Id: Ib7e9e7e140e27a4af71bffee069c88e3d7f47dfa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3956935 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 2265e37b 2022-10-12T09:27:16 Capture/Replay: Auto-generate EGL capture code. Replaces the custom code in the EGL stubs. Skips a few "Get" entry points because this CL doesn't implement pointer capture like we do for all the GL entry points. Includes a new state in the AttributeMap that indicates which type of attribute values we used when initializing the map. Bug: angleproject:4035 Change-Id: I272eac5e4068602ce710ef66c9a1dce5387943a5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3949911 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 7c4dc253 2022-10-12T08:38:46 Capture/Replay: Clean up EGL capture. This switches the EGL capture types to ANGLE-casted pointers since that's what we receive in the capture layer. Note that even if the capture layer were used as a pure layer, not an EGL implementation, we'd still have these types for state tracking. This also prefixes each EGL class in the entry points with the egl namespace for consistency and for simplifying the ParamType code. Required changing to non-const gl::Context * in a few places. Also changes the gSurfaceMap to be indexed by the raw pointer value, which cleans up the code somewhat. Bug: angleproject:4035 Change-Id: Id800c1ba25e5819ac7ea1df8aab806bc393fe192 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3949910 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Greg Schlomoff 0a4a7ea7 2022-10-13T17:58:18 Make ANGLE's Worker Pool actually pool the threads. When starting a lot of short-lived tasks, this increases performance by over 70 times on my machine. Old code, decoding a 16x16 ASTC texture with 8 threads: *RESULT AstcDecoderPerfTest.cpu_time: run= 2,847,708 ns *RESULT AstcDecoderPerfTest.wall_time: run= 1,841,014 ns New code: *RESULT AstcDecoderPerfTest.cpu_time: run= 81,602 ns *RESULT AstcDecoderPerfTest.wall_time: run= 27,088 ns Bug: angleproject:7757 Change-Id: Ib643405675c50b2ed8ccd24d6caa7e57335130e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3953905 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Greg Schlomoff <gregschlom@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao e8f9355c 2022-10-13T16:51:32 Vulkan: Add forceWaitForSubmissionToCompleteForQueryResult flag Add forceWaitForSubmissionToCompleteForQueryResult feature flag and enable it for ARM. Also force host wait if async submission is enabled. Bug: b/253522366 Change-Id: Ie2d7373930f1a2b3fc761d2f8d2df8fa84983c54 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3954044 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi 19fb11b6 2022-10-14T11:12:20 Vulkan: Merge warmed up compute cache into renderer It was done for graphics, but was accidentally missing for compute. Bug: angleproject:5881 Bug: angleproject:7629 Change-Id: I28a4c2e38b07b08e1636b443f2c0963130965ebb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3956496 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi 8e644365 2022-10-11T11:47:55 Vulkan: Rearrange state specification for pipeline libraries This change splits pipeline state setup based on whether the complete pipeline is being created or only a subset of it. However, no partial pipelines are yet created, that will be done in a following CL. Bug: angleproject:7369 Change-Id: Ife34c4bc39641ab8f06e7c78502f95a6bc16d15d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3949917 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi 94b45181 2022-10-12T14:54:14 Vulkan: Rearrange graphics pipeline desc bits In preparation for use of VK_EXT_graphics_pipeline_library, the pipeline state is split in three contiguous regions: - Vertex input - Pre-rasterization and fragment stages ("Shaders" for short) - Fragment output There is some state that affects both Shaders and Fragment output, which is split and placed in between the two. This will allow the hash and compare functions to eventually access each of those pipeline subsets as a contiguous piece of memory. Bug: angleproject:7369 Change-Id: Iedc4cf15ed6c7fed6ba93039889fbf5dd191e041 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3949914 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuxin Hu c22f091d 2022-09-29T18:58:33 Replace Hard-Coded egl image attribs This change is adapted from https://crrev.com/c/3838866 Added two hash maps to track below information: EGLImage* --> EGLint* attrib TextureID --> EGLImage* During the CaptureShareGroupMidExecutionSetup, when we iterate through all the textures the app created, if the texture is bound to External target, we will refer to the hash map TextureID --> EGLImage* to find the EGLImage* pointer, and then use the result as the key to refer to the other hash map EGLImage* --> EGLint* attrib to find the attributes used to create that EGLImage object. We can then use the attributes to populate eglCreateImage or eglCreateImageKHR calls in the trace calls. Bug: angleproject:7570 Change-Id: I729de4ddea59242ccbe6243e036451f290545185 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3928212 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Charlie Lao 1119dfbd 2022-10-03T16:47:29 Vulkan: disable supportsHostQueryReset feature if func is null This is try to clean up a old fix for chromium security bug chromium:1273344 that in some bots we are seeing supportsHostQueryReset feature enabled but vkResetQueryPoolEXT pointer is null. We fixed that in crrev.com/c/3313382 that added a check of vkResetQueryPoolEXT AND supportsHostQueryReset feature flag. This CL disables the feature flag if vkResetQueryPoolEXT pointer is null so that other places we only need to check feature flag. Bug: b/250706693 Change-Id: I2d9f9726f081e21a37bbb0bb205003c390f2d32c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3929236 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com>
Shahbaz Youssefi 135022e4 2022-10-11T00:03:11 Vulkan: Create robust pipelines based on context state Previously, pipelines were made robust based on whether any context in the share group has so far been made robust. This means that pipelines created on non-robust contexts would still be compiled as robust. Inefficiency aside, this was buggy because robustness was not part of the pipeline cache key, so if a pipeline was created as non-robust first, then recreated in a robust context, it would reuse the non-robust variant. With VK_EXT_pipeline_protected_access, a similar situation arises for context protected-ness. However, it is incorrect in that case to create pipelines as protected unnecessarily. This change makes pipeline robustness a part of the pipeline cache key, in preparation for protectedness to be added similarly. Compute programs may now generate multiple pipelines as a result too. Bug: angleproject:7629 Change-Id: Ie95f10eff878f8c8b221c1018da44385c7aad15e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3943534 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 9b5fff82 2022-10-05T21:56:00 Vulkan: Emulate shader stencil export for MSRTT The MSRTT emulation code had one corner case issue that could lead to performance and memory inefficiencies. That is when stencil needs to be unresolved and VK_EXT_shader_stencil_export is not supported. This change adds a path to emulate VK_EXT_shader_stencil_export and removes this inefficiency. This should help Chromium on older Android devices that lack both this and the recent VK_EXT_multisampled_render_to_single_sampled extensions. Chromium frequently breaks the render pass (crbug.com/1336981), which easily leads to this situation. Bug: angleproject:4836 Change-Id: Ifceec43f7f3807b7e32f4b379edcd4351ae76414 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3935892 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Charlie Lao b1d699da 2022-10-04T15:27:51 Vulkan: Don't wait QueueSerial if supportsHostQueryReset enabled In QueryVk::getResult() we are waiting for query's queueSerial to complete, even though QueryHelper::getUint64Result() we are also using VK_QUERY_RESULT_WAIT_BIT to ask vulkan driver to wait for result. Based on the comment, the reason for that queueSerial wait is because "its reset command may not have been performed by the GPU yet.". But if mFeatures.supportsHostQueryReset is enabled, we use vkResetQueryPoolEXT to reset the query, and this host reset is immediate, so there is no need to wait for queueSerial in this case. This CL disables the wait when host reset is enabled and relies on vkGetQueryPoolResults(VK_QUERY_RESULT_WAIT_BIT) to do actual wait. This should help performance on immediate renderer where the query result might be available before renderpass completion. Bug: angleproject:3965 Change-Id: Ibe61c289f1f3d1312e79ac80a2b5de23b90ef87c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3935444 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Ian Elliott <ianelliott@google.com>
Charlie Lao 76f377c5 2022-06-17T16:05:16 Vulkan: Break renderpass when switch from query to non-query getQueryResult will wait for query result to be available, which means a potential CPU bubble if the result is not yet available. On tiler GPUs it will at least wait for renderpass to complete. Usually query enabled draws are very tiny (usually just draw a point to see if it is occluded or not), and query disabled draws are expensive. Some apps do issue a glFlush when switch from query draw to non-query draw, but app like dead_by_daylight does not issue such flush. In order to reduce the bubble, this CL ends renderpass and issue a flush when we switch from query enabled draws to non-query enabled draw so that the result will be available much earlier, this reduce the CPU bubble. This result in dead_by_daylight frame time improves from 5.45ms to 3.5ms (35% improvement). Bug: b/250706693 Change-Id: Ia3a32a9fb336e6f256809b3cad83f61a45415fb1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3931739 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Charlie Lao <cclao@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Brian Sheedy 219af5de 2022-10-11T18:05:47 Revert "Reland "EGL: Implement EGL_EXT_image_dma_buf_import_modifiers"" This reverts commit f53eac299fb2e0083fa386af1f04038b32faebe4. Reason for revert: Suspected of causing problems on kevin devices again. Original change's description: > Reland "EGL: Implement EGL_EXT_image_dma_buf_import_modifiers" > > This is a reland of commit 1d8dce2587a23b59f911c801856372996bdb2f64 > > New changes: > - fail softly on buggy drivers (which are part of the CI) > > Original change's description: > > EGL: Implement EGL_EXT_image_dma_buf_import_modifiers > > > > This reverts Ifbb0a182171646df8161f6f42eafe2a476fea6b2 and implements > > the previously missing bits. Inspired by the corresponding Vulkan > > implementation. > > > > The extension is used by an upcoming Exo feature which was successfully > > tested with this patch, see > > https://chromium-review.googlesource.com/c/chromium/src/+/3857556 > > > > Bug: angleproject:7664 > > Change-Id: I951d1a787e1db3a77b19fcea6186b7aa0a29872f > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3904345 > > Reviewed-by: Geoff Lang <geofflang@chromium.org> > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > > Bug: angleproject:7664 > Change-Id: I732fc9dad54366553987104fa035bde2afe08ecd > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3924350 > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:7664 Change-Id: I2ffc508ea4cc9e95055084fed4f63a52d9afdbd2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3946903 Auto-Submit: Brian Sheedy <bsheedy@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Gert Wollny f2785e41 2022-10-10T08:21:36 capture/replay: validate after resetting unpack alignment Otherwise validation will fail, because we try to validate the temporary set alignment against the alignment that would be active without MEC. Bug: angleproject:7564 Bug: angleproject:7180 Change-Id: I40cac84be122c779b9beba39f155567f9edbee75 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3936631 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Cody Northrop 5bafe449 2022-10-05T20:09:23 FrameCapture: Create default context reset calls Add support for emitting default reset calls for some entrypoints when recording a capture from the beginning. Test: Lineage 2 Revolution MEC Bug: angleproject:7741 Change-Id: I8e4e1184f3e3b68527a65283c459a43d135e95b4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3938442 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Tiago Vignatti cad7979e 2022-10-07T11:08:14 Metal: Build fix TextureMtl code Changes introduced in CL https://crrev.com/c/3915180 caused an issue when building Metal with TARGET_OS_SIMULATOR enabled. This fixes that and a minor formatting issue that presubmit hook caught). Test: build ANGLE with Metal renderer enabled on iOS. Bug: angleproject:7573 Change-Id: I08baf64e3d37b97af76e9e04188836ed253d34b2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3939217 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Chris Dalton 7c1ddff3 2022-10-06T18:28:45 Include Apple1 in the Metal framebuffer-fetch impl of PLS Framebuffer fetch was mistakenly limited to the Apple2+ GPU families, but Apple1 also supports programmable blending. Bug: angleproject:7279 Change-Id: Ia5a63ac1cb6462a6299db12bfb67fea12f15bb8b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3935458 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Jamie Madill ad2fbc7d 2022-10-07T14:35:49 Roll third_party/OpenGL-Registry/src/ 11d7b7bae..5bae8738b (5 commits) Also removes our copy of gl.xml now that upstream patches are merged. https://chromium.googlesource.com/external/github.com/KhronosGroup/OpenGL-Registry/+log/11d7b7baebfc..5bae8738b23d $ git log 11d7b7bae..5bae8738b --date=short --no-merges --format='%ad %ae %s' 2022-09-29 sunserega2 [xml] Fixes for defined but unused enum groups (#520) 2022-09-29 julius_hager Added group PixelType to multiple-enums (#529) 2022-09-29 gnl021 EXT_separate_depth_stencil: Explicit unsupported cases (#531) 2022-09-29 jmadill Add enum groups for ANGLE use cases. (#538) 2022-09-29 syoussefi Clarify that PLS doesn't allow leak from outside framebuffer (#540) Created with: roll-dep third_party/OpenGL-Registry/src Bug: angleproject:6461 Change-Id: I6b7d8471144babe5cdd465c64574804f85c9e4f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3937049 Commit-Queue: Jamie Madill <jmadill@chromium.org> Auto-Submit: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya dbbfdd22 2022-10-06T13:39:20 Vulkan: Bug fix in GL_QCOM_shading_rate Don't initialize "vkCmdSetFragmentShadingRateKHR" before creating VkDevice as it leads to a nullptr assertion in RendererVk::canSupportFragmentShadingRate. Separate out instance and device function pointer initializations. Bug: angleproject:7172 Change-Id: I55b5b41313857a2861a197f17d7f88b71aec907f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3938443 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Dean Jackson 592b60fb 2022-10-06T12:34:48 Remove unnecessary fprintf of Metal shader output type Bug: angleproject:7740 Change-Id: I487913df1d0f29302ac6e955c27ee7cf4f34a73b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3934692 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Amirali Abdolrashidi c19ec948 2022-08-23T10:43:59 Vulkan: Implement imageless framebuffers * Added the attachment image and create info objects to be used for imageless framebuffers created in getFramebuffer(). * New helper class for framebuffers in RenderPassCommandBufferHelper: MaybeImagelessFramebuffer, which includes a framebuffer object, if the framebuffer is imageless, and the image views. This is to make sure that the args for render pass begin info will be correctly set up according to the status of the used framebuffer. * Refactored the collection of attachments in getFramebuffer() into a new function, getAttachmentsAndImagesFromRenderTargets(). It also returns their corresponding ImageHelper* objects used to create the framebuffer (from their image properties). * New struct: RenderTargetInfo; which keeps track of render targets and whether resolve image should be used for the render pass in the form of the enum class RenderTargetImage. * Added a new arg to getFramebuffer(): resolveRenderTargetIn; to use when there is a valid resolveImageViewIn. * Without using the framebuffer cache, we would require to handle the framebuffer destruction by adding it to the garbage instead of releasing it. For example, FramebufferVk::destroy() now adds mCurrentFramebuffer to the garbage. * Added new framebuffer unit tests. * Added tests where two textures with different attributes are bound to the same framebuffer before drawing, one after another. * Added test where a blit occurs from a multisample texture into a non-zero level of a resolve texture, each bound to a separate FBO. * Added a new perf test to compare performance for enabled imageless framebuffers vs disabled. (Credit: cclao) Bug: angleproject:7553 Change-Id: Iacdbd73aaa01cbb0e37abf01ae4892bdfdd4b12f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3827644 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Jamie Madill 4ebdac79 2022-08-29T16:25:46 Vulkan: Ensure we sync the draw FB before beingQuery. Bug: chromium:1354271 Change-Id: I5fe3649d9d39de37d0a59c80a4f31a17d1a72838 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3863145 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Chris Dalton 2d31fe98 2022-09-22T21:04:22 Implement PLS on Apple Silicon Implements a subset of EXT_shader_framebuffer_fetch in the Metal translator that is sufficient to support pixel local storage. Metal's "programmable blending" feature is available on all Apple family GPUs beginning with version 2. Support for non-Apple GPUs will come later via readWrite textures, which can also be coherent by annotating them with [[raster_order_goup(0)]]. Bug: angleproject:7279 Change-Id: Ic74f6c0d21e87eb919e1f487163388d08d126857 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3916794 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Gregg Tavares <gman@chromium.org>
Robert Mader f53eac29 2022-09-19T15:08:54 Reland "EGL: Implement EGL_EXT_image_dma_buf_import_modifiers" This is a reland of commit 1d8dce2587a23b59f911c801856372996bdb2f64 New changes: - fail softly on buggy drivers (which are part of the CI) Original change's description: > EGL: Implement EGL_EXT_image_dma_buf_import_modifiers > > This reverts Ifbb0a182171646df8161f6f42eafe2a476fea6b2 and implements > the previously missing bits. Inspired by the corresponding Vulkan > implementation. > > The extension is used by an upcoming Exo feature which was successfully > tested with this patch, see > https://chromium-review.googlesource.com/c/chromium/src/+/3857556 > > Bug: angleproject:7664 > Change-Id: I951d1a787e1db3a77b19fcea6186b7aa0a29872f > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3904345 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:7664 Change-Id: I732fc9dad54366553987104fa035bde2afe08ecd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3924350 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 13195f8a 2022-10-05T11:17:35 Vulkan: Fix missing input attachment usage on MSRTT When combined with advanced blend (or framebuffer fetch for that matter), MSRTT attachments could be used as input attachments. This change fixes the missing usage bit. Bug: angleproject:7739 Change-Id: I2190e4a6e534e120357dd68189fb9de07b6c54fa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3936444 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Chris Dalton b5514bb2 2022-09-21T20:47:00 Support pixel local storage on ES 3.0 Now that the application-facing API is implemented, we don't have to rely on ES 3.1 anymore. Expose and test the extension on ES 3.0. Bug: angleproject:7279 Change-Id: I5635620b9088201c20bafd283813092a329225d6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3915327 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Chris Dalton <chris@rive.app> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Hailin Zhang 5ddf631c 2022-10-04T11:17:45 Vulkan: Choose host visiable device local based on heap size. set preferDeviceLocalMemoryHostVisible based on the host visiable device local and device local heap memory heap size. Bug: b/246909451 Change-Id: I1e63931baceda02396b0eb8f24671949920ac2a5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3934479 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Hailin Zhang <hailinzhang@google.com> Reviewed-by: Mateusz Przybylski <mprzybyl@google.com>
Shahbaz Youssefi 391644f4 2022-08-24T14:59:21 Vulkan: Use VK_EXT_rasterization_order_attachment_access When available, this extension makes coherent framebuffer fetch / advanced blend official. Bug: angleproject:7604 Change-Id: Ifc552a0fa7a3612a3fc568feb61d6dd348e856ff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3855698 Reviewed-by: Chris Dalton <chris@rive.app> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Le Hoang Quyen d64c54e3 2022-09-26T21:25:18 D3D11: Make DebugAnnotator11 thread safe. Bug: chromium:1366778 Change-Id: I50662895be8ec40de4ded8c4f84bde59ae40e98b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3917936 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
Amirali Abdolrashidi 06d0389a 2022-10-04T19:26:48 Remove leftover code regarding render pass serial * Removed the render pass serial reset in the function where the current framebuffer is released. (left over from a prior CL.) Bug: angleproject:7553 Change-Id: I61b4a12ac8957f6e1dcd4bf0f4e233c068736dff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3931901 Auto-Submit: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 7d10d160 2022-09-29T23:31:40 Vulkan: Fix VK_EXT_pipeline_robustness vs compute Robustness was not specified for compute. Bug: angleproject:5845 Change-Id: I3f3b1e90cc4e965ff4cfcd569587caa952e5eaa2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3924871 Reviewed-by: Alexis Hétu <sugoi@chromium.org> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 5d7c4eca 2022-10-02T02:27:27 Vulkan: Don't flush depth/stencil on color blit When syncing the read framebuffer for blit, deferred clears are picked up for the attachments that are not being synced. They are then redeferred so a future command would pick them hopefully as loadOp. This change improves the frame time of Pretty Derby on Pixel 6 by ~23%. Bug: angleproject:7727 Change-Id: Ie7d84c58315cd09204e5229f1ec73605d5a7f639 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3931973 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 1d73bad5 2022-10-01T22:50:48 Vulkan: Fix reclear of rendered-to depth/stencil An optimization drops re-clears of images to the same value. When a render pass does: - clear - render - store the "cleared" status of the image was removed because at the end of the render pass, the image no longer has the cleared value. However, this was mistakenly only done for color, but should have been done for depth and stencil as well. Bug: b/239430388 Change-Id: Ib99e0df460eaa82ce87b593276abd9b07f0a8375 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3931972 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Ian Elliott 34977cc5 2022-10-03T11:55:28 Supress vkDestroySemaphore-semaphore-01137 Bug: angleproject:7729 Change-Id: If93b6411bed472417d62f8e63682991a493dc526 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3929750 Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Roman Lavrov <romanl@google.com> Auto-Submit: Ian Elliott <ianelliott@google.com>
Chris Dalton a7dc51f2 2022-10-01T08:49:11 Add a framebuffer fetch implementation of PLS The framebuffer fetch implementation works by attaching PLS backing textures to the framebuffer, and then rewriting PLS uniforms as "inout" fragment variables. The compiler's existing machinery takes it from there and makes it work on GL and Vulkan, and soon Metal. EXT_shader_framebuffer_fetch is now the preferred backend for pixel local storage, but we also use EXT_shader_framebuffer_fetch_non_coherent if shader images can't be coherent. This is especially interesting for Vulkan, since noncoherent framebuffer fetch is possible without any extensions. Bug: angleproject:7279 Bug: angleproject:7683 Bug: angleproject:7684 Bug: angleproject:7724 Change-Id: I33f3b2c6df9a5709969d9165c448ea71b096c9e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3900142 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Hailin Zhang 836cc5e2 2022-09-09T22:06:22 Vulkan: add etc to bc compute transcoding. use compute shader to transcode etc format to bc format. Bug: b/243398683 Change-Id: Idbd0820a2df8d92fe690055dae2933bc559e9bfd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3888501 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Hailin Zhang <hailinzhang@google.com>
Cody Northrop f7a5cce1 2022-09-29T10:42:26 Tests: Add Life is Strange trace Test: angle_perftests --gtest_filter="*life_is_strange*" Bug: angleproject:7711 Bug: angleproject:7723 Change-Id: I83d9d58270a80435dba8991875b20a215372334f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3928205 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Chris Dalton a81679bc 2022-09-26T23:56:34 Support EXT_shader_framebuffer_fetch on GLES All the frontend functionality for EXT_shader_framebuffer_fetch is already present, but only supported on Vulkan. This change wires it up for the native GLES backend as well. Bug: angleproject:7279 Bug: angleproject:7703 Change-Id: Ie1fce79e08a78662c8af65d33f3d8417c96cf58e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3920577 Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Brian Sheedy 0a288f29 2022-09-30T18:25:04 Revert "EGL: Stop announcing EGL_EXT_image_dma_buf_import_modifiers" This reverts commit 11ac69d0a4942a0bbbf71193c10a39eb054d1448. Reason for revert: Breaks ChromeOS tests crbug.com/1368287 Original change's description: > EGL: Stop announcing EGL_EXT_image_dma_buf_import_modifiers > > The extension was enabled in > https://chromium-review.googlesource.com/c/angle/angle/+/2128190 without > implementing the required functions, `DisplayImpl::queryDmaBufFormats` > and `DisplayImpl::queryDmaBufModifiers`, resulting in crashes. > > Bug: angleproject:7664 > Change-Id: Ifbb0a182171646df8161f6f42eafe2a476fea6b2 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3902321 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:7664 Change-Id: Idfeecffc18bebfbda5256ad510ee0c60aeb1338f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3930547 Reviewed-by: Roman Lavrov <romanl@google.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Brian Sheedy <bsheedy@chromium.org> Reviewed-by: Roger Tawa <rogerta@chromium.org>
Cody Northrop 63c54da3 2022-09-29T22:32:54 FrameCapture: Fix default uniform sampler base loc Follow up to: https://chromium-review.googlesource.com/c/angle/angle/+/3928253 Samplers are handled specially above the previous changes. Test: Darkness Rises MEC Bug: angleproject:7719 Bug: angleproject:7720 Change-Id: I72848eaced4da379fe724aebf61a75616f614e1c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3929328 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Roman Lavrov <romanl@google.com>
Constantine Shablya ff7aa214 2022-09-29T19:56:28 GL_PALETTE* sampling Implement GL_PALETTE* formats by decoding them into a R8G8B8A8_UNORM image at load time. Test: angle_end2end_tests --gtest_filter="PalettedTextureTest.*" Bug: angleproject:7599 Bug: angleproject:7688 Bug: angleproject:7710 Change-Id: I94d51e2c480fcdd39f1a0ad241b311d3b4de1579 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3863251 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Constantine Shablya <constantine.shablya@collabora.com>
Yuxin Hu 053c6a06 2022-09-20T15:17:28 Vulkan: Add more tests for attachmentless framebuffer This CL adds below test scenarios for attachmentless framebuffer: 1. Create first attachmentless framebuffer with larger size, and create second attachmentless framebuffer with smaller size. 2. Create an attachmentless framebuffer with smaller size, and grow its default width and height. 3. Create an attachmentless framebuffer with larger size, and shrink its default width and height. 4. Create an attachmentless framebuffer with larger size, given it an attachment with a medium size, and shrink its default width and height. This CL also splits the test failure bugs on different vendor and renderer to different bug tickets. This CL addresses a bug on vulkan backend: only skip onFramebufferChange() if the framebuffer has at least one attachment, and mCurrentFramebufferDesc equals to priorFramebufferDesc. Otherwise in test scenario 2 and 3 above, we will use the wrong scissor size, because the FramebufferDesc remains the same before and after changing the default width and height, and we will wrongly skip onFramebufferChange() where we update scissor area to match with the new default width and height. Bug: angleproject:7666 Bug: angleproject:7697 Bug: angleproject:7699 Bug: angleproject:7700 Bug: angleproject:7705 Change-Id: Ieb143b27f8c1a229dab8f43d0a16e3e871185941 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3908332 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop a047af14 2022-09-29T16:12:28 Disable NV_framebuffer_blit during capture This extension is only available on ANGLE and Nvidia. Disabling the extension allows for a more portable trace. Test: Life is Strange MEC Bug: angleproject:7711 Change-Id: I11d941af97a504386a53a6ba7ac4008b1f4300a1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3928208 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop 6dc30c00 2022-09-29T08:41:53 FrameCapture: Reset default uniform arrays If an application has updated a single uniform in the middle of an array, we need to emit the Reset call for the entire array. We don't track Reset calls per individual location in an array. Test: Life is Strange MEC Bug: angleproject:7711 Change-Id: Idec991ad060eb5e12272713a58aa921c5912f1cc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3928253 Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi d524157f 2022-09-28T23:16:02 GLES1/Vulkan: Don't validate SPIR-V as VVL does the same Improves TexCombine runtime by ~15%. Bug: angleproject:6644 Change-Id: I01f580fef0caa91ebf600cfc0bbbeca1aa20eb06 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3926037 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi 1abeeaae 2022-09-28T12:22:58 GLES1/Vulkan: Remove double SPIR-V validation assertion The SPIR-V transformation is validated on program link because many tests link programs but don't draw with them. This helps catch bugs. However, GLES1 programs are always created right before draw, so the SPIR-V transformer will definitely be run on them. The link-time validation is thus unnecessary. This change disables the latter on GLES1, which cuts down the TexCombine test run time by about 10%. Bug: angleproject:6644 Change-Id: Idb9d229fc08bf746f933fa8924fa67e5426f87a7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3926036 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Johannes Kauffmann 1b908d0a 2022-09-28T00:43:13 HandleAllocator: add missing <limits> include The existing <algorithm> and <functional> includes are not specified to also include <limits>, which is required for std::numeric_limits<T>::max and friends. Bug: None Change-Id: I4cee038b652a887ef5cdf82098fbc62bd4fc7483 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3924334 Auto-Submit: Johannes Kauffmann <johanneskauffmann@hotmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Peng Huang 5c995ef3 2022-09-28T08:06:13 Revert "EGL: Implement EGL_EXT_image_dma_buf_import_modifiers" This reverts commit 1d8dce2587a23b59f911c801856372996bdb2f64. Reason for revert: causes test failures on chromeos kevin bot b/248404756 Original change's description: > EGL: Implement EGL_EXT_image_dma_buf_import_modifiers > > This reverts Ifbb0a182171646df8161f6f42eafe2a476fea6b2 and implements > the previously missing bits. Inspired by the corresponding Vulkan > implementation. > > The extension is used by an upcoming Exo feature which was successfully > tested with this patch, see > https://chromium-review.googlesource.com/c/chromium/src/+/3857556 > > Bug: angleproject:7664 > Change-Id: I951d1a787e1db3a77b19fcea6186b7aa0a29872f > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3904345 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:7664,b/248404756 Change-Id: Ib46d3ca76ce575be593dfa5322315621fb006158 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3924955 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Amirali Abdolrashidi b9cd542e 2022-09-15T17:31:35 Vulkan: Use serial to check which FBO has open RP In preparation for the scenario where an imageless framebuffer is shared, checking whether the started render pass belongs to a certain framebuffer is tweaked to use a serial-based method instead of checking the framebuffer handle. * Added the last render pass serial to ContextVk, which increments every time a render pass begins. The serial is also stored in the FramebufferVk object invoking it. * Added the type RenderPassSerial for this purpose. * Serials are generated through a serial factory in ContextVk. * Updated hasStartedRenderPassWithSerial() to match the serials instead of the handles. * Removed the getFramebuffer() calls from FramebufferVk and UtilsVk that are now unused. Bug: angleproject:7553 Change-Id: Id60dcbf7973558d35e55ff4af4c71e50c6853bba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3897970 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi 01285f16 2022-09-26T23:19:28 Remove Platform.h Overloaded name. Causing trouble with gles1's platform.h on case-insensitive file systems despite the different case. Bug: angleproject:3408 Change-Id: Icc1644a4c6a9c9076a2bbafbfb1d6eac578b731a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3920895 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 163e56e4 2022-09-20T00:40:55 Allow feature overrides to end in * (wildcard) Makes it easier to apply overrides to features with long names. Also works around Android's limit of 92 characters for debug properties. Bug: b/238024366 Change-Id: I8f417287f92b2439de1a7b7d6abbaf9e61b405e8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3906222 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Geoff Lang 818a8ace 2022-09-26T19:50:03 Revert "Vulkan: Add missing part for supporting GBM Platform type" This reverts commit 43354edbe671af534c469089066e0259731563c7. Reason for revert: Fails on ChromeOS bots in Chrome. Original change's description: > Vulkan: Add missing part for supporting GBM Platform type > > Adds missing part to support GBM platform type. > > Bug: angleproject:7481 > Signed-off-by: Sungyong Choi <sywow.choi@samsung.com> > Change-Id: I46caa4a958274de1111b30b144df592ac4cdcf6e > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3736243 > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jeff Vigil <j.vigil@samsung.com> > Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com> Bug: angleproject:7481 Bug: angleproject:7696 Change-Id: I76fa4e38ea1f866575bc38725c23b697d17b53a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3918856 Reviewed-by: Geoff Lang <geofflang@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Geoff Lang 25bad36c 2022-09-23T13:23:57 Metal: Remove unpackLastRowSeparatelyForPaddingInclusion This speculative fix did not work. Bug: angleproject:7573 Change-Id: I345db1746f8725d82420aabffb37c8dd01230a34 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3915182 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Gregg Tavares <gman@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Geoff Lang 70e5e90f 2022-09-23T13:17:34 Metal: Avoid locking IOSurfaces in glReadPixels on AMD. The AMD driver tends to crash when locking IOSurfaces. Avoid this by using the copyIOSurfaceToNonIOSurfaceForReadOptimization feature to do a texture-texture copy before reading back data to the CPU. This is a *speculative* fix due to seeing crashes in the ClientLockIOSurface function in the AMD driver. Bug: angleproject:7573 Change-Id: Ia120f2a96eed65431b5f8a99cf1da7d7e85da639 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3915181 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Gregg Tavares <gman@chromium.org>
Geoff Lang 2aa52da7 2022-09-23T13:15:44 Metal: Upload IOSurface data with staging buffers on AMD Crashes have been seen in the AMD driver when locking IOSurfaces. Avoid this by always using a staging buffer and doing a GPU-GPU copy for uploading client side data to IOSurfaces. Bug: angleproject:7573 Change-Id: I4d981a24554a755a7248199699b486d98cbad83d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3915180 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Gregg Tavares <gman@chromium.org>
Shahbaz Youssefi f4389797 2022-09-23T15:36:13 GLES1/Vulkan: Enable GL_EXT_multisample_compatibility ... with a non-conformant implementation. This unblocks some tests that unnecessary call glDisable(GL_MULTISAMPLE) and trip up on it generating validation error. Bug: angleproject:7676 Bug: angleproject:7657 Bug: angleproject:3863 Bug: angleproject:3864 Change-Id: Iaebbea66da81fc9a30bf7a87deed7cf88ff38476 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3891546 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi bc447ca4 2022-09-20T22:38:16 GLES1: Move lighting to vertex shader In the spec, lighting is done as part of vertex processing, and results in a new vertex color. Texturing is applied later. ANGLE however did lighting in the fragment shader. With this change, lighting is moved to the vertex shader. This fixes rendering of lit objects, as interpolation is done linearly or flat between the vertices per spec, instead of done precisely per fragment. While typically this is inferior to per-fragment lighting, it's what the spec mandates. On the dr_driving trace, this reduces the render pass time by ~20% on Pixel 6. Bug: angleproject:6201 Bug: angleproject:6644 Change-Id: I10e37df8c56c22d520a738af8f8630bc6a01ca7f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3906394 Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Sungyong Choi 43354edb 2022-06-30T10:18:41 Vulkan: Add missing part for supporting GBM Platform type Adds missing part to support GBM platform type. Bug: angleproject:7481 Signed-off-by: Sungyong Choi <sywow.choi@samsung.com> Change-Id: I46caa4a958274de1111b30b144df592ac4cdcf6e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3736243 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jeff Vigil <j.vigil@samsung.com> Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Shahbaz Youssefi ab255263 2022-09-20T22:37:00 GLES1: Fix material color update when COLOR_MATERIAL According to the spec, when COLOR_MATERIAL is enabled, the material ambient and diffuse colors are updated on every glClear* call. Additionally, setting these values individually is ineffective when COLOR_MATERIAL is enabled. Bug: angleproject:6201 Change-Id: I846513c983254a043ea83101c0f83025c12b4364 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3906392 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Dan Glastonbury d2a58f00 2022-09-08T14:19:21 EGL: Implement eglCopyMetalSharedEventANGLE Add eglCopyMetalSharedEventANGLE function to the ANGLE_metal_shared_event_sync extension. This brings the extension on par with the EGL_ANDROID_native_fence_sync extension. eglCopyMetalSharedEventANGLE allows for copying the Metal event object from EGLSync objects implemented by the ANGLE Metal renderer. This function follows Objective-C convention for "copy" methods and increases the retain count of the Metal event object. The EGL API user is thus responsible for ensuring to release the returned object to avoid memory leaks. Test: angle_end2end_tests --gtest_filter=EGLSyncTestMetalSharedEvent.* Bug: angleproject:7561 Change-Id: I8c35b559014b85cb8c6a0e76ac2ab7891eed5da0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3881423 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Quyen Le <lehoangquyen@chromium.org>
Gregg Tavares 7d712c47 2022-09-08T09:42:10 Metal: ProvokingVertexHelper stop using a separate cmdbuffer This simplifies the code. Without this you always need to be aware that the provoking vertex helper's command buffer might have commands in it that need to be committed before starting other operations. Bug: angleproject:7643 Change-Id: I1c73d451c12c268ecbdb6a1cd63a77c291949ef9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3884275 Commit-Queue: Gregg Tavares <gman@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Kyle Piddington <kpiddington@apple.com>
Brian Ho 3cfea56c 2022-09-21T13:55:02 Avoid ANGLE formats on dmabuf-backed EGL images DrmFourCCFormatToGLInternalFormat can return ANGLE-internal formats that are only used on the Vulkan backend. This CL adds special logic to dmabuf-backed EGL images to convert those formats back to GL_RGB8. Bug: chromium:1353374 Change-Id: Id270d3d47d289620730c522d2e29d7fc67dc8321 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3911355 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Brian Ho <hob@chromium.org>
Constantine Shablya e82eaff9 2022-09-22T16:01:06 Stubs for paletted images Bug: angleproject:7599 Change-Id: Idb49f8ba07ebd3b6cad461fa9e90b856af666183 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3909396 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Constantine Shablya <constantine.shablya@collabora.com>
Amirali Abdolrashidi 0d34d4f8 2022-09-21T18:51:04 Suppress more VVL errors about vkCmdDraw*-None * Suppressed the following VVLs: * VUID-vkCmdDrawIndexed-None-02686 * VUID-vkCmdDrawIndirect-None-02686 * VUID-vkCmdDrawIndirectCount-None-02686 * VUID-vkCmdDrawIndexedIndirect-None-02686 * VUID-vkCmdDrawIndexedIndirectCount-None-02686 Bug: angleproject:7685 Change-Id: I41390ee2a2a01509367a6e98697da3ad7e3cc2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3910174 Auto-Submit: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Chris Dalton 8b2aff28 2022-09-12T10:27:28 Implement the ANGLE_shader_pixel_local_storage API Implements the OpenGL ES API for ANGLE_shader_pixel_local_storage and adds thorough validation and testing as outlined in the spec. This feature is still implemented entirely in the frontend, but the extension now works end-to-end with a passing test suite, and can be used externally. Over time we can start gradually moving the implementation into backends as appropriate. Bug: angleproject:7279 Bug: angleproject:7647 Change-Id: I1c861a0fca96423be02e17bbe1fb7f57b99ea63f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3886462 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Loic Sharma 59f496c0 2022-09-19T14:21:35 Only close COM if it was initialized Change-Id: I4ad62ca3fe642ae255f4c808d6ae9e5d7ff72c37 Bug: angleproject:7675 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3906325 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 2f1f9500 2022-09-14T15:52:11 GLES1: Fix behavior with incomplete mipmap textures GLES1 requires texturing to be disabled when a mipmap-enabled texture is incomplete. Bug: angleproject:3408 Change-Id: I2c3b0206282a71f9a54d77ecdf2c7e42c7175fe5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3896212 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi 7edc6dab 2022-09-21T11:57:37 Suppress VVL error about vkCmdDraw-None * Suppressed the following VVL: * VUID-vkCmdDraw-None-02686 Bug: angleproject:7685 Change-Id: I1c926637729f11f58667d20ea0f5c5f545dc5181 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3910798 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Robert Mader 1d8dce25 2022-09-19T15:08:54 EGL: Implement EGL_EXT_image_dma_buf_import_modifiers This reverts Ifbb0a182171646df8161f6f42eafe2a476fea6b2 and implements the previously missing bits. Inspired by the corresponding Vulkan implementation. The extension is used by an upcoming Exo feature which was successfully tested with this patch, see https://chromium-review.googlesource.com/c/chromium/src/+/3857556 Bug: angleproject:7664 Change-Id: I951d1a787e1db3a77b19fcea6186b7aa0a29872f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3904345 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>