src/libANGLE


Log

Author Commit Date CI Message
Kenneth Russell 6a0c779e 2022-06-01T14:43:41 Uptream Vivante and VMWare vendor ID recognition. Case-insensitively alphabetize the IDs and helper functions. Bug: angleproject:6839 Change-Id: Ib6746b3e6a8858e85b70c04424093ddbd02285fc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3684955 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Gregg Tavares <gman@chromium.org>
Shahbaz Youssefi e04314fd 2022-05-30T01:09:31 Vulkan: Include state in pipeline graph dump Each program generates a group of nodes. The group's description is the common state among all nodes. Each node contains the diff with the shared state. Arrows between nodes indicate the GraphicsPipelineTransitionBits that have caused the transition. State that is 0 is not output for brevity. Bug: angleproject:6565 Change-Id: I7b6a95efcee63f1d7d368d8e062c5c1d221fb8b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3673829 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gregg Tavares 8a0351a5 2022-05-26T14:29:21 Metal:Dynamically choose max draw buffers. The code was hard coded to 4 which is lower than OpenGL's 8. This implementation keeps a hard coded array of size 8 in rx::mtl::RenderPassDesc and rx::mtl::RenderPipelineOutputDesc but only uses up to the display's limit. Bug: angleproject:7280 Bug: angleproject:5730 Change-Id: Idd7e64dc47697882b44540804159566158e1e924 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3671695 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Gregg Tavares <gman@chromium.org>
Gregg Tavares 17f9e941 2022-06-01T15:22:29 Metal: Upstream clear performance fix Restricts in-flight render passes per command buffer a predefined limit. The goal is to reduce the number of active render passes on the system at any one time. Patch is from: https://bugs.webkit.org/show_bug.cgi?id=234008 Bug: angleproject:7386 Change-Id: I6712bf38722e2685ed7d21f12ed0a680779b7a41 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3685190 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Gregg Tavares <gman@chromium.org>
Gregg Tavares e70bea8a 2022-06-01T12:30:56 Metal: Update MAX_LOD_BIAS The Metal implementation set MAX_LOD_BIAS to 2.0 which is the minimum the spec requires but setting a limit requires the implementation to actually respect that limit. AFAIK the limit on most GPUs, including Metal, is however many mips are allowed thereby letting you select any mip level. Note that as far as I can tell, MAX_LOD_BIAS can be larger than the maxiumum number of mip levels but there's no way to observe that behavior. There is a WebGL test for this here https://github.com/KhronosGroup/WebGL/pull/3419 It passes on OpenGL and fails on Metal without this CL. Bug: angleproject:7280 Change-Id: I365cb5b3f872cd5036765f4eec932be1e2c07f8f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3684356 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Gregg Tavares <gman@chromium.org>
Faye Zhang 32a0ee92 2022-05-31T10:51:06 Code Cleanup In validationES.cpp, the framebuffer is required to have 0 depth bits (to conform to OpenGL ES 3.2 specifications). That is, ImageHelper::copyImageDataToBuffer() will not be called on a buffer with combined depth and stencil format. Replacing the lines relating to testing combined depth and stencil format ImageHelper::copyImageDataToBuffer() with an assert. Bug: angleproject:6856 Change-Id: I911500910b2065eb21c72d7f2d8ff481f4afa304 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3680862 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Faye Zhang <ffz@google.com>
Stephen White 6c0d4658 2022-05-27T15:32:42 D3D11: implement stencil texturing. When GL_DEPTH_STENCIL_TEXTURE_MODE is set to GL_STENCIL_INDEX, GL requires the stencil value to be in the R component. However, when sampling a depth24stencil8 texture in D3D11, the stencil ends up in the G component. So in this mode, swizzle the result from G to R. In order to sample stencil, use the appropriate stencil-only format for the SRV: X24_TYPELESS_G8_UINT for d24s8, X32_TYPELESS_G8X24_UINT for d32fs8. This required adding a new field to D3D11 Format. Bug: angleproject:7303 Change-Id: I7cf70efaaf6c833fa0b2497e4080618dfd7103ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3679485 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 28b4c378 2022-05-27T15:45:59 Vulkan: Pipeline creation feedback in perf counters Bug: angleproject:5881 Change-Id: I42917cab3c97abb50a14035972a96728dcb990b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3672851 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi b0d75fb5 2022-05-31T16:55:23 Vulkan: Use 64-bit counters Some upcoming counters don't fit in 32 bits. Bug: angleproject:5881 Change-Id: I2de8a603cabdb5f7417c29d5f37a50899485d6d3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3679488 Commit-Queue: Charlie Lao <cclao@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 53fb57a6 2022-05-31T12:13:59 Vulkan: Fix xfb emulation bug w.r.t array elements This change handles corner cases where the 0th element of the array is not captured. Bug: angleproject:7376 Change-Id: I358f064abe5e1702985ab0faf7465cef178e7b87 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3679484 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 5a2cc71c 2022-06-01T12:06:07 Update extension support (June 1, 2022). Now includes data for Pixel 6 on Android 13. Bug: angleproject:7375 Change-Id: I115f8ead1cbfeb55b7314164409b262f58078ca5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3684029 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill da30caec 2022-05-26T13:35:24 Vulkan: Switch resource tracking. CommandBufferHelpers now determine if a Resource is busy by looking at the "ResourceCommandBuffers" list in each ResourceUse. This reduces CPU overhead in the Aztec Ruins trace by up to 3%. Bug: angleproject:5664 Change-Id: I8d927af7f39db38c98d746ca4cc01f343d0df2e8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3668836 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1ce69722 2022-05-18T13:05:22 Vulkan: Track used command buffers in ResourceUse. The list of command buffers to ResourceUse will replace tracking resources in a CommandBufferHelper. Currently the two tracking methods live side-by-side, and the old method will be removed in a future CL. Bug: angleproject:5664 Change-Id: Ia04d77e72c508e10b549db8c8dd5f0472e4edc83 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3656069 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Stephen White 43b5311f 2022-05-31T12:03:23 D3D11: minor cleanup to getSRVLevel(). Change getSRVLevel() to take an enum rather than a bool. Bug: angleproject:7303 Change-Id: I5b39b1b6e4f2f3f8a6bc8dd3f5690368f427f574 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3679482 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Geoff Lang b6a93d75 2022-05-31T12:20:37 GL: Temporarily enable validation for all GL calls. Turn on error checks after each GL call to catch potential driver errors in the wild. Bug: chromium:983167 Change-Id: Ie8b394384223155cd033baca19306396f406cdbb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3679483 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Peng Huang <penghuang@chromium.org>
SeongHwan Park d96cee66 2022-05-31T02:41:32 Fix to invalidate cache when binding Transform Feedback. Bug: chromium:1330379 Change-Id: I091116286ac511c50f9abcffa4d3cf350be920b4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3677115 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 31c13df5 2022-05-30T15:06:26 Revert "Initialize buffer contents separately from BufferImpl::setData" This reverts commit 34cff1a14b635c76a9063b8710e948d04ef98a79. Reason for revert: Speculative revert for Mac M1 WebGL failures. Bug: chromium:1330314 Original change's description: > Initialize buffer contents separately from BufferImpl::setData > > Some backends can initialize buffer data faster than allocating a > zero-filled scratch buffer (GL can map and memset for example). > Allow those backends the opportunity to make these optimizations. > > Verified that GL, D3D and VK backends do not regress by using a > separate set data call. > > Bug: chromium:983167 > Change-Id: Ibcbe6016059434dc36ab3c754df6a24f0a6e5e72 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3039778 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Peng Huang <penghuang@chromium.org> > Commit-Queue: Geoff Lang <geofflang@chromium.org> Bug: chromium:983167 Change-Id: Id1bfa76b832c35fd0b3ade04da16735aa089fdd2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3677335 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Peng Huang <penghuang@chromium.org>
Jamie Madill 9f4b9c65 2022-05-18T14:39:18 Vulkan: Refactor command buffer retain calls. This removes "getResourceUseList" from the command buffers, and instead we pass around the command buffer helpers. Since future CLs will change the way we track resources, this provides for a more stable interface for tracking. Bug: angleproject:5664 Change-Id: I7118788570eaa3c0ddb6d5ef523e050ad7be00ad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3645814 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Alexey Knyazev 33b254fe 2022-05-28T00:00:00 Fix ValidateFragmentShaderColorBufferMaskMatch for indexed masks Adjust WebGL-specific validation, add test. Bug: angleproject:4394 Change-Id: I4d51d6d7639a4ec3115025c858434491845440a2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3673298 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi 23f213d1 2022-05-26T23:43:44 Vulkan: Make drawable size uniform As a specialization constant, it's impossible to predict the value the drawable size may take, which in turn makes it impossible to warm up the Vulkan pipeline cache at link time. Bug: angleproject:7366 Change-Id: Ia3d1860a4fcb8e3078fdcb8d02a2e0cd173ea028 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3671976 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi a2fe4445 2022-05-26T12:42:39 Vulkan: Sync pipeline cache only when truly changed The Vulkan pipeline cache was considered dirty when ANGLE added a new pipeline. However, a new pipeline doesn't necessarily translate to new blobs in the pipeline cache. With this change, the cache is synced only if its size has changed. Bug: angleproject:5881 Change-Id: I0226426680f1e6b0e2bfde66ea6409362b8e72c9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3668835 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Mohan Maiya 9ea3967d 2022-05-22T13:06:18 Bug fix in GL_EXT_YUV_target Shaders with multiple samplers need to account for conflicting YUV sampler states and accordingly reevaluate them when sampler uniforms are updated. Tests: ImageTestES3.ProgramWithBothExternalY2YAndExternalOESSampler* Bug: angleproject:4852 Change-Id: Ie633e62f0bbb89f217183623d4fc6ab5b3acfd81 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3661211 Reviewed-by: Trevor Black <vantablack@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 34cff1a1 2021-07-19T14:29:35 Initialize buffer contents separately from BufferImpl::setData Some backends can initialize buffer data faster than allocating a zero-filled scratch buffer (GL can map and memset for example). Allow those backends the opportunity to make these optimizations. Verified that GL, D3D and VK backends do not regress by using a separate set data call. Bug: chromium:983167 Change-Id: Ibcbe6016059434dc36ab3c754df6a24f0a6e5e72 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3039778 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Peng Huang <penghuang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 2df17a12 2022-05-25T16:18:37 Vulkan: Pack driver uniforms Previously 5 vec4s were used for driver uniforms + 2 vec4s if specialization constants couldn't be supported. The driver uniforms are rearranged and packed such that only 2 vec4s are normally used, which include fallback for specialization constants as well. In the future, most of the specialization constants may turn into uniforms, and this change prepares for that. Additional uniforms are used (3 vec4s) only if common extensions are missing; transform feedback and bresenham lines. This change makes it more practical for driver uniforms to be turned into push constants. Additionally, these uniforms could potentially be loaded and cached at the beginning of the shader for more efficient memory access. On Pixel6, with this change, the traces show no difference in wall time. On most traces, CPU time shows up to ~7% improvement. Bug: angleproject:7366 Change-Id: I0f47f863955af06a19c69d1f1d7c45b97d95476e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3668151 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 98c2e169 2022-05-20T16:17:49 Vulkan: Reduce pre-rotation spec const to bool The specialization constant now only dictates whether x and y should be swapped. The complete 8 possible states of rotation and y-flip are achieved by using this swap in combination with a driver uniform for x and y flip. Swapping is still a specialization constant to avoid degrading performance of dFdx/dFdy which otherwise would need both to be evaluated instead of one. On platforms which don't support pre-rotation, the specialization constant will never change and driver uniforms entirely govern y-flip. On platforms that do support pre-rotation, only two variations of the pipeline are needed. Bug: angleproject:7366 Change-Id: I73f84e89fa9349d2098fa5b21573aee57d93a30c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3663151 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Lingfeng Yang <lfy@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Stephen White ee023e6a 2022-05-26T15:23:18 D3D11: fix constant buffer cache lookup. The code was accessing the constant buffer cache by the buffer index, but storing it by the register index. The fix is to use the register index in both cases. Bug: angleproject:7304 Change-Id: I750ba2911140660b42db8e0035984da5e94b14e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3668840 Commit-Queue: Stephen White <senorblanco@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gregg Tavares cd80b511 2022-05-26T12:00:13 Metal: Upstream uniform limits from WebKit Increases the limit from 4k to 16k which matches OpenGL. Patches are from: https://bugs.webkit.org/show_bug.cgi?id=238914 https://bugs.webkit.org/show_bug.cgi?id=240896 Bug: angleproject:7280 Change-Id: I404adce0066680513e3eaa56bd4b1079c39a7f03 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3669602 Commit-Queue: Gregg Tavares <gman@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Shahbaz Youssefi 757b8497 2022-05-25T21:58:29 Vulkan: Fix reserve varying for xfb (take 2) When the xfb extension is used, anything that might result in gl_Position being modified at the end of the shader should cause a varying to be reserved for capturing it. Previously, pre-rotation support was added to the condition (incorrectly, which is fixed in this change), but emulated pre-rotation and no-negative-viewport-support also results in modifications to gl_Position, so they are added to the condition as well. Bug: angleproject:5421 Bug: angleproject:7364 Change-Id: Ieba39b3e9f9de68ca97e94bfc3b75d787e69315b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3668828 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 891dd5b3 2022-05-25T23:05:49 Vulkan: Fix mid-RP draw clear w.r.t growing scissor UtilsVk::clearFramebuffer didn't grow the render area if scissor had grown. FramebufferVk::clearWithCommand does that and is unaffected by the bug. Normally, ContextVk::updateScissor grows the render area automatically, but clear is special in that it's not affected by the viewport while ContextVk::updateScissor is. Bug: b/232298034 Change-Id: I260a1948ba1b043e5e331e0e5c60d41e5b4cc192 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3668830 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Kai Ninomiya 7ad48b84 2022-05-26T00:23:35 Revert "Add Vulkan backend support for texture labels" This reverts commit 1afb80587e302e2ce9a901a69fd66e5ef98a73b6. Reason for revert: Null-dereference crash starting here: https://ci.chromium.org/ui/p/chromium/builders/ci/mac-swangle-chromium-x64/26323/blamelist (see angle blamelist) Crash reason: EXC_BAD_ACCESS / KERN_INVALID_ADDRESS Crash address: 0x0 Process uptime: 24 seconds Thread 0 (crashed) 0 0x0 rax = 0x0000011c0113c000 rdx = 0x0000011c09094590 rcx = 0x0000000000000006 rbx = 0x0000011c0e2a0000 rsi = 0x00007ffedfc11500 rdi = 0x0000011c01378010 rbp = 0x00007ffedfc11540 rsp = 0x00007ffedfc114f8 r8 = 0x0000000000000006 r9 = 0x0000000123a6ccc4 r10 = 0x0000011c011018d0 r11 = 0x00007ffdbc1a4834 r12 = 0x0000000000000006 r13 = 0x0000011c090944b0 r14 = 0x0000011c0e34c000 r15 = 0x00007ffedfc11550 rip = 0x0000000000000000 Found by: given as instruction pointer in context 1 libGLESv2.dylib!gl::Context::objectLabel(unsigned int, unsigned int, int, char const*) + 0x156 rbp = 0x00007ffedfc116a0 rsp = 0x00007ffedfc11550 rip = 0x00000001357b38e6 Found by: previous frame's frame pointer 2 libGLESv2.dylib!_GL_ObjectLabelKHR + 0xa5 rbp = 0x00007ffedfc116f0 rsp = 0x00007ffedfc116b0 rip = 0x000000013578e7e5 Found by: previous frame's frame pointer 3 Chromium Framework!gpu::gles2::GLES2DecoderPassthroughImpl::DoBindTexture(unsigned int, unsigned int) + 0x1ea rbp = 0x00007ffedfc11780 rsp = 0x00007ffedfc11700 rip = 0x000000011e7dcd4a Found by: previous frame's frame pointer Original change's description: > Add Vulkan backend support for texture labels > > Add onLableUpdate support for textures in the Vulkan backend. > > Bug: b/229105865 > Change-Id: Id9e5b2b81352e97b7843a63f27709739005dc2f3 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3645854 > Reviewed-by: Ian Elliott <ianelliott@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Ian Elliott <ianelliott@google.com> Bug: b/229105865 Change-Id: I5a5e00084e1320a486c43fec9d41b9ae6cb2b1db Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3669657 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Amirali Abdolrashidi fea19567 2022-05-17T17:44:06 Vulkan: Remove removeEarlyFragmentTestsOpt flag * Removed removeEarlyFragmentTestsOptimization and the related SPIRV transformation and variables. * Removed mUsesEarlyFragmentTestsOptimization. * Removed SH_EARLY_FRAGMENT_TESTS_OPTIMIZATION. * Merged updateUsesEarlyFragmentTestsOptimization() into updateFragmentInoutRange(). Bug: angleproject:7347 Change-Id: I7299bd4e8ab5363e5cf06eb48419d4f469106e12 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3648217 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Jamie Madill 7b880204 2022-05-25T10:09:15 Vulkan: Remove invalid ASSERT in DescriptorSetDesc. This invalid ASSERT somehow was undetected pre-commit when landing the descriptor set cache CLs. It was code from before a refactor that broke the ASSERT's invariant condition. Bug: angleproject:7354 Change-Id: I4e84c78911e4c6aad826b1acabcd87216884509c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3666250 Commit-Queue: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Antonio Caggiano 4aa0975e 2022-05-24T17:34:31 Vulkan: Support Wayland EGL_DEFAULT_DISPLAY If native display is EGL_DEFAULT_DISPLAY, then DisplayVkWayland will create a new wl_display structure by connecting to the default Wayland socket. Bug: angleproject:6902 Change-Id: I0765d126f8e809426deaed5d0fb1eb0f7439164b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3664478 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4a20c914 2022-05-20T10:26:15 D3D: Fix race condition with parallel shader compile. Bug: chromium:1317673 Change-Id: I0fb7c9a66248852e41e8700e80c295393ef941e8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3651153 Reviewed-by: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Lingfeng Yang <lfy@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Gert Wollny ccca0c25 2022-05-22T00:18:41 libANGLE: Fix evaluating the sample count OpenGL deals with the maximum number of samples, but Vulkan provides a mask of supported sample counts, so extract and limit the maximum sample count accordingly. Bug: angleproject:7328 Change-Id: If4867b2a5104062ec863eb6eb1e0c8e78e7a9c00 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3652422 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Faye Zhang c608df69 2022-05-23T17:19:02 Code Cleanup In Debug.h, we unconditionally set UNREACHABLE_IS_NORETURN to 0. Since UNREACHABLE_IS_NORETURN is only used in #if directives and it is always false, we can remove all uses of UNREACHABLE_IS_NORETURN. Bug: angleproject:6134 Change-Id: I3aa88d802099d70990eae697d4f056a3f650b48d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3661376 Commit-Queue: Faye Zhang <ffz@google.com> Auto-Submit: Faye Zhang <ffz@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Faye Zhang <ffz@google.com>
Alexey Knyazev 8291f2d3 2022-05-20T00:00:00 Fix ValidCompressedSubImageSize for 3D uploads Add CompressedTexSubImage3DValidation* tests Bug: angleproject:4056 Change-Id: I088273b6349729fadf2c21ca7b349e44dc9ce5f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3657408 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Mohan Maiya 84a0b462 2022-05-20T15:51:11 Vulkan: Bug fix in GL_QCOM_shading_rate A default value of _1x1 for mShadingRate interacts badly with sample shading state on some vendors. Instead set the default to Undefined and return early in such cases. Bug: angleproject:7172 Change-Id: If0a280090e6611817d2f5d75929ef2b654ddb186 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3658245 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Mark Lobodzinski 1afb8058 2022-05-12T16:19:14 Add Vulkan backend support for texture labels Add onLableUpdate support for textures in the Vulkan backend. Bug: b/229105865 Change-Id: Id9e5b2b81352e97b7843a63f27709739005dc2f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3645854 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Cody Northrop 7a243dbe 2022-05-22T19:48:34 Capture/Replay: Allow repeated Gen-on-Bind for resources We aren't clearing items from the map of resource IDs used to track Gen-on-Bind. Before this CL, an app could Gen-on-Bind, delete the resource it genned, then Gen-on-Bind again to trigger this error. The options are to add tracking to remove items from the map when they are deleted, or just remove the error and allow it to happen. Since this happens so rarely, going with the simple approach of removing the error. Test: Star Wars: KOTOR MEC Bug: angleproject:7353 Change-Id: I320771692e1c01e254fc977f5eef99284cc95f67 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3659505 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Shahbaz Youssefi 11e9c835 2022-05-22T23:52:35 Vulkan: Dump graphics pipeline cache graph Bug: angleproject:6565 Change-Id: Ica8fdc40ece3e1c66fae8a4f8f70a3d33374fdb8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3656639 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Hailin Zhang 35e54dbb 2022-05-20T17:24:11 Vulkan: Fix EXT_texture_buffer support condition More formats than necessary where required to have the STORAGE_TEXEL_BUFFER feature. This was based on the table in the EXT_texture_buffer spec, but that only applies to sampler buffers. Support for image buffer formats is based on acceptable formats to glBindImageTexture. Bug: b/206367167 Change-Id: I0c94c3d5a99c1e99ee1f9b05b1accdfaa38101af Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3658000 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Hailin Zhang <hailinzhang@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Antonio Caggiano 6e258863 2022-05-09T18:45:02 Vulkan: Use packed enum for present modes This will be useful for cases where ANGLE would need a non-Vulkan present mode. Bug: angleproject:7217 Change-Id: I3428ac9fb20788543cb24a0aa5f140e992e94001 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3636057 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi e4a517c9 2022-05-17T23:58:23 Vulkan: Rearrange GraphicsPipelineDesc to reduce footprint Bits for VK_EXT_extended_dynamic_state2 are moved to the end of the desc. Some bits are also rearranged and some paddings removed for a total of 4 bytes of reduction in desc size. Bug: angleproject:7328 Change-Id: I48f20408a8a2cb7bce0d8e2d0d2ccd8a121f7894 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3652747 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi bb3afdf4 2022-05-17T16:08:06 Drop support for 64xMSAA+ Hardware that supports anything more than 32xMSAA is rare (practically only Nvidia). That high number of samples is hardly useful either way. This change reduces the number of words for the sample mask to 1, reducing the amount of state needed to track it. Bug: angleproject:7328 Change-Id: Iea9add1cbeef494ff9bb383b10c82b839d1e53a4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3652738 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 688553c0 2022-05-16T23:27:29 Vulkan: Dynamic state for primitive restart enable Bug: angleproject:5906 Change-Id: Ida2cbe904604c638fd3a8ab498d49584dfd9c860 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3651593 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Sunny Sachanandani c76fb2d8 2022-05-18T15:29:19 Enable EXT_texture_norm16 on ES2/D3D11 Windows HDR regressed recently due to format checks added in Skia: crbug.com/1324371 Skia thinks R16/RG16 texturing is not supported, which it bases on GL_EXT_texture_norm16 not being reported on its ES2 context. Migrating to ES3 for the compositor context is a large project, and reverting the format checks in Skia is also not desirable because it helps catch bugs in ANGLE-Metal. Enable texture_norm16 on ES2 for R16/RG16 texturing since Chromium needs it for HDR video playback for P010 textures. This used to work before even though the extension wasn't advertised. Also, enable the P010 test on ES2/D3D11 which was previously ES3/D3D11 only. Bug: angleproject:7322, chromium:1324371 Change-Id: I4c2527996e37ba5365bb94b5764413e5a9fdda7b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3645892 Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org> Auto-Submit: Sunny Sachanandani <sunnyps@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Shahbaz Youssefi 3b78e0d5 2022-05-16T23:13:57 Vulkan: Dynamic state for depth bias enable Bug: angleproject:5906 Change-Id: I679a764e0a9ef74cc8a58f9061b42c0aaef56df2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3651592 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 7c83a363 2022-05-16T22:22:44 Vulkan: Dynamic state for rasterizer discard enable Interaction with primitives generated query are tested by those tests added in https://chromium-review.googlesource.com/c/angle/angle/+/2976181 Bug: angleproject:5906 Change-Id: I0ab9f54995504be770a93bf13337a5ffe20bf7eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3651582 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 2faabfe5 2022-05-16T16:19:03 Vulkan: Optimize pipeline desc w.r.t dynamic state State corresponding to VK_EXT_extended_dynamic_state is moved to the back of the description and is excluded from the hash. Bug: angleproject:5906 Change-Id: I3b6efb2674e955eed6e12b6c7096a7fea63748a9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3651581 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya ee1894e5 2022-05-18T16:39:22 Account for GL_ANGLE_yuv_internal_format when setting yuv state With the introduction of GL_ANGLE_yuv_internal_format an EGLImage source can be a YUV texture. Account for this possiblity when setting up EGLImage's state related to YUV. Bug: angleproject:5773 Test: ImageTestES3.SourceYUVTextureTargetExternalRGBSampleYUVSample* Change-Id: I7d06befa27dd6bd3408bda4d3f0cbe7cc21cd59a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3655129 Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 58fd3157 2022-05-12T00:01:19 Vulkan: Dynamic state for vertex stride Bug: angleproject:5906 Change-Id: I73b7e004fc25bf3777982736412adc1ca57504b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3644856 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Gregg Tavares 118a6484 2022-05-19T15:11:31 Metal: Upstream buffer cache fix from WebKit Patch is from: https://bugs.webkit.org/show_bug.cgi?id=239015 BufferMtl::getRestartIndices() would recalculate restart indices on each draw because RestartRangeCache::operator bool() would return m_isDirty instead of the intended !m_isDirty. Use std::optional to hold the RestartRangeCache instead of maintaining m_isDirty. This allows the type system to contribute to the correctness of the code. Dirty restart range cache is not useful and takes up memory. Bug: angleproject:7340 Change-Id: I6e3ce527700780b5fea59af405bfe06d3714e79f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3656450 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Gregg Tavares <gman@chromium.org>
Yuxin Hu 728dea2b 2022-05-19T13:04:58 Suppress Vulkan Validation Error Suppress Vulkan Validation Error to unblock the vulkan-deps roller. We should remove the suppression when the VVL issue in the commit e23f82fc84c891b3a34e6e8787913b335cbe3934 in Vulkan-ValidationLayers.git is resolved Bug: angleproject:7338 Change-Id: I3322a5b10d271dcd95da9354328facf7e3b9113d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3651531 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c7182af2 2022-05-18T15:35:30 Vulkan: Reserve varying for xfb if pre-rotation is enabled In https://chromium-review.googlesource.com/c/angle/angle/+/3562379, the varying was no longer reserved when VK_EXT_depth_clip_control is present. This is incomplete, as pre-rotation support still requires a varying to be reserved for capturing gl_Position. Bug: angleproject:5421 Change-Id: I87feea6ed738fa685b037c14c0a24349ce496cc7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3645816 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Steven Noonan 6ae0c321 2022-05-15T18:18:47 Vulkan: clamp dynamic line width to supported values On my Apple M1, MoltenVK reports wide lines are not supported. Trying to use vkCmdSetLineWidth with any value other than 1.0f will cause MoltenVK to throw an exception and stop accepting render commands. I originally tried making this a change in the frontend Context class, by clamping the value to the supported line width range. But that approach failed the WebGL conformance tests, because queries of of GL_LINE_WIDTH must match the value specified by glLineWidth. OpenGL ES docs state: The line width specified by glLineWidth is always returned when GL_LINE_WIDTH is queried. Clamping and rounding have no effect on the specified value. Bug: angleproject:7317 Change-Id: I7a3c3454e1483f9124fd70b7e9f2138bd717e1de Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3654264 Auto-Submit: Steven Noonan <steven@valvesoftware.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Hailin Zhang b7474d0a 2022-04-28T14:44:54 D3D11: Add GL_EXT_texture_buffer support tested: deqp-gles31.exe --deqp-gl-context-type=egl --deqp-case=dEQP-GLES31.functional.texture.texture_buffer.* passed Bug: b/206367167 Change-Id: I31a6f84bd701a737735a6bac2f4eef780c24a979 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3639722 Commit-Queue: Hailin Zhang <hailinzhang@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Amirali Abdolrashidi 8701f53a 2022-05-17T13:54:53 Vulkan: Fix clear value for incomplete MS textures * Added initializeContentsWithBlack() for the cases we wish to use opaque black. * Added stageResourceClearWithFormat(), which also takes an initial clear value. stageRobustResourceClearWithFormat() is included as a special case. Bug: angleproject:7151 Change-Id: I32d7a9af53b51499fe46d6e397301744dbf3c236 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3652995 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Gregg Tavares dbeba900 2022-05-17T16:52:23 Reland "CGL, MTL: pbuffer for IOSurface fails for some formats" Fixed iOS compiler error https://chromium-review.googlesource.com/c/angle/angle/+/3568380 Bug: angleproject:7175 Change-Id: I1d15ecf0081891db31470abc305e6780c81ab574 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3648215 Commit-Queue: Gregg Tavares <gman@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Stephen White b4ec8eac 2022-04-12T12:16:40 D3D11: implement image load/store for non-compute shaders. Output image metadata and image2d replacement string in other shader types. Implement the actual HLSL transform for fragment shaders. Re-enable problematic test. Bug: angleproject:7121 Change-Id: I49b815695757e822e6fdfe599e07ceb5b1d6a75c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3550544 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Mohan Maiya 2fdd7bfd 2022-05-17T13:31:58 Vulkan: Support binding 2D slice of a 3D texture to an image unit Support binding a 3d texture as a 2d texture by specifying that it is non-layered during glBindImageTexture and expose support for EGL_KHR_gl_texture_3D_image when VK_EXT_image_2d_view_of_3d vulkan extension is supported. Tests: ComputeShaderTest.BindImageTexture3D dEQP-GLES31.functional.image_load_store.3d.*single_layer Bug: angleproject:7320 Change-Id: Ie2f0dfcdf302a4aa58990f74329ca36e62cd3902 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3648586 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Charlie Lao ff011779 2022-05-13T12:36:24 Vulkan: Let texture buffer handle BufferVk's storage change When buffer's storage changed due to glBufferData call, texture buffer code should also respond to this and update the texture descriptor set. This CL merges BufferVkStorageChanged message into InternalMemoryAllocationChanged and removed BufferVkStorageChanged all together. Bug: angleproject:7283 Change-Id: I230ee7268634e747d06eab1954f5a76ecf84c9d6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3646955 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: mohan maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 2abf9adf 2022-05-17T12:06:02 Vulkan: Bug fix in YUV descriptor pool allocation The commit d8d396dbc0c88 refactored descriptor set and pool logic but introduced a bug where it did not account for multiple immutable sampler descriptor count. Tests: Texture2DTestES3*Yuv*Vulkan Bug: b/155487768 Bug: angleproject:5033 Bug: angleproject:5773 Bug: angleproject:6141 Bug: angleproject:6776 Change-Id: I8f5d88ff829b8d0be4c73ff7aa33a76931581f1c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3652249 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Trevor Black <vantablack@google.com>
Peng Huang c649979b 2022-05-17T20:53:16 Create EGLImage from VkImage correctly with non sized format Sometime, client may pass in non-sized internal formats (GL_BGRA, GL_RED and GL_RG) for creating EGLImage from VkImage. For those formats, angle::Format::InternalFormatToID(internalFormat) can not return valid result. Fix the problem, by converting internalFormat to sized format first. Bug: chromium:1326658 Change-Id: Id88e0614a2a9f55aabac116ea95ed8cec02672a3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3652741 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Antonio Caggiano a277f1bc 2022-04-13T15:47:10 Vulkan: Fix Wayland surface size queries On Wayland, VkSurfaceCapabilitiesKHR currentExtent is the special value (0xFFFFFFFF, 0xFFFFFFFF), so we can not use it to query its size. Bug: angleproject:6902 Change-Id: Icf350bfc41577f2b95da08a8dbb7773318a3e568 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3583986 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Stephen White 6136ba27 2022-05-16T12:35:43 D3D: minor cleanup of gl::RangeUI usage. Bug: angleproject:7121 Change-Id: I444f1e5e96dab84315afc290d6044d0dee560d6e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3651055 Commit-Queue: Stephen White <senorblanco@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Antonio Caggiano 4ece3b08 2022-02-24T15:07:25 Vulkan: Multiple DRM formats A DRM format may be converted into more than one Vulkan format, therefore we try to create a dmabuf image with all candidate Vulkan formats until we succeed. Bug: angleproject:7065 Change-Id: I376d10a596ce81347c8ae21464c2c2db048f01d2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3516018 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Gert Wollny d75bf9ad 2022-04-29T09:15:35 Capture/Replay: Also limit the number of per shader SSBOs The compiler checks these values, so they should be in sync with the global limits. Fixes test not yet listed in the expectations: ProgramPipelineTest31.MaxFragmentShaderStorageBufferObjects/* Bug: angleproject:7252 Change-Id: Ie967ded15434cf7144d322b6fd4ee5fc7175f8dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3613921 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Shahbaz Youssefi 891a4682 2022-05-12T22:32:07 Vulkan: Dynamic state for stencil test/op Bug: angleproject:5906 Change-Id: I436c6c238a15e54919a74d2a697d1f114bb3eaf9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3647207 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 66dcca5e 2022-05-12T11:14:27 Vulkan: Dynamic state for depth test/write/op Bug: angleproject:5906 Change-Id: Ie48a0780406c6dbbdd47639f2e185dc854879140 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3646429 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Peng Huang bedb3075 2022-05-16T09:46:11 Do not call RendererVK::handleDeviceLost() for device lost RendererVK::handleDeviceLost() need to hold the mCommandQueueMutex for releasing some resources. For some cases, Locking mCommandQueueMutex may cause deadlock, because the same lock has been acquired by the same thread. Fix the problem by not calling RendererVK::handleDeviceLost() for device lost. It is OK, because RendererVK::onDestroy() will call handleDeviceLost() if the device is lost already. Bug: chromium:1273643 Change-Id: Iaaa77bdf429b703363d4155323b91baf5947d95e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3644641 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 15ecf068 2022-05-12T10:33:00 Vulkan: Dynamic state for depth bounds This state is actually unused. EXT_depth_bounds_test (which can set this state) is a desktop GL extension. If ever implemented, it should be implemented as a dynamic state. Bug: angleproject:5906 Change-Id: If613008952bb80cd98858f33eac7cdf31267ca29 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3646428 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 459c367e 2022-01-21T10:02:33 D3D: Initialize storage after generating mipmap images. When TextureD3D generates mipmaps without a storage present, it initializes all the images and then generates mipmaps on the CPU. Attempt to generate a storage after initializing all the mip images so that the mipmap generation can be done on the GPU. Fix several edge cases where texture storage was not copied back to images when redefining for mipmap generation. This resulted in the newly generated mipmaps not using the correct data. Bug: chromium:1256340 Change-Id: I76122d36385450d973bf00f7d07402a1f975492c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3406643 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 48b1f07b 2022-05-11T15:20:24 Vulkan: Dynamic state for front face Bug: angleproject:5906 Change-Id: I649b9d2ab10daac6831f0ecb23f8211d3963c8c1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3643098 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi 4e5da2d2 2022-05-11T13:58:07 Vulkan: Dynamic state for cull mode Bug: angleproject:5906 Change-Id: I3d7b888e7999d4892ff71d636ea16a2edcf7a27f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3642800 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 4b95ac7d 2022-05-12T11:29:11 Vulkan: Don't invalidate pipeline on dynamic state change Bug: angleproject:5906 Change-Id: I3a959dc5b1f62869ff77d62dce82555d00bd18e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3646427 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Peng Huang 81c84292 2022-05-13T14:44:45 Do not do cleanup for Vulkan device lost When vulkan device lost happens caused by some gl calls, the GL calls may hold a lock in RendererVk. And ANGLE will try to cleanup resources in RendererVk. Those cleanup needs to hold the same lock as well. Since the lock is not recursive lock, acquiring the same lock again will cause deadlock. Fix the problem by not cleanup resources for device lost. It should be fine, all resource should be released when client destroy the lost context. Bug: chromium:1273643 Change-Id: I93ab0c966c8e9f3579b4e6742503d8588f16ebb9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3645497 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Yuxin Hu 808192a7 2022-05-09T16:39:45 Code Cleanup In Context::initCaps(), we first read the compressedTextureFormats from the contextImpl::getNativeCaps(), then we are clearing the retrieved compressedTextureFormats array in Context::updateCaps() immediately. We shouldn't need to fill the same array twice. Removing the first array value assignments in all backend. Bug: angleproject:3408 Change-Id: Iea85d367d2c5792de4780995d8d03bcf14af484e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3635275 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Min Zhang e56f227d 2022-05-13T08:50:12 Vulkan: Add case: TextureSampleByDrawDispatchDraw This case is used to verify the implicit synchronization when GL executables switch from draw to dispatch. Besides, suppress a VVL on it. Bug: angleproject:7031 Change-Id: Idab68cfd0d4b17685f5eb5b3eec7f2cad12e5877 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3646927 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 03ccd9cc 2022-05-13T16:12:11 Revert "Vulkan: Flush texture updates more often" This reverts commit 8bb7c35c2159de2fa9e9a008679c692edd4402a6. Reason for revert: crashes tests in linux-rel Example: https://ci.chromium.org/ui/p/chromium/builders/try/linux-rel/1012030/overview Also possible flakiness https://anglebug.com/7308 Repro: out/Debug/bin/run_blink_web_tests fast/canvas/OffscreenCanvas-2d-drawImage.html Original change's description: > Vulkan: Flush texture updates more often > > * Added a pointer to the previous texture in ShareGroupVk so we can > flush the texture updates once we switch to a new texture. > > * We check if mip levels 0 and 1 are conformant in terms of > size, format and number of samples. > > * As a part of size check, we also check depths if the texture > target is either 3D, 2D array, or cube map array. For the former > two, they have to conform to mip scaling similar to width and > height. For the latter, the depth represents layer-faces and does > not change for mipmaps. > > * Added a test to ensure the pointer to the previous texture is > deleted when the corresponding texture is deleted, so the old value > is not accessed by a future mutable texture. > > * Added tests to make sure the mutable texture is uploaded with > the appropriate mip level attributes, and not uploaded in cases of > size/format inconsistencies, incompleteness, and no base level. > > Bug: b/202744914 > Change-Id: I9c2c1af87a8a49e75d3ad25523436b0cd51a7e81 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3606329 > Reviewed-by: Charlie Lao <cclao@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Bug: b/202744914 Change-Id: Id51fd4c76d058aa5100ec58ba618098c8f614253 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3645493 Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Lingfeng Yang <lfy@google.com>
Jamie Madill 21ad9b3c 2022-04-07T09:57:26 Vulkan: Add generic descriptors for DS cache. With the new design, the descriptor set cache keys include all identifying information needed to reconstruct the update descriptor sets calls except the specific resource handles. The places for the resource handles are held by serials intead. When we miss the cache, we no longer need a second step to then construct the update calls, and can build the update calls directly from the key structures in combination with a list of resource handles. Bug: angleproject:6776 Change-Id: If1660a557585a75e9aa2560d6a38c56b62f555c8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3484981 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill d8d396db 2022-04-07T09:57:25 Vulkan: Add shared descriptor set caches. This allows programs with the same sets of descriptors to share descriptor sets. Currently there is no cache eviction. This CL adds a new "Meta" class to manage the descriptor set caches. Each shared descriptor pool is unique to a descriptor set layout. The descriptor set cache is moved into the pool class. Now every instance of a descriptor pool in ANGLE has easy access to a descriptor set cache as well. Bug: angleproject:6776 Change-Id: I06982e0349f5a87e4578e769fa356ce8e7ab49f0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3424660 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi 8bb7c35c 2022-03-23T19:14:54 Vulkan: Flush texture updates more often * Added a pointer to the previous texture in ShareGroupVk so we can flush the texture updates once we switch to a new texture. * We check if mip levels 0 and 1 are conformant in terms of size, format and number of samples. * As a part of size check, we also check depths if the texture target is either 3D, 2D array, or cube map array. For the former two, they have to conform to mip scaling similar to width and height. For the latter, the depth represents layer-faces and does not change for mipmaps. * Added a test to ensure the pointer to the previous texture is deleted when the corresponding texture is deleted, so the old value is not accessed by a future mutable texture. * Added tests to make sure the mutable texture is uploaded with the appropriate mip level attributes, and not uploaded in cases of size/format inconsistencies, incompleteness, and no base level. Bug: b/202744914 Change-Id: I9c2c1af87a8a49e75d3ad25523436b0cd51a7e81 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3606329 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Jamie Madill 389ae6b9 2022-05-09T08:44:50 Add extension for read-only DS feedback loops. This will facilitate testing. Also moves some feedback loop tests from FramebufferTest to a specialized test class. Bug: angleproject:4778 Bug: angleproject:4969 Change-Id: I61235f2663a58644bf506254a869f550f1706de3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3634726 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 73cb1e6e 2022-05-11T12:53:46 Vulkan: Tag dynamic dirty bits with DYNAMIC Bug: angleproject:5906 Change-Id: Ia4294827f4c9f590448b791756ba7e95a90c8c09 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3642799 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 4ffab3bf 2022-05-10T16:17:54 Vulkan: Dynamic state for stencil reference Bug: angleproject:5906 Change-Id: I1aaf54208b173ca58ff1afd2900eca7ee78726cf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3638990 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Min Zhang 3d55cf0c 2021-12-30T11:27:26 Vulkan: Optimize the vkImage layout when used as GL_image If one vkImage has been used as GL_image in compute shader and as a GL_texture in fragment shader, no dependencies are needed for the fragment shader and other pre-fragment graphics shaders, like vertex/tess/geom. If we only assign the vkImage layout as writable when running GL executables that have Image Textures, we can specify more precise read-only barriers when running read-only GL executables. Bug: angleproject:6862 Change-Id: Iff37fdce13fea637751899253e535bf3f6663200 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3366014 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 1d8227da 2022-05-10T16:00:39 Vulkan: Dynamic state for stencil write mask Bug: angleproject:5906 Change-Id: I74adf56ec0b7b251ab3c5204b68b062d5fbc91eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3638989 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c3def6fa 2022-05-10T14:28:04 Vulkan: Dynamic state for stencil compare mask Bug: angleproject:5906 Change-Id: Ie581c6e9fe15c90c7a6d0c7c246dd5b1b30b6507 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3638988 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Stephen White e9dc0f86 2022-05-10T12:44:28 Cleanup from glBlitFramebuffer() 3D texture fix. Some minor refactoring. Move skips to test expectations and add a bug ID. Bug: angleproject:7291 Change-Id: I8d900a26508a28f6202a009c770cffb0e623dc5b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3638985 Commit-Queue: Stephen White <senorblanco@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi dcaa18b9 2022-05-10T12:27:15 Vulkan: Dynamic state for blend color Bug: angleproject:5906 Change-Id: If450e0d84410069126027142414586181fd5f0de Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3638986 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 536d6f57 2022-05-10T11:44:58 Vulkan: Dynamic state for depth bias Bug: angleproject:5906 Change-Id: I8fd7e3262fddf3aec855afdd3e4c1b9801040da1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3638983 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 780f1a41 2022-05-10T00:30:35 Vulkan: Dynamic state for line width Bug: angleproject:5906 Change-Id: Iacf9c14d9d255c8048c71c725173e4764bcfe166 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3634733 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi e73121b1 2022-05-10T22:47:20 Vulkan: Fix VulkanPipelineCachePerfTest Bug: angleproject:5906 Change-Id: Ide86708df10679309cc2aca0df088e8595d2a8c1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3641142 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Stephen White dd9b4afe 2022-05-10T17:57:29 D3D: minor cleanup for image load/store. Change-Id: I633d51f01845b92f864df1229d501d572b96b314 Bug: angleproject:7121 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3638991 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Shahbaz Youssefi 1fa4442b 2022-05-10T14:31:28 Vulkan: Set dynamic state after binding pipeline The helper function that binds the graphics pipeline also resets dynamic state. This refactoring change moves dynamic state setting to after pipeline bind, for future CLs that may override what would be reset. Bug: angleproject:5906 Change-Id: I28e5bfd7a7a5492f066df98604489808dafd560b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3638987 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Alexey Knyazev 5b623dd4 2022-05-10T00:00:00 D3D9: Enable OES_fbo_render_mipmap Bug: angleproject:905 Change-Id: I82a4eac47950ea35387857d7f7b79d326bbfdbd3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3639204 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 6ddbfa39 2022-05-09T09:06:16 Metal: Log the shader source when a shader fails to translate Refactor Metal logging to include a message string. Bug: chromium:1322521 Change-Id: I3a7b5c36fcf140b3664ad96a9da924819326bf94 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3634725 Reviewed-by: Quyen Le <lehoangquyen@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Alexey Knyazev 52904367 2022-05-10T00:00:00 D3D: Mark images clean after syncing from storage Bug: angleproject:2192 Change-Id: I114da8962f6f7aec3134d39bc51c62455e4a62ee Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3637565 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Gert Wollny 66b9214f 2022-05-03T14:48:07 Capture/Replay: rename ANGLE_CAPTURE to ANGLE_CAPTURE_GL In addition gunning "git cl format" on the current tree resulted in additional changes. Bug: angleproject:4964 Change-Id: I3df4888aef763d06f91227409dbd943d0d25689e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3634699 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>