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>
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>
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>
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>
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>
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>
I was going to do this bit-by-bit, but there are just too many of them,
so I'm lumping as many of these enums into one commit as I can.
I basically went through all the extensions/EGL_* files and found all
the enum definitions there and added them to the xml.
Bug: angleproject:7193
Change-Id: Idaffd283e9118abf84bdff9c4e140334a1f8ee06
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3582939
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This allows an OpenGL loader to alias glProvokingVertex and
glProvokingVertexANGLE function pointers. In my case, it helps with
the GLAD loader when using the --alias option.
Bug: angleproject:7193
Change-Id: Id7e6318a5ee1f1b172f0499fc01dd080442471b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3582519
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This is a reland of commit 535cd538f3
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>
The WithX() and WithNoX() helpers are removed and replaced with enable()
and disable() member functions that take the name of the feature (as a
Feature::X enum constant). This has two benefits:
- Adding tests that override a feature no longer requires additional
helper functions to be written.
- There's no mistaking the feature name.
This change doesn't yet fix the main issue in anglebug.com/6435, but
does fix the following helpers using an old feature name (so they were
ineffective):
- WithMetalForcedBufferGPUStorage
- WithNoVulkanViewportFlip
A follow up would remove the old way of overriding features in tests and
replaces them with the new way.
Bug: angleproject:6435
Change-Id: Ida02b26ec72bc40d7a8938c76a93815bb903ca05
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3580982
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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>
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>
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>
This is necessary for a loader like GLAD to generate a correct egl.h
header with ANGLE extensions.
Bug: angleproject:7193
Change-Id: Id3f07ffee216890418b202520fccff7ccfcaa6dd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3582273
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This test started flaking recently on Mac/NVIDIA. Suppress the
failures for now. Also update existing suppression to be in the main
test expectations file.
Bug: angleproject:7191
Bug: angleproject:3496
Change-Id: I54c4def7382bee4784dcfe8ffdc3c51db1cc91d5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3582638
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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>
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>
Fixes several sscanf calls in crash_handler_posix.cpp failing to compile
when compiling for ChromeOS kevin (arm-based) devices due to trying to
format an unsigned int as an unsigned long. This is fixed by switching
to SCNxPTR/PRIXPTR for the format strings instead of hard coding %lX.
Bug: chromium:1314515
Change-Id: I012a1a74312ba653e34145883955f2d0e1ef031f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3579867
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
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>
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>
* 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>
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>
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>
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>
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>
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>