The spec doesn't require implementation to validate indices against
range. This extra validation is costing performance dearly, thus should
be removed.
Bug: angleproject:4373
Change-Id: I61b0628e75de368d9e869008b7c99c429222fd6f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033495
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
Some features were used but not enabled. There is no validation error
for this. This change enables the following features:
- shaderStorageBufferArrayDynamicIndexing: used by atomic counter
emulation.
- shaderSampledImageArrayDynamicIndexing: used by sampler array of array
emulation, as well EXT_gpu_shader5.
- shaderUniformBufferArrayDynamicIndexing: used by EXT_gpu_shader5.
Bug: angleproject:4071
Change-Id: I582750d1552055deeec50485e6511788b98490c2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2032144
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
It's causing flaky crashes in tests. Leave the revised code in place
so it's easier to debug. Disable test which required the workaround.
Bug: angleproject:2273
Bug: angleproject:3843
Change-Id: Iebb682bd3c6282031cc57eda5d3d4d5636be7294
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033870
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
This avoids a deprecation warning:
[01253.076] [WARNING:src/ui/bin/root_presenter/app.cc(109)] Using multiple presentations is deprecated. Call PresentOrReplaceView() to force replacement of current presentation.
Bug: angleproject:4360
Change-Id: Icb1898ee542bde8c26a2dcd55c783372fc8ae7c1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2027935
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
The test suite occasionally runs into the following error:
[02036.794449][326733][326738][klog] INFO: [ERROR:src/ui/scenic/lib/scenic/session.cc(412)] Scenic session error (session_id: 1): Present2() called with no more present calls allowed. Terminating session.
This is actually a problem with the test harness as resetting the window
triggers a present with no fences and no OnFramePresentedCallback which
means there is no way to know if we will exceed the limit.
Add an OnFramePresentedCallback and count presents to stay under the
limit. This blocks if there's more than 2 in flight presents. A dedicated
async loop is used to avoid re-entering other code while waiting to
present (there is no such case in the ANGLE test suite currently, but
better safe than sorry).
Typically if we run the whole suite there will be a failure in the
middle, but re-trying the test that failed won't repro the issue. Add a
test that reliably exhausts the limit by calling resetNativeWindow() in a
loop.
Bug: angleproject:4360
Change-Id: I24eb01fd72fc0be57c36e49b5875023a80d6ab91
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2027934
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Not all call sites were checking the return value of
MemoryBuffer::resize, mark the return value as NO_DISCARD and fix all
the warnings.
BUG=chromium:1030835
Change-Id: I762796e3d11efc131a814069d78a195b0d4c9f8f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2028151
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
We no longer need this workaround. Also mCommandPoolFreeList dead code.
Bug: angleproject:3508
Change-Id: Ib73ddd431eb1bf9a55c3421111af4df5976cc1fb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033485
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
This workaround was added due to qualcomm driver bug b/129281932. But
this has been fixed with recent drivers. Removing the WR here so that it
will not negatively affect performance.
Bug: angleproject:4344
Change-Id: Iea2ec86082a0ced64bfe843bf916c6bdb2aea60b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2029210
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Populate the entrypoints required to get gfxBench
Manhattan scene to capture and replay correctly from
the beginning of the trace.
Test: Captured and replayed Manhattan frames 0-500 on
both Windows and Linux (Nvidia GPUs)
Bug: angleproject:4091
Change-Id: I5447a6835e55e944772d37219f2bd414606f0a70
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2029216
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Most UtilsVk functions bind a descriptor set to index 0 (same as driver
uniforms). If that happens to close a render pass, all is well as
starting a new render pass ensures all descriptor sets are rebound.
However, if the render pass is not closed, or if a dispatch call is
issued (which never rebinds descriptor sets if not explicitly
necessary), then the driver uniforms descriptor set may end up never
rebound, causing a validation error (and possible crash or corruption).
This change makes sure that UtilsVk notifies the context when it binds a
descriptor set. The context then dirties the driver uniforms binding
as appropriate.
Bug: angleproject:4272
Change-Id: Ief20c7884fbe39712f844247489812afc70b30a9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2027938
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Joint work with syoussefi@, who wrote the RewriteRowMajorMatrices
pass, and revised it for this CL to not rely on the
NameNamelessUniformBuffers pass - which was breaking it on the GL
backend.
Hook up previously written RewriteRowMajorMatrices transformation, and
enable on all GPU types on macOS. It is needed at least for AMD and
Intel GPUs.
Add a new test which verifies the behavior of dynamically-indexed
arrays of row-major matrices.
Bug: angleproject:2273
Bug: angleproject:3843
Change-Id: Id582f9cf6b9b1a59091aab1786539174f360b705
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2008717
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This will help for the command graph refactor so we can set up the
command buffer barriers before we start the render pass for draw.
Bug: angleproject:3539
Bug: angleproject:4029
Change-Id: If5a55db6ac1e06609a3a1e2245d7ab351152886a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2028450
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Some tweaks to when we call gtest initialization allows this to work.
Bug: angleproject:3162
Change-Id: I75159108d3f746f666e57c1a6495a8c8616ef1cf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2024335
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Added GN bool arg "angle_extract_native_libs."
When "false," which is the default, the native libs are zipped in the ANGLE
apk. When true, the libs will be extracted which is useful when capturing
flame graphs in order to see the ANGLE function names in your flamegraph.
Bug: angleproject:4304
Change-Id: I86c91e5028688142b1137b859c800f2243c124d9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2028524
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
My earlier change https://crrev.com/c/1991969 had a bug. If
ARB_texture_rectangle is disabled once, it can't be re-enabled because
the extension behavior entry is deleted. ResetExtensionBehavior needs
to restore it.
Bug: angleproject:3770
Change-Id: Icf96acece8ea8d17287c8d09fb4849b61c9c2a36
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2023398
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
glCopyTextureCHROMIUM calls in D3D11 would call getNativeTexture on the
copy source which would allocate a TextureStorage11 if one did not
already exist. This caused full mip-chain allocations in some cases when
we could have just copied directly from the staging Image11.
When navigating to wikipedia.org:
Peak memory | Stable memory
Passthrough (before): 142 mb | 119 mb
Passthrough (after): 138 mb | 106 mb
Validating: 139 mb | 110 mb
No mip-mapped textures were allocated after this change.
BUG=chromium:1030835
Change-Id: Icd14afaec445299423cfea293cba501d774f6ade
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2028147
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Fuchsia won't return VK_ERROR_OUT_OF_DATE_KHR after a size change, so we
need to check every frame. In fact we don't even tell Scenic what the new
size is during resize, because it does not care - the surface size
determines the "window size", not the other way around.
Bug: angleproject:4348
Change-Id: I8f9af0d1379f4993865c7ccedc9aba3cab90cf54
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2023914
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
GL_OES_depth_texture_cube_map depends on depthTextureOES,
but adds the same new texture format/type requirements as
GL_OES_packed_depth_stencil, so instead of adding a
specific check for GL_OES_depth_texture_cube_map, the
Vulkan backend checks for a combination of
GL_OES_depth_texture and GL_OES_depth_texture_cube_map
to enable GL_OES_depth_texture_cube_map.
ANGLE has no specific checks for whether a format is
"cubemappable", but Vulkan has no restrictions of the
format of cubemaps, so if the proper formats are
supported, creating a cube of any of these formats
should be implicitly supported.
Bug: angleproject:4293
Change-Id: I968dbe8869ba0f50de18dd41f1195e847c06b520
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2026027
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This is not passing currently, skip it for now.
Bug: angleproject:4349
Change-Id: If36a144e8d17cc94c2186a7a794358b14223349e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2023913
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Remain the old hardware requirement for turning on clampArrayAccess. But
also turns it on universally for WebGL context. So that we won't suffer
from clampArrayAccess not handled properly on some compute shader deqp
tests.
Bug: chromium:1042252, angleproject:4361
Change-Id: Ib11affd6df27ce7d2100980d2b8decdee36876e8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2026029
Reviewed-by: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
There are no longer @@ QUALIFIER and or @@ LAYOUT markers. Only @@
XFB-DECL @@ and @@ XFB-OUT @@ markers remain, which are now replaced
with simple string manipulation.
Bug: angleproject:3394
Change-Id: I9c1883458d9de3ea59ac08aae57a7c8985e7afbe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2012741
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Remove the "override" table. That gets in the way of some solutions.
If a format cannot be supported by a native Vulkan format as indicated
in the "map" table, then check fallbacks.
Also add support for native RGBA4 and R5G5B5A1 support. Previously
those formats would be emulated with RGBA8 due to the override, but
now code will check if the native format is available and use it.
Bug: angleproject:4282
Change-Id: Ib33ea40543d91a2c2a95075b277f825a8822037c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1994538
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
The shader translator outputs arbitrary location indices. Once compiled
by glslang, the SPIR-V transformer modifies these decorations. If the
transform feedback extension is used, it will also add the relevant
decorations to the varyings that are captured.
Bug: angleproject:3394
Change-Id: I5ecafd0536408612a5d4b920dbabbfabe650657c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2008468
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
The shader translator outputs arbitrary location indices for fragment
outputs. Once compiled by glslang, the SPIR-V transformer modifies
these decorations.
Bug: angleproject:3394
Change-Id: Ib9d8336bccc392e789e4d93031fdcce9c466b7a6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2011214
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
The shader translator outputs arbitrary location indices for vertex
attributes. Once compiled by glslang, the SPIR-V transformer modifies
these decorations.
Bug: angleproject:3394
Change-Id: I88453b44e3a8770f51e79228148233ff308f1885
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2011212
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
This change introduces a SPIR-V transformer that modifies shader
interface variable decorations directly in SPIR-V instead of
manipulating the input GLSL. Currently, descriptor set and binding
indices are set by the transformer.
The shader translator outputs arbitrary set and binding indices. Once
compiled by glslang, the SPIR-V transformer modifies these decorations.
The ultimate goal is to be able to modify the SPIR-V again when program
pipeline objects decide a different set/binding is necessary.
Bug: angleproject:3394
Change-Id: If358265a72bf1fe9f5676562b39a632cb2e05dc4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2001477
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This doesn't work and is highly misleading as the tests run with the real
GPU.
Bug: angleproject:4353
Change-Id: Id9139436e39d5e8e063bcc679b7c63f589d3b748
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2023912
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
The vulkan driver is missing required extensions so these tests are all
failing.
Bug: angleproject:4352
Change-Id: Id1af7c40798d8844fbf832c6066260fe3a8bfeda
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2023911
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
These were never assigned a location. They are now removed by the
translator similar to other inactive variables.
Bug: angleproject:4313
Change-Id: I3398d06e1dea3f43b84f206cca07cde5b44b21a8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2021734
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This optimization pass breaks the build by exporting volk's internal
binding symbols from libGLESv2.so. Since the test binary also links volk,
this causes a SEGV as the wrong (uninitialized) function pointer is
called.
This is an LLVM bug and will be fixed upstream:
https://reviews.llvm.org/D73235
Bug: angleproject:4351
Change-Id: Iebe0eabd975f8109231df30eef8c9074af8190e9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2023910
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
The Android vulkan code is reusable, so move that to a new file
SystemInfo_vulkan.cpp and call it in the Android & Fuchsia
implementations. This is necessary to skip tests based on GPU.
Bug: angleproject:4349, angleproject:4352
Change-Id: I8330cfcdbd41f4d51391bd5ed7f0820c55e02801
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2023909
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
The default sandbox config for tests built in chromium doesn't allow
access to the GPU or display. Switch to the gfx_tests sandbox config
to allow the tests to run.
Bug: angleproject:4350
Change-Id: Ib80db196ef55df694369cfc7a3cf18327ce7c952
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2023908
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
out-of-bounds-uniform-array-access.html could fail on Linux Nvidia
OpenGL even if GL_KHR_robust_buffer_access_behavior is available.
Turning clampArrayAccess on globally but turn it off for Compute Shader,
which is not used by WebGL so should be okay.
FYI: The failures when turning this on globally are all in compute shaders.
One could be fixed by using int cast instead of float for the clamp
modifier. The other is due to array.length() couldn't return correct
result for array in SSBO.
Bug: chromium:1042252
Change-Id: Ic6f7adae4600d35207646881b18990a0c25a889a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2020463
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
This was causing an unrelated error that was complicating diagnosing
test failures with the command graph refactor.
Bug: angleproject:4029
Change-Id: I31df76e7ea1c7fb731b49e97ac8a527a165efd48
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2024331
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
The overlay define was placed in the libANGLE target instead of in the
config. This was causing a compile error in the capture-enabled build.
Bug: None
Change-Id: I9df02faaf57683119ca49a9b44e41ff049b05556
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2023479
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>