This fails on the WebGL CTS conformance2/rendering/vertex-id.html.
Repoing here to make it easier to debug/find/fix.
Bug: angleproject:6688
Change-Id: I0a4bafc5700c77e0b6c44b067167fc4a60e63c22
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3276708
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Gregg Tavares <gman@chromium.org>
It's much easier to understand what command the perf warning refers to
when it's visible in the command buffer using a graphics API debugger.
This change creates ANGLE_VK_PERF_WARNING which gives the warning both
to the application (through ANGLE_PERF_WARNING) and inserts it in the
command buffer.
Bug: angleproject:2472
Change-Id: Ie84feed53eca5cda93e1f2bc653fcbf9bcd57b56
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3275839
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
The mFramebuffer pointer becomes stale when mFramebufferCache
is cleared. Set mFramebuffer to nullptr when this happens.
Test: --deqp-surface-type=fbo --deqp-case=KHR-GLES31.*
Bug: angleproject:6682
Change-Id: I5fd21a64f0f935de04e2934e794c915ccf880c16
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3276701
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Commit-Queue: Brandon Schade <b.schade@samsung.com>
Previously, the size of the command buffer was used as indication for
whether the render pass attachments might have been modified after
glInvalidateFramebuffer. In that case, the invalidate was undone. This
is made more precise by making sure only vkCmdClearAttachments and
vkCmdDraw* calls are counted for this purpose.
For example, inserting event markers after glInvalidateFramebuffer now
retains the invalidation.
Note that this can be even further optimized by tracking real writes to
attachments. For example, currently a draw call with depth test
disabled still undoes the invalidation of the depth buffer, but it
shouldn't.
Bug: angleproject:5079
Change-Id: I6257b4116a73213884b919bc7f3c86ff39b6aeed
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3274176
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This will be used in conjunction with SwiftShader.
Bug: angleproject:6496
Change-Id: I894aa4cf3b9473738b549de9941eb82e09234121
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3276515
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Based on the provided usage flags, the texture's image access mode is
updated to be renderable.
Bug: chromium:1266094
Change-Id: I5d092a2786fc12537ef0ad1f224137cc1fd8f864
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270980
Reviewed-by: Craig Stout <cstout@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
These are all now replaced with 'main'.
Bug: angleproject:6685
Change-Id: I36cb17625c44d06689f7debf004abd3dd016265b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3276517
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This fixes another ASAN bug that popped up with the dEQP EGL tests:
dEQP.EGL/functional_negative_api_create_context
Bug: angleproject:6660
Change-Id: I8f5ca1cc9ca77f2be28ecf120a90c9efcf9d4b24
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270977
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Render pass descriptor was not being changed
due to blend state not being checked when
looking for equality.
Bug: angleproject:6669
Change-Id: Ic85dbec29ddb53a8c7e2e708f1ac0c99512e7248
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270596
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Gregg Tavares <gman@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This second read was in transformFeedbackBitBufferWriteThenCapture.
Bug: angleproject:6646
Change-Id: I67134e5a7a9a610c11266c51bdc1ced6ef018b8a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270981
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
According to the EGL spec, we stop checking attributes when we
encounter an invalid enum. That means it's valid for an application to
pass in a list of attributes without EGL_NONE as long as one of them
is invalid. To handle this, we add lazy attribute validation to the
AttributeMap class, that gets triggered in the validation calls.
We only implement the early exit validation for the config attributes
to fix an EGL test that would access out of bounds memory.
Bug: angleproject:6660
Change-Id: I264d0f98b4ddd9e74187846e9e668270a6fbaee1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3262478
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
The texture format information in gl::Context is sized formats only.
When MSRTT textures are used, they would query the potentially unsized
format for maximum supported samples. This would return 0 and cause an
incomplete framebuffer when the sample count missmatched with other
attachments.
Bug: chromium:1238327
Change-Id: I06514b1b9badefa81bba3b7ad9ba5db932b4c12b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3260555
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
This reverts commit 67a8cf07a7.
Reason for revert: Landed Chromium-side dependency:
https://chromium-review.googlesource.com/c/chromium/src/+/3271170
Original change's description:
> Revert "Metal: Reintroduce GPU power preference selection code."
>
> This reverts commit 017161701b.
>
> Reason for revert: Blocking roller, please re-land with the fix.
>
> Original change's description:
> > Metal: Reintroduce GPU power preference selection code.
> >
> > This CL re-introduces the GPU power preference code to
> > the metal backend. It also reworks EGLDisplay caching
> > in the frontend to cache based on the native display
> > as well as the power preference attribute.
> > A new extension, EGL_ANGLE_display_power_preference is
> > added based on EGL_ANGLE_power_preference. This extension
> > is a client extension that allows selection of GPU on
> > display creation, similar to how GPUs are selected on
> > context creation in EGL_ANGLE_power_preference.
> > This CL adds EGLDisplayPowerPreferenceTest and enables it on
> > the metal backend.
> >
> > Bug: angleproject:6143
> > Change-Id: I0a081dcd2e3f18ab365fdd3498ddcb6e2ba35212
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3231986
> > Reviewed-by: Kenneth Russell <kbr@chromium.org>
> > Reviewed-by: Jamie Madill <jmadill@chromium.org>
> > Reviewed-by: Gregg Tavares <gman@chromium.org>
> > Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
>
> TBR=kbr@chromium.org,gman@chromium.org,jonahr@google.com,jmadill@chromium.org,angle-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: I4f775bf7139253a87b033a30e0da2100b3c1bb02
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: angleproject:6143
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270749
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
# Not skipping CQ checks because this is a reland.
Bug: angleproject:6143
Change-Id: Id9b0a5cbb76e4dea9e2f2da2b1c47a0587dfdaf5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270970
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Unskips EGLDirectCompositionTest.RenderSolidColor, as the driver bug
that caused it to be disabled should hopefully be fixed.
Bug: chromium:1063962
Change-Id: I8a01ca65fc7e2b4b820d61fced24cf53af9e9f3c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270597
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
One method of dealing with glMapBufferRange + range invalidation; treat
it like bufferSubData and stage the update.
Another method is to ghost the buffer but copy only memory outside the
invalidated range.
This CL pursues a policy where if less than half of the buffer is
invalidated, we stage. Otherwise, we ghost and copy only memory outside
the invalidated range.
DynamicBuffer is chosen over DynamicShadowBuffer because it turns out to
end up implicitly tracking all active invalidate ranges (through its
freelist), and performs buffer copy on GPU. if we use a
DynamicShadowBuffer and then BufferVk::stagedUpdate, it's the same thing
but more work (an extra memcpy into the staging buffer). To make this
clear, we split the logic of stagedUpdate into two parts, the
allocation/map, and the flush, and reuse one half in glMapBufferRange,
and the other half in glUnmapBuffer.
Test: Faster performance in MapBufferRange perf test, no non-noisy
regress in trace tests
Bug: angleproject:6634
Change-Id: Ie2e6a9586824b8cb59a97419bb8052acd1de2033
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3251686
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Lingfeng Yang <lfy@google.com>
We have a lot of apps that use MapBufferRange to upload data. That can
be low performance. Let's have a benchmark for this.
Bug: angleproject:6634
Change-Id: I7e20ad65b89700733c02995a7c56d641e39a43b1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3261378
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Lingfeng Yang <lfy@google.com>
For use as system libraries in virtualized Linux environments,
allow use of custom sonames.
Bug: angleproject:6672
Change-Id: If297e3eaa090bfd08cb9df68a4c727da72228bcc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3268941
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Chromium //build will soon remove the `use_xcode_clang` variable.
Remove it from Angle to avoid breakage when the variable is gone.
This is a followup to https://crrev.com/c/angle/angle/+/3259713
where one use of `use_xcode_clang` was not left by mistake.
Bug: chromium:1266466
Change-Id: Idbd8b3daeacac1ba88fc818f3939bdcd15e449c8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3269890
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
In this scenario:
- Clear color
- Invalidate depth
- Clear color
The invalidate step flushed the deferred color clear, but the following
clear did not expect an open render pass without any draw calls in it.
This change fixes this issue, while simultaneously optimizing invalidate
by making sure the clears accumulated during syncState() are redeferred
instead of flushed.
This issue was discovered in
https://chromium-review.googlesource.com/c/angle/angle/+/3266176 where,
as part of an unrelated fix, an accidental render pass closure is
removed.
Bug: chromium:1267424
Change-Id: Icfc0a53dbf84e6339ee23960ed847444830054e6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3266178
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This reverts commit 017161701b.
Reason for revert: Blocking roller, please re-land with the fix.
Original change's description:
> Metal: Reintroduce GPU power preference selection code.
>
> This CL re-introduces the GPU power preference code to
> the metal backend. It also reworks EGLDisplay caching
> in the frontend to cache based on the native display
> as well as the power preference attribute.
> A new extension, EGL_ANGLE_display_power_preference is
> added based on EGL_ANGLE_power_preference. This extension
> is a client extension that allows selection of GPU on
> display creation, similar to how GPUs are selected on
> context creation in EGL_ANGLE_power_preference.
> This CL adds EGLDisplayPowerPreferenceTest and enables it on
> the metal backend.
>
> Bug: angleproject:6143
> Change-Id: I0a081dcd2e3f18ab365fdd3498ddcb6e2ba35212
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3231986
> Reviewed-by: Kenneth Russell <kbr@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Gregg Tavares <gman@chromium.org>
> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
TBR=kbr@chromium.org,gman@chromium.org,jonahr@google.com,jmadill@chromium.org,angle-scoped@luci-project-accounts.iam.gserviceaccount.com
Change-Id: I4f775bf7139253a87b033a30e0da2100b3c1bb02
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:6143
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270749
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Since these variables are to be considered inputs as well as outputs
initializing them would overwrite the valid input values, hence skip
initialization.
Bug: angleproject:6608
Change-Id: Id8baf856a23ac84d18c61dd54cd6095128190075
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3253377
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
When running only a few tests the script has the tendency to sleep
a long time after the tests were finished. So limit the sleep time
by the number of remaining jobs.
Bug: None
Change-Id: I52ad39bf047abf93cd900f687bd3aae3962e9e20
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3263999
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
This is a reland of 86f2854579
X11 shouldn't be enable for is_chromecast cases as
the original use_x11 gn arg is only enabled on linux && !chromecast.
Original change's description:
> rename use_x11 to ozone_platform_x11
>
> Ozone is default now in Chromium and non-Ozone/X11 (aka use_x11) is
> deprecated. During the transition period use_x11 == ozone_platform_x11.
>
> Bug: chromium:1096425
> Change-Id: Ia691ce249bc49040956bed033891799127a57bbc
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3151755
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Bug: chromium:1096425
Change-Id: I6f8dbacb756ce57ca7379bbd991ca1ff470c244d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3263987
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Add flushCommandsAndEndRenderPassWithoutQueueSubmit() to allow
ContextVk::flushAndGetSerial() to only issue a single vkQueueSubmit().
Bug: angleproject:6546
Change-Id: Ia3fc2bb93e88583ebd80ee153749dc8ca42245dc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3200673
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
optimalBufferCopyOffsetAlignment is the optimal buffer offset alignment
in bytes for vkCmdCopyBufferToImage2KHR, vkCmdCopyBufferToImage,
vkCmdCopyImageToBuffer2KHR, and vkCmdCopyImageToBuffer. The per texel
alignment requirements are enforced, but applications should use the
optimal alignment for optimal performance and power use.
To improve efficiency, this CL updates ContextVk::mStagingBuffer's
alignment to the max of:
- minMemoryMapAlignment
- nonCoherentAtomSize
- optimalBufferCopyOffsetAlignment
On ARM, this is not expected to have any affect, since all three values
are 0x40, but other platforms may see a benefit.
Bug: angleproject:4297
Change-Id: I9185da111e09c5d782eb1dedb10369727cb9bf51
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3256007
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
If a framebuffer binding change is followed by glInvalidateFramebuffer,
ANGLE was not syncing the framebuffer binding.
- This means that invalidation was being done on the previous
framebuffer.
- Paired with deferred clears, this was causing ContextVk to start a
render pass on the previous, potentially deleted, framebuffer.
Bug: chromium:1267027
Change-Id: I092a0c8dd764db9e49258b694c970babb19cf24b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3266175
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
ASAN is not supported in 32-bits on Windows.
Bug: angleproject:5795
Change-Id: Icabf31b8c9ad4d371217c9f4a288f909888eae61
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3265532
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
This CL re-introduces the GPU power preference code to
the metal backend. It also reworks EGLDisplay caching
in the frontend to cache based on the native display
as well as the power preference attribute.
A new extension, EGL_ANGLE_display_power_preference is
added based on EGL_ANGLE_power_preference. This extension
is a client extension that allows selection of GPU on
display creation, similar to how GPUs are selected on
context creation in EGL_ANGLE_power_preference.
This CL adds EGLDisplayPowerPreferenceTest and enables it on
the metal backend.
Bug: angleproject:6143
Change-Id: I0a081dcd2e3f18ab365fdd3498ddcb6e2ba35212
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3231986
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Gregg Tavares <gman@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
A GPU WRITE->HOST barrier frequently issued when the GPU outputs to a
host-visible buffer used the ALL_COMMANDS stage mask causing a best
practices message. This message is suppressed in ANGLE, but shows up in
RenderDoc and clutters the output.
Bug: angleproject:5070
Change-Id: I59aa7f8c7b3bf2788a3f7ae0ab6abdb4d3cd175e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3265606
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>