src/libANGLE


Log

Author Commit Date CI Message
Gregg Tavares 985d4293 2022-04-08T11:47:34 Metal:Speed up BGRA8 to RGBA8 copy for readPixels On a 2048x2048 texture on Intel this goes from 26-27ms to 17-18ms Bug: angleproject:7117 Change-Id: I4f48521b64e54669d180f0d2d8fdda78f83f89b5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3579510 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Gregg Tavares <gman@chromium.org>
Shahbaz Youssefi 8074061d 2022-04-09T01:03:53 Remove feature override platform methods Instead, the tests now use the enable() functions to override the feature at platform level. This fixes the forceFallbackFormat feature mistakenly not having been tested. Bug: angleproject:6435 Change-Id: I605e4133407282bd52232887b595af0d2c13575d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3577369 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi a0b5299b 2022-04-12T00:38:50 Vulkan: Fix resolve with subpass into smaller framebuffer The condition to optimize resolve with subpass did not take into account that the resolve area must match the render pass are, neither did it disallow flipping and rotation. Bug: angleproject:7196 Bug: chromium:1314383 Change-Id: I57e50da4d6e04dfebcce3c0a5061015e5ee8773b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3581055 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuxin Hu 6768aff7 2022-04-07T23:25:08 Fix Geometry Shader Conformance Test Failure on Pixel6 Add code in shader linker stage to check the number of AtomicCounterBuffers against these values: GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS Bug: angleproject:6918 Change-Id: If1c1d0dc2452f5aafc72d81f4f5523608810bba9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3576629 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Peng Huang 445bf9bd 2022-04-09T08:42:12 Use the real max vertex attrib index instead of MAX_VERTEX_ATTRIBS Bug: chromium:1258869 Change-Id: I7de23353fc6922be9b3201c87d33e0cfdc427569 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3580578 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Sunny Sachanandani d4cbd9bf 2022-04-11T16:55:39 vulkan: Mark external memory textures as preinitialized Textures initialized from external memory objects should be considered preinitialized so that they're not cleared on first access with robust resource init. This is essential for Vulkan-GL (WebGPU-WebGL) interop on Linux where Skia or Dawn could be first used to render into a VkImage backed by an external memory object, and a GL texture is created lazily on first GL access. This CL also includes an end-to-end test for such interop, and changes to support that test: 1) Add writePixels() to VulkanHelper to upload pixels to a VkImage 2) Detect external memory / semaphore extensions when VulkanHelper is initialized from ANGLE. 3) Allow importing external memory object that's larger than VkImage size requirements. Bug: angleproject:7188 Change-Id: I60c250b64df1766a179edd1cc67c3f0765e8aa0f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3582954 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Stephen White 9442b7a8 2022-04-12T12:07:47 D3D: Remove a pass-through function. Bug: angleproject:7199 Change-Id: I6d10cb74640eb3be301209f510a52111ce88d5da Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3583608 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Charlie Lao 957f8297 2022-04-08T15:44:55 Vulkan: Change ContextVk to Context for BufferPool APIs These APIs only needs information from Context, not ContextVk. This CL changes to Context for better encapsulation. Bug: b/223428306 Change-Id: I4f50aaa4065eff62ca32e9049f5a891d8814e511 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3578587 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Lingfeng Yang <lfy@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Antonio Caggiano 510351f2 2021-12-09T16:52:35 Vulkan: Support Wayland Implement DisplayVkWayland and WindowSurfaceVkWayland. Get window size from native window and check egl config is just empty. Then add an EGL wayland test for testing rendering and buffers swapping. Bug: angleproject:6902 Change-Id: I8204a5cc99f26330b74caba241bebf14c5650c2d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3395898 Reviewed-by: mohan maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Antonio Caggiano <antonio.caggiano@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi aed5951e 2022-03-29T16:29:58 Reland "Vulkan: Fix texture-after-framebuffer sync issues" This is a reland of commit 535cd538f3585b44855647339f04bae1c1acf63a Original change's description: > Vulkan: Fix texture-after-framebuffer sync issues > > In TextureVk::syncState, for various reasons, the underlying image may > need to be respecified. For example because base/max level changed, > usage/create flags have changed, the format needs modification to become > renderable, generate mipmap is adding levels, etc. > > Currently, ANGLE syncs FramebufferVk before TextureVk for the sake of > the deferred clear optimization. This means that if the texture needs > to recreate its underlying image, it needs to do so earlier than its own > syncState, and do so in FramebufferVk::syncState through the > TextureVk::getAttachmentRenderTarget function. > > Over time, TextureVk::getAttachmentRenderTarget was modified to do parts > of what TextureVk::syncState did for this matter as bugs were > discovered, and more continue to be discovered. The bug that prompted > this change is missing image recreation when usage/create flags change. > > In this change, the relevant code in TextureVk::syncState is refactored > in a helper that's called by TextureVk::getAttachmentRenderTarget. This > way, the two functions should always be in agreement, avoiding > TextureVk::syncState recreating the image after > FramebufferVk::syncState, leading to use-after-free bugs. > > Bug: angleproject:4418 > Bug: angleproject:6909 > Bug: chromium:1266094 > Bug: chromium:1296866 > Change-Id: I856a34ca5cf573578c771f5adbeb9208420a3f62 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3557817 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Charlie Lao <cclao@google.com> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:4418 Bug: angleproject:6909 Bug: chromium:1266094 Bug: chromium:1296866 Change-Id: I0110eab88eb9d8f77e204b84a6e90308e2384fd7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3572715 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi eeb39653 2022-04-08T16:09:48 Autogenerate features Features are now specified in a json file and autogenerated. This is in preparation for more autogeneration to support feature override in tests. This change doesn't yet fix the issues in anglebug.com/6435 and should be a no-op. Bug: angleproject:6435 Change-Id: Icdb63a94dc37b5fef0a356e0fc0b49937e083c8a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3579941 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Gregg Tavares 9237272f 2022-03-31T14:15:43 Metal:remove TextureMtl::mIsPow2 Bug: angleproject:7147 Change-Id: I60876d719989311de07ad97f1be5daecb83c3801 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3564276 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Kyle Piddington <kpiddington@apple.com> Commit-Queue: Gregg Tavares <gman@chromium.org>
Kimmo Kinnunen e08476cf 2022-04-05T14:48:52 Metal: Avoid leaking MTLDevice lists in DisplayMtl Hold the lists via ObjCObj<>. Patch by David Kilzer <ddkilzer@apple.com> Bug: angleproject:6920 Change-Id: Ia25cd59b0dd2e81367d8bf5ca50a22ca02547940 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3568381 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Kimmo Kinnunen 1b2adb40 2022-04-05T15:14:55 Metal: Avoid leaking MTLFunctionConstantValues in ProgramMtl Hold with ObjCObj<>. Patch by David Kilzer <ddkilzer@apple.com> Bug: angleproject:6920 Change-Id: I635097100b1e004e9276490ff8574870e1c5f33f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3568379 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Jamie Madill 5c85fd4e 2022-04-11T12:29:00 Add error check on resuming XFB with deleted buffer. Bug: chromium:1305190 Change-Id: I22c6f6400b05ca32c922fba9a3b9d4b5841ca8b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3578378 Auto-Submit: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Steven Noonan fb91e27c 2022-04-03T17:18:44 add GL_ANGLE_robust_resource_initialization extension to xml Bug: angleproject:7165 Change-Id: I17a566714bc3e1a0e19dee4bdea10c7360050172 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3567539 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Stephen White 6803a2d0 2022-04-01T16:52:49 D3D11: implement SSBOs in pixel and vertex shaders. Since the 'u' register space for UAVs in pixel shaders is shared with render targets, and the number of render targets may vary depending on GL state, this required deferring register allocation until draw-time output in DynamicHLSL. Since non-compute shaders aren't able to immediately output the SSBO declaration, initial register allocation was broken out from ResourcesHLSL::shaderStorageBlocksHeader() into ResourcesHLSL::allocateShaderStorageBlockRegisters() with the former only called for compute shaders. These initial allocations are offset by the number of RTs at draw time. Since Raw UAVs may now be created at draw time for non-compute shaders, call markRawBufferUsage() from the Renderer11::draw*() entry points as it is from dispatchCompute*(). Bug: angleproject:7156 Change-Id: I6ab65af1ff36df0313e3c1f8f79661b1547ab9a2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3565562 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Geoff Lang c458b5ad 2022-04-01T11:38:17 Fix CheckedNumeric using the wrong type. Validation for glBufferSubData checks that the buffer is large enough for size+offset but verifies they fit in a size_t which is a different type than the deduced type for size+offset on 32-bit systems. Use decltype to ensure that we always verify there is no overflow on the correct type. Bug: chromium:1298867 Change-Id: I82f534b2d227d3273a763e626ebeae068dc918dc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3563515 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Peng Huang 04782d86 2022-04-09T08:26:52 Validate vertex attrib index against caps.maxVertexAttributes Bug: chromium:1258869 Change-Id: I2d2c45b11177b0f6f4785a894c15357515b33e9e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3580577 Auto-Submit: Peng Huang <penghuang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 1b94c585 2022-04-10T15:09:38 Revert "Vulkan: Switch loader to new driver files env var." This reverts commit 1f6123d55467c2af7c67405c0101a6f327b76225. Reason for revert: Seems to break ANGLE on fuchsia loader: https://ci.chromium.org/ui/p/chromium/builders/try/fuchsia_arm64/1123629/overview Original change's description: > Vulkan: Switch loader to new driver files env var. > > VK_DRIVER_FILES replaces VK_ICD_FILENAMES. > > Bug: angleproject:7095 > Change-Id: I949ac9a8f375240b6c6068825eccc645f81b0185 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3522821 > Reviewed-by: Ian Elliott <ianelliott@google.com> > Reviewed-by: Yuxin Hu <yuxinhu@google.com> > Commit-Queue: Jamie Madill <jmadill@chromium.org> Bug: angleproject:7095 Change-Id: I5b7e094b08d76b9c14adb4acb3b59e4cfb7a28fa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3580980 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Peng Huang 92e99653 2022-04-08T16:33:42 Fix crashes in gl::VertexArray::detachBuffer() and onDestory() The crashes is because gl::MAX_VERTEX_ATTRIB_BINDINGS(16) is used for iterating mState.mVertexBindings. However it's size is not always 16. It can be 8 for some PowerVR GPU with GLES 2 driver. Bug: chromium:1258869 Change-Id: I3b572d153cb16fb46920483612e3cdbc6ee57577 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3577813 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Jamie Madill 4b381f41 2022-04-08T09:20:45 Vulkan: Fix descriptorSet perf counter values. Some counters were getting reset in multiple places, which could result in queries returning zero counts. Fix this by consolidating per-frame counter resets. Also updates how we compute cache hit/miss counters. This results in correct and consistent counts for cache accesses. Also includes a fix to not update the overlay when there are no enabled widgets. Also does away with some of the object- specific perf counters that were made to track descriptor set allocations. Bug: angleproject:6776 Change-Id: I769c715986defc50f0cfd0d997c338d34174e9f0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3573389 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Amirali Abdolrashidi 3cea7fcc 2022-03-16T16:33:43 Split Context ResourceUseList to RP Commandbuffers * Added mResourceUseList to each command buffer helper in an effort to move mResourceUseList away from ContextVk. * submitFrameImpl() renamed to submitCommands() * Moved the functions acquireResourceUseList() and onRenderPassFinished() in submitCommands() to the submitFrame functions calling it. Bug: angleproject:7103 Change-Id: I2487d5b86ea0a4d504f283aa7128501651317fe0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3531368 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Gregg Tavares ac130106 2022-04-04T13:46:01 Metal: Remove Unused IOSurface code Bug: angleproject:7171 Change-Id: I6eaf9c1194a26c96f4566f5bcc386330df66b870 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3569588 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Gregg Tavares <gman@chromium.org>
Jamie Madill 1f6123d5 2022-03-14T11:40:05 Vulkan: Switch loader to new driver files env var. VK_DRIVER_FILES replaces VK_ICD_FILENAMES. Bug: angleproject:7095 Change-Id: I949ac9a8f375240b6c6068825eccc645f81b0185 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3522821 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi a16491d9 2022-04-05T16:47:32 Vulkan: Fix invalidation of non-existing aspects If the app uses a stencil-only attachment but invalidates depth, UNREACHABLE was hit. If the app uses a depth-only attachment but invalidates stencil, ANGLE was proceeding with an attempt to invalidate it (with no side effect). Bug: angleproject:7178 Change-Id: Idc177bdb66b2d0b3b3c2d36f5cadc7b9126a42c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3573383 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Kimmo Kinnunen ba04fcfd 2022-03-11T13:58:52 Support ANGLE_PREFERRED_DEVICE on CGL Add the possibility to test both integrated and discrete GPU with ANGLE tests. Previously it was using only discrete. The binaries need the NSSupportsAutomaticGraphicsSwitching bundle property. This is needed to test ANGLE_power_preference. Changes the behavior of test apps: Previously, ./angle_end2end_tests would use discrete GPU. After, ./angle_end2end_tests or ANGLE_PREFERRED_DEVICE=intel ./angle_end2end_tests will use integrated GPU. ANGLE_PREFERRED_DEVICE=amd ./angle_end2end_tests will use discrete GPU. Bug: angleproject:7093 Change-Id: Ia64f6024e3215e69c2a1bde3ba4f67c3ca595476 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3516114 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Stephen White f36dde31 2022-03-31T10:33:41 D3D: remove NV GetDimensions() workaround for image load/store. RWTexture2D only has the 2-param version of GetDimensions(), since it already refers to a single mip and layer. So this workaround just causes compile failures. Bug: angleproject:7121 Change-Id: I675eaf9ffadd75e186423a55bc9822e00432f89e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3566218 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Nathan Zabriskie 9d486a85 2022-04-01T11:48:58 GL: Unbind textures from FBO after calls to frameBufferTexture2D OOPR canvas uncovered an Nvidia driver bug in which binding a texture level > 0 to a framebuffer and then later binding a renderbuffer to the same FBO causes the FBO to be marked as having an incomplete attachment. This CL expands UnbindResources() in BlitGL.cpp to unbind textures in addition to RBOs and adds new calls to unbind in functions that call framebufferTexture2D. Also adds a GL workaround--alwaysUnbindFramebufferTexture2D-- that forces FramebufferGL to first unbind any existing attachments using framebufferTexture2D before attaching a new render buffer. Bug: angleproject:5536 Change-Id: I46c115b3895f8fccb251dbf4531d5c1bd4705ebc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3527465 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Cody Northrop a1c9ba70 2022-04-04T11:29:13 Update validation of glFramebufferTextureLayer for cube maps The ES 3.2 spec explicitly mentions cube map parameters for the call: For cube map textures, layer is translated into a cube map face as described in table 8.24. For cube map array textures, layer is translated into an array layer and a cube map face as described for layer-face numbers in section 8.5.3 but does not list it when enumerating errors: An INVALID_OPERATION error is generated if texture is non-zero and is not the name of a three-dimensional, two-dimensional array, two-dimensional multisample array or cube map array texture. There is a bug filed about this: https://gitlab.khronos.org/opengl/API/-/issues/134 Per discussion, it should not be an error to use a cube map with glFramebufferTextureLayer. It will be fixed in the spec. Test: DrawBuffersTestES3.CubeMapTextures Test: DrawBuffersTestES3.CubeMapArrayTextures Bug: angleproject:7168 Bug: angleproject:7169 Change-Id: I6ef9af4b2bf05dc2dee841c68fb4f896c30c8c03 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3569337 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Amirali Abdolrashidi 607d398e 2022-03-14T16:32:21 Vulkan: Optimize resolve of multisample swapchains * Resolves the multisampled image if the last render pass draws into the default framebuffer. * Added test to check the number of resolves in the optimization subpass (credit: Xinyi He) * Added test to check the number of resolves outside the subpass. * Added disabled test to see if the subpass resolve works. Bug: angleproject:6762 Change-Id: I86a8db3387851ab97d5f7a3d8a0ff26961254c14 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3523062 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Cody Northrop 8b84cf15 2022-03-30T13:42:38 Tests: Add GFXBench Car Chase trace Test: angle_perftests --gtest_filter="*car_chase*" Bug: angleproject:7125 Bug: angleproject:7173 Change-Id: I07069d46351718743e545fc056f41de2b6fe3820 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3561484 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi 256bbb8a 2022-04-04T22:24:55 Vulkan: Don't invalidate resolve attachment except with MSRTT Previously, resolve attachments were only used with MSRTT emulation. As such, when an attachment was invalidated, its corresponding resolve attachment was also invalidated implicitly. This changed when glBlitFramebuffer was optimized to resolve attachments, though the render pass is immediately closed and no chance is currently given to invalidation. An upcoming change needs to invalidate the multisampled attachment independently from the resolve attachment. That is fixed in this change so that the implicit invalidation is done only for MSRTT emulation. Bug: angleproject:6762 Change-Id: Ia730d4bea1f4229c8068a41b151a7af95649b606 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3569483 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuxin Hu a11bf0ed 2022-03-31T17:28:18 Fix Max Atomic Counter Conformance Test Failure on Pixel6 ARM does not support the VkPhysicalDeviceFeature vertexPipelineStoresAndAtomics. According to vulkan specs: we should disable the usage of atomic buffers in vertex, tessellation, and geomotry shader stages. Set maxShaderAtomicCounters to zero for all these shader stages if vertexPipelineStoresAndAtomics is not supported. Create two angle_end2end_test to check atomic buffer usage in tessellation control shader and tessellation evaluation shader. Bug: angleproject:6918 Change-Id: I566562f99672d50cfb3d75def81a18a613b26ca0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3563501 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Cody Northrop 808f754c 2022-04-04T17:53:48 Capture/Replay: Use glFramebufferTexture2D for cubes In GLES 3.2, you can use glFramebufferTexture2D or glFramebufferTextureLayer to bind a cube face as an attachment. Not all drivers support glFramebufferTextureLayer because the wording of the spec is confusing. Instead use the more portable glFramebufferTexture2D. Test: Aztec Ruins High MEC Bug: angleproject:7168 Bug: angleproject:7169 Change-Id: Ie1a7d06f817750ddf8e6e707814380e306f5ee29 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3570242 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jamie Madill b33767ec 2022-04-04T15:26:29 Revert "Vulkan: Fix texture-after-framebuffer sync issues" This reverts commit 535cd538f3585b44855647339f04bae1c1acf63a. Reason for revert: May fix Win/Intel blockman_go flakiness. Bug: angleproject:7167 Original change's description: > Vulkan: Fix texture-after-framebuffer sync issues > > In TextureVk::syncState, for various reasons, the underlying image may > need to be respecified. For example because base/max level changed, > usage/create flags have changed, the format needs modification to become > renderable, generate mipmap is adding levels, etc. > > Currently, ANGLE syncs FramebufferVk before TextureVk for the sake of > the deferred clear optimization. This means that if the texture needs > to recreate its underlying image, it needs to do so earlier than its own > syncState, and do so in FramebufferVk::syncState through the > TextureVk::getAttachmentRenderTarget function. > > Over time, TextureVk::getAttachmentRenderTarget was modified to do parts > of what TextureVk::syncState did for this matter as bugs were > discovered, and more continue to be discovered. The bug that prompted > this change is missing image recreation when usage/create flags change. > > In this change, the relevant code in TextureVk::syncState is refactored > in a helper that's called by TextureVk::getAttachmentRenderTarget. This > way, the two functions should always be in agreement, avoiding > TextureVk::syncState recreating the image after > FramebufferVk::syncState, leading to use-after-free bugs. > > Bug: angleproject:4418 > Bug: angleproject:6909 > Bug: chromium:1266094 > Bug: chromium:1296866 > Change-Id: I856a34ca5cf573578c771f5adbeb9208420a3f62 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3557817 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Charlie Lao <cclao@google.com> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:4418 Bug: angleproject:6909 Bug: chromium:1266094 Bug: chromium:1296866 Change-Id: I26b6f644442e2875aba954d6417543b1d5121376 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3569801 Auto-Submit: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Peng Huang bd7915fd 2022-04-04T10:02:29 Use provided format as intended format for EGLImage from VkImage The problem is because VkImage is created with R8G8B8A8 format, and then imported into ANGLE as EGLImage with GL_RGB format, however ANGLE doesn't set intended format correctly (ANGLE uses R8G8B8A8 instead of R8G8B8X8). So when clients use glReadPixels() to get pixels, the alpha channel is filled with incorrect value. Bug: chromium:1312490 Change-Id: Ief5b87ec5eb03c9cb37f10b2c20b5caf3013262d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3569481 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Shahbaz Youssefi 535cd538 2022-03-29T16:29:58 Vulkan: Fix texture-after-framebuffer sync issues In TextureVk::syncState, for various reasons, the underlying image may need to be respecified. For example because base/max level changed, usage/create flags have changed, the format needs modification to become renderable, generate mipmap is adding levels, etc. Currently, ANGLE syncs FramebufferVk before TextureVk for the sake of the deferred clear optimization. This means that if the texture needs to recreate its underlying image, it needs to do so earlier than its own syncState, and do so in FramebufferVk::syncState through the TextureVk::getAttachmentRenderTarget function. Over time, TextureVk::getAttachmentRenderTarget was modified to do parts of what TextureVk::syncState did for this matter as bugs were discovered, and more continue to be discovered. The bug that prompted this change is missing image recreation when usage/create flags change. In this change, the relevant code in TextureVk::syncState is refactored in a helper that's called by TextureVk::getAttachmentRenderTarget. This way, the two functions should always be in agreement, avoiding TextureVk::syncState recreating the image after FramebufferVk::syncState, leading to use-after-free bugs. Bug: angleproject:4418 Bug: angleproject:6909 Bug: chromium:1266094 Bug: chromium:1296866 Change-Id: I856a34ca5cf573578c771f5adbeb9208420a3f62 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3557817 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi ba0eba20 2022-04-01T17:39:58 Remove the TODOs regarding multisample buffer age * Removed the TODOs regarding the buffer age for multisample images. Bug: angleproject:7149 Change-Id: I25100eaef774613e71c5f7afdaed5833c63b6343 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3566228 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Amirali Abdolrashidi cd9e887a 2022-03-31T15:43:17 Vulkan: Add multisample buffer age tests * Added variations of VerifyContent for multisample images. * getBufferAge() now sets age to 0 when the image is multisampled. Bug: angleproject:7149 Change-Id: I11f6fc92f383fba180f118b29c799072ed0eb51c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3563510 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Charlie Lao 8f904363 2022-03-31T12:30:19 Vulkan: Move memory allocation initialization code into function No functional change expected. This CL wraps all initialization code for VMA allocator and memory suballocation memoryType and alignment calculation into its own function. Bug: b/223428306 Change-Id: Id630bbae035912ad41c51c2bb1cd02c2e438b442 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3563506 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Jamie Madill dd86dd15 2022-03-25T14:55:05 Cache outer array offset in linked uniforms. Our current tracking would only track one array dimension. For nested arrays the flattened parent index would be incorrect. Update this tracking so we can use it in the Vulkan descriptor set caching. Store this value as a separate integer member to avoid conflicting with other back-ends. Bug: angleproject:6776 Change-Id: Ie1a5dc3d64ccac23dffcc73684d619336cb0f0da Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3550824 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Mohan Maiya d3492eef 2022-03-31T09:06:07 Vulkan: Handle border color for stencil component For a texture with D/S format we need to handle border color based on GL_DEPTH_STENCIL_TEXTURE_MODE. Test: dEQP.GLES31/functional_texture_border_clamp_range_clamp_nearest_unorm_depth_uint_stencil_sample_stencil Bug: angleproject:3577 Change-Id: Ib1c5dfe35c1713101ed83395d3c0ad70a043764f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3564198 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao fe28a429 2022-03-30T15:34:49 Vulkan: Create buffer for vertex array if robust enabled If robust access is enabled (i.e., chrome), we want to ensure vulkan driver never access beyond that OpenGL buffer boundary. But with suballocation from BufferPool, we are using the same VkBuffer for all suballocations from the same BufferBlock. this combined with the fact that there is no size information in the vkCmdBindVertexBuffers, it means vulkan driver can not properly ensure vertex access not go beyond the subrange. It can only guarantee not access beyond the entire VkBuffer size. This CL creates a dedicated vkBuffer object and bind it to the suballocation of the vkDeviceMemory so that vulkan driver will see the exact range of the subrange instead of entire buffer. Since we may allocated more memory than actual requested size and the extra paddings are not zero filled , user size is used to create this vkBuffer. This is only enabled when robust access is enabled. This CL also ported webgl conformance test out-of-bounds-index-buffers.html and out-of-bounds-array-buffers.html to end2end test. Bug: chromium:1310038 Change-Id: I3499ae600028149b1039082e5011232b3e4e5e80 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3553940 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Mohan Maiya 5aaa402c 2022-03-30T06:13:02 Fix Surface use-after-free bug In Display::destroyContext we would incorrectly destroy current surfaces while trying to makeCurrent the context to be destroyed. Introduce ScopedSurfaceRef, mirroring ScopedContextRef, to keep the surfaces alive while destroying the context. Bug: angleproject:7141 Test: EGLSurfaceTest.SurfaceUseAfterFreeBug* Change-Id: Ie9b3d7841e5ee561d96c13bfee9c7c87b40cc39d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3561354 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Kyle Piddington 1670c6dd 2022-02-17T14:15:08 Metal: Buffer data is not correctly updated When using a dynamic draw buffer, Metal creates more buffers to avoid in-flight synchronization issues. However, without correctly rebinding the buffers from the VAO, we get missing data. This patch adds a fix and a test to reproduce the issue. Upstream of https://bugs.webkit.org/show_bug.cgi?id=236427 and https://bugs.webkit.org/show_bug.cgi?id=236733 Bug: angleproject:7122 Change-Id: I879ff688af04a8215df6134400d0aab582b92842 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3472691 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kyle Piddington <kpiddington@apple.com>
Mohan Maiya 078da78f 2022-03-17T13:06:58 Vulkan: Support GL_EXT_EGL_image_storage extension This extension provides a mechanism for creating texture objects that are both EGLImage targets and immutable and removes the possibility of implicit orphaning. EGL images created from external sources now support types other than 2D. Tests covering the new feature were added to ImageTest.cpp. Bug: angleproject:6346 Change-Id: Id3e328f352deb1af47062be232384229a8b1c341 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3530489 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Shahbaz Youssefi 36e142c1 2022-03-25T12:10:17 Vulkan: Fix deadlock in device loss When the device is lost, the commands queue is cleaned up. This shouldn't be done immediately if the device loss is generated from the command queue itself (due to mutual exclusion requirements). For example, CommandQueue::checkCompletedCommands() loops over mInFlightCommands, whose body contains ANGLE_VK_TRY. On device loss, that macro invokes CommandQueue::handleDeviceLost which clears mInFlightCommands. In this change, handleDeviceLost() defers device loss handling if the mutex is already taken. A new class is added, ScopedCommandQueueLock, that handles device loss at the end of the scope (i.e. when the command queue operation is finished) by calling handleDeviceLostNoLock() before releasing the lock. Bug: chromium:1304907 Bug: angleproject:7129 Change-Id: Ifb67cfdad9595cec51a6a58b69f629aede489725 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3552088 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Peng Huang <penghuang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 4b262ffd 2022-03-30T22:29:58 Vulkan: Don't reserve varyings for xfb if VK_EXT_depth_clip_control Bug: angleproject:5421 Change-Id: I7781a1981d522a8fd1952a1211c7223dc5a2d96f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3562379 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 3bdbfbf8 2022-03-25T16:34:51 Vulkan: Adjust border color Some border color tests used to fail due to either unclamped color values or not accounting for depth, stencil or luma formats. We now adjust the border color value according to the sampler's format. Test: dEQP-GLES31.functional.texture.border_clamp.* Bug: angleproject:3577 Bug: angleproject:6213 Change-Id: Ib38ce2374622bfafde69fe3fa2d7227d60043954 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3551895 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
John Cunningham f5d20de8 2022-03-23T17:34:14 WebGL ReadPixels validation is incorrect. Remove GL_UNSIGNED_INT_24_8 from the supported types in ValidReadPixelsTypeEnum. Run the format/type validation before the check for missing attachment. Bug: angleproject:7119 Change-Id: Ie788084d0f41fef6847791de8c53be830eba7564 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3546723 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Shahbaz Youssefi 36a051d8 2022-03-28T22:53:38 Vulkan: Move mid-RP color clear to loadOp if content undefined Instead of using vkCmdClearAttachments, if the color attachment has not been written to, modify the loadOp of the currently open renderpass to CLEAR. This is an adaptation of commit cfe5a1735a934cc83133bb6c69d19aa27278a270 The difference with that commit is that, with the prior changes that added tracking of color attachment access in the render pass, this change is greatly simplified by being able to immediately know if clear can be moved to the beginning of the render pass. Bug: angleproject:5048 Change-Id: I72b3613ad08ff869b71aced7e1f4e9be916d7b49 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3557815 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 16220730 2022-03-30T12:22:57 Vulkan: Enable framebuffer fetch on SwiftShader To roll into Chromium, this needs a rebaseline. Two oopr-canvas2D tests show a minor diff with this extension enabled. Bug: angleproject:6947 Change-Id: I19c285ec544fef3622cce805322093ccffbcb728 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3561280 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Gregg Tavares e79ed0dc 2022-03-25T17:15:30 Metal: Fix for not submitting command buffers in order First I added a check that CommandBuffers are committed in order as the design requires that they are. This showed several tests asserting including the angle end2end test, OcclusionQueriesNoSurfaceTestES3.SwitchingContextsWithQuery/ES3_Metal and also several others. The check is cheap and helps catch bugs so it seems prudent to have it. Unfortunately, AFAICT, there is no trival fix. The issue is ContextMtl::flushCommandBuffer commits the outstanding commandbuffers but then, if there is/was a query in progress, more work needs to be done. That work calls ContextMtl::getBlitCommandEncoder which calls ContextMtl::ensureCommandBufferReady which calls ProvokingVertexHelper::ensureCommandBufferReady which ends up making a new command buffer. That command buffer should be committed before switching to a new context but the code that would commit it has already executed. It's not at all clear to me how to refactor the code to do this correctly. The simplest solution is to call ContextMlt::flushCommandBuffer twice which I know is gross but at least it fixes the bug and optimizing and/or refactoring can be done separately. Bug: angleproject:7131 Change-Id: Idb11efb35f6ad2fd890a5db15d3791c07586bf34 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3553939 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Gregg Tavares <gman@chromium.org>
Lubosz Sarnecki f8ddca00 2022-03-03T15:34:15 FrameCapture: Use getCompressedTextImage. Replace retrieveCachedTextureLevel with getCompressedTexImage. Remove compressed texture shadow copy code. Treat GLCopyImageSubData calls as texture updates by handling them in trackTextureUpdate. Bug: angleproject:5592 Bug: angleproject:5604 Bug: angleproject:6104 Bug: angleproject:6177 Bug: b/181797364 Change-Id: Ic6b2a41ce536e3e4b66497048954efdafa556d1e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3516377 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Shahbaz Youssefi 2d54b68e 2022-03-22T17:32:06 Vulkan: Use storeOp=None more opportunistically Previously, storeOp=None was used when the attachment was in "read-only mode" and storeOp=Store. With this change, storeOp=None is used more opportunistically when it's deemed that the attachment was not written to, regardless of if it was put in "read-only mode" (a construct added to support read-only depth/stencil feedback loops). Bug: angleproject:5048 Change-Id: I10832d4e2b97793ea1347a47175cbf8ce9af57d6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3556368 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 657738e0 2022-03-29T19:27:34 Vulkan: Remove suppression of fixed VVL errors This partially reverts commit 91667dcafacc6d2bec545b776547e8583393a3f9. Bug: chromium:1310536 Change-Id: Ifeca55466f74b080274eb7762edce17bcace0aab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3557816 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang be53aea8 2022-03-10T11:04:22 Reland: Emulate RGB10 (no alpha) on desktop OpenGL. The OpenGL ES extension GL_EXT_texture_type_2_10_10_10_REV requires RGB and RGBA formats to be supported but Desktop OpenGL does not support RGB. Emulate it with the existing emulatedAlphaChannel path in TextureGL. Bug: chromium:1300575 Change-Id: I5efea52d3da628cf82b43fece23894e6f47df650 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3533141 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 53e432fe 2022-03-28T15:18:51 Vulkan: Track LOAD/STORE_OP_NONE in perf counters Bug: angleproject:5048 Change-Id: I52ed67e7a5c173dd1a7202fd6d4a1c484e79ea75 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3556367 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Steven Noonan 1205a7e1 2022-03-24T22:15:44 Vulkan: always respect deferred clears in render pass I had a situation which was like this: - glBindFramebuffer(fbo) - glClear(color + depth) - series of depth-only draws: - glDrawBuffers() - disable all color buffers - glColorMask() - all false - glDrawElements/glDrawArrays - glBindFramebuffer(0) Even though the glClear happened before glDrawBuffers/glColorMask, it only got executed on the first glDraw* call. And since the draw buffers got disabled before it decided to act on the Clear, it thought it couldn't touch the color buffer in the render pass. So it ended up doing: vkCmdClearColorImage() on the color buffer vkCmdBeginRenderPass() with LoadOp C=Load, D=Clear before the draw instead of: vkCmdBeginRenderPass() with LoadOp C=Clear, D=Clear Bug: angleproject:7127 Change-Id: Ibc3b55b0c7815defcf6d711fa876eff43ba29d40 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3551298 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop ce964d66 2022-03-26T18:56:50 Vulkan: Add tessellation to GetPipelineStage helper The tessellation stages were missing from a helper, which was silently returning an invalid value. Add a test and an assert, which fires before the fix. Test: GFXBench Car Chase Test: GLSLTest_ES31.TessellationTextureBufferAccess Bug: angleproject:7135 Bug: b/218314686 Change-Id: I2bc8d374300fc1470e52affabab7491698c99cee Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3554575 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Steven Noonan a02fa8a0 2022-03-24T22:14:44 Vulkan: mark image contents defined on clear-invalidate-clear The backend was ignoring "repeated clears" with an Invalidate between them, which marked the image contents as undefined. When a clear happens after invalidate, verify that the clear parameters were the same, and simply mark the image contents defined if they aren't already. For example, in this scenario: - glBindFramebuffer(fbo) - glInvalidateFramebuffer(color + depth) - glClear(color + depth) - depth only render - glInvalidateFramebuffer(depth) - glBindFramebuffer(0) The color clear got skipped entirely because it was cleared with that color in a previous frame and no other color draws happened since. This caused sampling from the FBO's texture to return garbage data. Bug: angleproject:7127 Change-Id: I4ffe65c67375931ab63f07f27fa59ed0a4b90cd9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3551297 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
angle-autoroll 91667dca 2022-03-28T18:56:11 Roll vulkan-deps from 9fd63df2bc48 to 737665b8eab1 (13 revisions) https://chromium.googlesource.com/vulkan-deps.git/+log/9fd63df2bc48..737665b8eab1 Changed dependencies: * glslang: https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang.git/+log/f1d286fcc2..abbe466451 * spirv-tools: https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git/+log/48c8363f0a..bd325d2984 * vulkan-loader: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Loader.git/+log/ea503f36e6..b383c5131e * vulkan-validation-layers: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers.git/+log/26f222cf8b..4bf3f07497 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/vulkan-deps-angle-autoroll Please CC syoussefi@google.com,ynovikov@google.com on the revert to ensure that a human is aware of the problem. To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Bug: chromium:1310536 Change-Id: Id57e6986082a6a7167b7217c3681d284d718086b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3556087 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Hans Wennborg 7e8e49a0 2022-03-28T13:42:50 Remove a set but otherwise unused var in DynamicImage2DHLSL.cpp Recent Clang versions have enhanced -Wunused-but-set-variable which now warns about this. Bug: chromium:1309955 Change-Id: Ic62427ab3129838d03878c308c6260993ae9fa57 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3550204 Auto-Submit: Hans Wennborg <hans@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 7a85d114 2022-03-25T15:01:17 Use [[nodiscard]] on RAII classes Scoped* classes provide an RAII way of adding cleanup/restore state/etc in a robust way. Unfortunatley, it's very easy to mistakenly leave the variable name, leading to the destructor being called immediately instead of at the end of the scope: { ScopedX(parameters); // instead of ScopedX x(parameters); // Code here is run after destructor } The [[nodiscard]] attribute, if specified on the ScopedX class would lead to a warning (turned to error with -Werror). This change does that for classes named *Scoped* in ANGLE. Bug: chromium:1103817 Change-Id: I65c9922c9b4eba1f9c033e093fe8fe534648ab62 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3552092 Reviewed-by: Lingfeng Yang <lfy@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Gert Wollny bd173f0e 2022-03-14T09:59:47 Capture/Replay: limit per shader image uniforms when capturing The Caps::maxImageUnits are limited, but that's only the value that is checked when compiling shaders, we have also limit the values that are returned when using the GL interface. In addition print out the error log when compiling a shader fails in the Pipeline tests. Bug: angleproject:7094 Change-Id: I19f69afe2cece4841a395543c1e35785bc6bd698 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3516078 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Cody Northrop 32af258d 2022-03-22T16:44:14 Fix handling of incomplete CubeMapArray textures GFXBench Car Chase binds a cube map array as a default texture, then immediately samples from it without setting it up. This ends up treating the cube map array as incomplete. On the Vulkan backend, this is resulting in multiple validation errors, followed by a crash in the driver. There are a number of errors, but a telling one is this: vkCreateImage(): pCreateInfo->flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, but pCreateInfo->arrayLayers (=1) is not greater than or equal to 6. The Vulkan spec states: If imageType is VK_IMAGE_TYPE_2D and flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, extent.width and extent.height must be equal and arrayLayers must be greater than or equal to 6 This corresponds to language in the GLES 3.2 spec: 8.18. IMMUTABLE-FORMAT TEXTURE IMAGES TexStorage3D Errors An INVALID_OPERATION error is generated if any of the following conditions hold: * target is TEXTURE_CUBE_MAP_ARRAY and depth is not a multiple of 6 Since ANGLE treats incomplete textures as immutable, we need to update the dimensions of the backing image for CUBE_MAP_ARRAY. Also add a new test that exposes the problem. Test: IncompleteTextureTestES31.IncompleteTextureCubeMapArray Bug: b/218314686 Change-Id: Ibef41e15a7cfccb05e6039bfb8504d237bc42cd4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3546290 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@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>
Shahbaz Youssefi 3f331fae 2022-03-22T15:23:38 Vulkan: Dirty bits for depth/stencil access and feedback loop In preparation for doing the same for color, the depth/stencil render pass access and feedback loop modes are now updated with ContextVk dirty bits. This change also fixes clear after read-only depth/stencil feedback loop. The render pass wasn't broken in that case. Bug: angleproject:5048 Change-Id: I40f9b49593f9e6f35f42408e41c9d6267edb375e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3542988 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop 04680183 2022-03-24T11:09:39 Capture/Replay: Fixes for Car Chase This CL contains two fixes: * Add GL_PATCHES to list of PrimitiveMode names * Use FramebufferTextureLayer for 3D and Cube textures Bug: angleproject:3662 Bug: angleproject:7125 Bug: b/218314686 Change-Id: Ia97d8221cb78ef6e895156b5a474483d570d6ab5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3551096 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Stephen White 361874bb 2022-03-24T15:38:56 D3D: generalize more stuff (mImages, mReadonlyImages). Bug: angleproject:7121 Change-Id: I39e7df1e9aed84c225c8877a3d16ca3c44f70990 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3550543 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Stephen White cfee4070 2022-03-24T15:21:22 D3D: generalize Image2D, ReadonlyImage2D and AtomicCounter. Mapify them so they can handle all shader types. Bug: angleproject:7121 Change-Id: Ia80d46200bf30509e1484f1e198e1edfe6344207 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3550542 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Stephen White c399c693 2022-03-24T14:10:57 D3D: more generalization: cached Image2DBindLayouts. Bug: angleproject:7121 Change-Id: I5cead9f7e70cfb9ebea807b886ba849948a2ec47 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3550541 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Stephen White f2e7a235 2022-03-25T10:00:11 D3D: generalize the Image2DBindLayoutCache to be per-shader. Bug: angleproject:7121 Change-Id: I3b5243583ac11a0fc96c4b9271118a8fd7ee4f66 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3550540 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Stephen White 4e939ac6 2022-03-25T09:58:52 D3D: generalize mImage2DUniforms. Mapify this variable so it can accommodate other shader types. Bug: angleproject:7121 Change-Id: If6893a5fceaf50db87c42176c58319ce17d23d54 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3550539 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Stephen White 3e0fba60 2022-03-24T11:09:24 D3D: generalize DynamicHLSL calls to take a shaderType. This allows all shader types to use these Image2D calls. Bug: angleproject:7121 Change-Id: I95f9e8a2fd206bcc3ff2ef7e06875d093d73dcd6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3550538 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Shahbaz Youssefi c8f86c21 2022-03-22T17:40:43 A handful of clear-related tests Credit Tim Van Patten <timvp@google.com> Bug: angleproject:5048 Bug: angleproject:5194 Change-Id: I00eccf1049118c3fba3c2c560c781cf09cf23362 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3543732 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuxin Hu cdd97fb8 2022-03-24T17:41:30 Reland "Vulkan: Fix invalid access with display texture share group." This is a reland of 1099b5ef2279cfe1988a39c8e011aada59c650f1. Original change's description: > Vulkan: Fix invalid access with display texture share group. > Create bufferpool that owns by RendererVk. > If we are using EGL_ANGLE_display_texture_share_group > extension, use the bufferpool owned RendererVk, > otherwise, use the bufferpool owned by EGL::ShareGroup. > The bufferpool lifetime will remain consistent with > texture lifetime. > Bug: chromium:1299211 > Change-Id: Ie4e87cea1dfd20dabab24e2afed6ddd92e469888 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3531155 > Reviewed-by: Charlie Lao <cclao@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Geoff Lang <geofflang@chromium.org> Bug: chromium:1299211 Change-Id: I4b8f5bcb30297f2c5f24e02404fd96011f9d843b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3550038 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jonah Ryan-Davis cbbf5b5d 2022-03-23T18:17:17 GL: Only log all GL driver errors on debug builds Anything that invokes localtime_r() from the GPU process can be a slow operation on Linux. ANGLE's ClearErrors() function sometimes spams many errors, sometimes repeating every frame. These errors aren't necessary to print in release builds, and only logging these in debug builds will mitigate a lot of GPU process hangs. Bug: chromium:1077735 Change-Id: Ic1186732d477dee12caae0cb400e1d3504a0bd8b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3546718 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Alexey Knyazev 18c36f8a 2022-03-19T19:22:08 Metal: Fix transform feedback with base instance Added TransformFeedbackTest.BaseInstance test case. Bug: angleproject:6963 Change-Id: Ie7b2a5dd2be456172505f07ea60ca291075bf07e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3536660 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Kyle Piddington <kpiddington@apple.com> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shrek Shao 73ec28af 2022-03-23T21:13:45 Revert "Vulkan: Fix invalid access with display texture share group." This reverts commit 1099b5ef2279cfe1988a39c8e011aada59c650f1. Reason for revert: suspect culprit of 1309304 Original change's description: > Vulkan: Fix invalid access with display texture share group. > > Create bufferpool that owns by RendererVk. > If we are using EGL_ANGLE_display_texture_share_group > extension, use the bufferpool owned RendererVk, > otherwise, use the bufferpool owned by EGL::ShareGroup. > The bufferpool lifetime will remain consistent with > texture lifetime. > > Bug: chromium:1299211 > Change-Id: Ie4e87cea1dfd20dabab24e2afed6ddd92e469888 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3531155 > Reviewed-by: Charlie Lao <cclao@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Geoff Lang <geofflang@chromium.org> Bug: chromium:1299211, 1309304 Change-Id: Ibdc119ef6bb52352858114d72a0f1c0edcd4da5e No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3546288 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Shrek Shao <shrekshao@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Yuxin Hu 1099b5ef 2022-03-17T17:20:44 Vulkan: Fix invalid access with display texture share group. Create bufferpool that owns by RendererVk. If we are using EGL_ANGLE_display_texture_share_group extension, use the bufferpool owned RendererVk, otherwise, use the bufferpool owned by EGL::ShareGroup. The bufferpool lifetime will remain consistent with texture lifetime. Bug: chromium:1299211 Change-Id: Ie4e87cea1dfd20dabab24e2afed6ddd92e469888 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3531155 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 20e7bbb7 2022-03-18T17:03:18 Vulkan: Fix invalidate of attachments with emulated format Some image formats may be emulated such that the emulated format has more channels than the original. ANGLE clears the image once so that these extra channels contain valid values, and carefully ensures they are never modified. For swapchain images with such formats, as they are automatically invalidated at the end of the frame, a workaroud was added to make sure they are re-cleared in the beginning of the next frame. This however doesn't fix the issue of glInvalidateFramebuffer resulting in the contents of attachments with such formats to be discarded (even if the following render pass clears it, the contents are invalid in between). This change instead makes sure invalidate of images with emulated formats that have extra channels are handled appropriately: - On IMR hardware, the invalidate is dropped altogether as it provides little to no benefit. - On TBR hardware, a clear is automatically staged on the invalidated image. The latter replaces the workaround that was added to make the following render pass use loadOp=CLEAR, by adding a clear that's respected regardless of what the future usage is. This change also paves the way for a future change where the invalidate of color attachments is tracked in render passes similarly to how depth/stencil currently is. With this change, the image is no longer in an inconsistent state where its contents are considered invalid, even though some channels are meant to remain valid. Bug: angleproject:6860 Change-Id: Iec5b4854dfbe3a0bf93cd5aa82c19fe116065744 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3536389 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi 730c1271 2022-01-07T13:41:08 Vulkan: Submit queue more often for texture data Outside command buffers should be flushed more often in order to prevent the texture data accumulation just before the first render pass when they are referenced. * Added a tracker next to copyBufferToImage() for texture size (in ContextVk). When its value passes kMaxBufferToImageCopySize, the outside command buffer operations should be submitted and the tracker would be reset. Currently, the threshold value is set to 1 << 28 = 256M. * Added a variation of submitFrame() to be used in outside command buffer submission. The main difference is that it copies mResourceUseList into GetShareGroupVk() rather than move it. * Refactored the two functions into submitFrameImpl(). * Added a helper function to submit the outside command buffer. * Added explicit copy functions for ResourceUseList and SharedResourceUse. The counter in the copied object is incremented by 1. * Added a test to make sure submitting the outside command buffer does not break the render pass. Bug: angleproject:6354 Change-Id: Ia1d4f857fcbd06934609c94622ccbf675b3b1c72 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3379231 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
angle-autoroll 093d4287 2022-03-21T12:57:10 Roll vulkan-deps from 51988dcdccbf to 61b4f5b95321 (21 revisions) https://chromium.googlesource.com/vulkan-deps.git/+log/51988dcdccbf..61b4f5b95321 Changed dependencies: * vulkan-headers: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Headers.git/+log/384881cc90..32c07c0c53 * vulkan-validation-layers: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers.git/+log/6c8f1627a3..af4bf61013 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/vulkan-deps-angle-autoroll Please CC ynovikov@google.com on the revert to ensure that a human is aware of the problem. To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Bug: angleproject:7105 Change-Id: Id26d7dfdd9745f549ea08f584e4dd9dc88b7bc90 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3539789 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi f6910a9a 2022-03-20T22:43:57 Vulkan: Update pipeline creation doc Bug: angleproject:4889 Change-Id: Idb97d0484a716300feb9ed9a3fd882fbec870dbf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3539440 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: mohan maiya <m.maiya@samsung.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev e56f185b 2022-03-19T10:41:50 Metal: clarify instance count assertions Bug: angleproject:6963 Change-Id: I5a686d560efb7912b3426560c8be2806a943158c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3536659 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Kimmo Kinnunen 9637185c 2022-03-10T15:38:13 Add ForceGPUSwitch to EGL_ANGLE_power_preference eglHandleGPUSwitch() does not work with WebKit sandbox profile. The root cause is that we do not know the primary display, and as such we do not know which GPU drives this. Add eglForceGPUSwitchANGLE(display, gpuIDHigh, gpuIDLow). This lets the caller figure out the GPU in another process. Then the caller can just set the GPU in the sandboxed process. Add tests that are disabled by default until the runner and the infrastructure supports running the tests with automatic switching enabled. Bug: angleproject:7092 Change-Id: I316ee431156596effbdb89659a5e24291719a204 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3516274 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Alexey Knyazev 7c616871 2022-02-01T15:12:53 Metal: Implement ANGLE_base_vertex_base_instance Includes command buffer and MSL translator updates. The DrawElementsInstancedBaseVertexBaseInstance tests from DrawBaseVertexVariantsTest suite fail for dynamic draw and stream draw buffer usages. Bug: angleproject:6963 Change-Id: I6caa144860356d5fc85948b72458bec282ea3a3b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3429819 Reviewed-by: Kyle Piddington <kpiddington@apple.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Constantine Shablya e74d0e81 2022-02-11T18:05:12 Vulkan: Implement EGL_KHR_partial_update This change provides a trivial implementation of partial update that does nothing, making apps that want this extension happy. A possible efficient Vulkan implementation would use the damage set to narrow down render area, but it appears to only be useful for only some TBDR hardware. Bug: angleproject:6960 Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com> Change-Id: Ic553ac9590c336093f1bf25a6521574622599bf6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3427640 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Auto-Submit: Constantine Shablya <constantine.shablya@collabora.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi b74d6768 2022-03-17T16:48:21 Vulkan: Refactor D/S usage tracking in render pass This is in preparation for doing the same for color images. That is in turn in preparation for optimizing mid-render-pass clears, which require an answer to the following query: "has this color image been read from / written to so far in the render pass?" Bug: angleproject:5048 Change-Id: I8abe97919897b8fbf644482071bf7326ca3325d6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3533143 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill a55526a5 2022-03-17T11:11:37 Vulkan: Ignore VUID-vkCmdDraw-None-06538. Suspected as being incompatible API usage in ANGLE. Bug: angleproject:7105 Change-Id: I8c806b1ae090c5bedd762c1539a228c31a553858 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3533140 Auto-Submit: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 22f177eb 2022-03-17T16:58:37 Vulkan: Expose advanced blend for non-coherent devices as well Reliance on coherent behavior was accidental. Bug: angleproject:3586 Change-Id: I86d055cf640368b57256910764c44596b23ccdd8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3535299 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 44e84661 2022-03-17T15:02:21 Revert "Emulate RGB10 (no alpha) on desktop OpenGL." This reverts commit 6404be2defd3ded3ff2f0437bb87fe515e10f2a7. Reason for revert: Extension was not fully enabled due to test bug. Original change's description: > Emulate RGB10 (no alpha) on desktop OpenGL. > > The OpenGL ES extension GL_EXT_texture_type_2_10_10_10_REV > requires RGB and RGBA formats to be supported but Desktop OpenGL > does not support RGB. Emulate it with the existing > emulatedAlphaChannel path in TextureGL. > > Bug: chromium:1300575 > Change-Id: I0e6d1044afbc55cf6d4f987cc98b357ff11ff006 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3517346 > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Geoff Lang <geofflang@chromium.org> Bug: chromium:1300575 Change-Id: Ib3810a18888544f1700a1f648a5094c19973d86d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3533139 Reviewed-by: Geoff Lang <geofflang@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Alexey Knyazev 479f1988 2022-03-17T11:50:46 Simplify ValidCompressedBaseLevel Bug: angleproject:7099 Change-Id: I9592aebde56808556f72b2b94a39f94d077f9db2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3529527 Reviewed-by: Brandon Schade <b.schade@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Kimmo Kinnunen b465a736 2021-12-21T12:52:40 Metal: Remove redundant CommandQueue::mMetalCmdBuffersTmp Instead of a member variable, instantiate the temporary at the use site. Bug: angleproject:6842 Change-Id: I64848bc937ce2945e6ac55adea8a6dffcaf9b00d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3347649 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: John Cunningham <johncunningham@apple.com> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jamie Madill e8ee847d 2022-02-23T12:25:39 Vulkan: Add UpdateDescriptorSetsBuilder. This helper class encapsulates the vkUpdateDescriptorSets caching. As part of the refactor, we switch passing a ContextVk to passing a vk::Context with some mutable variables. This helps encapsulate ContextVk. Since we use the perf counters in many places, this CL moves the perf counters to vk::Context, so we can access them everywhere. Refactoring change only. Bug: angleproject:6776 Change-Id: Id529962b2f425bece6f9b3bd0cd1698c692e58cb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3484980 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 98bb4f32 2022-02-23T16:51:32 Vulkan: Implement advanced blend through extension This change exposes GL_KHR_blend_equation_advanced if VK_EXT_blend_operation_advanced is supported. No emulation is yet implemented. Bug: angleproject:3586 Change-Id: Ie7a442c22e028e3aa45ccef52db320e205664d49 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3487951 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 3ddb21fd 2022-02-23T14:15:48 Front-end support for KHR_blend_equation_advanced Bug: angleproject:3586 Change-Id: I27086295e7455ce8848db1c6004917fea40202e8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3484785 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Brandon Schade 459bdc2f 2022-03-16T12:04:38 Reintroduce validation check only for D3D To avoid undefined behavior, D3D requires the base mip level to have multiple-of-4 dimensions. Add this validation check back in. Bug: angleproject:7099 Change-Id: Id51f6cd4c745455062b864c0d291b9857e985e35 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3530499 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Commit-Queue: Brandon Schade <b.schade@samsung.com>