Some Vulkan drivers are not clipping rendering that is outside of the viewport,
and the Vulkan spec has some language that indicates that ANGLE should set the
scissor:
The application must ensure (using scissor if necessary) that all rendering
is contained within the render area.
In this case, ANGLE is "the application".
Bug: angleproject:3253
Bug: angleproject:3254
Change-Id: I6885a3aa6daed57f6ae1c3d974663d763cad10c9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1553973
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
The "#pragma STDGL invariant(all)" directive should only be applied to
shader output vars. This change also removes the workaround
SH_DONT_REMOVE_INVARIANT_FOR_FRAGMENT_INPUT which is no longer needed.
This change fixes two tests that were incorrectly assuming that the
pragma would be applied to inputs: GLSLTest.InvariantAll[Both|In].
Bug: angleproject:1293
Bug: angleproject:3285
Change-Id: I4eb03fa89fbc7c560150ee0cc32382024b0cb3e3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558678
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
Without this change, rolling Googletest results in compilation errors:
https://crrev.com/c/1594628/2.
Change-Id: I85e122ad449a3d8fb155b07f64d69022294ab6cd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1598309
Reviewed-by: Victor Costan <pwnall@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Required to roll both SPIRV-tools and SPIRV-headers at once due to a
conflicting change.
Bug: angleproject:3422
Change-Id: I8160046899acce01a38e1ddcf43370f278349bac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1599250
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Support for layout qualifiers in interface blocks are added. All
interface blocks are adjusted to either be in std140 or std430.
In the Vulkan backend, a new descriptor set is added for UBOs. A dirty
bit is added for UBO updating and pipeline layouts and descriptor
bindings are updated.
Bug: angleproject:3199, angleproject:3220
Change-Id: I271fc34ac2e1e8b76dee75e54a7cff0fe15fe4ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1565061
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Enable drawRangeElements() for the Vulkan backend and the associated
tests.
Test: angle_deqp_gles3_tests
Bug: angleproject:3420
Change-Id: I98770631ce1387131bb45e2c1e9df24e911bc692
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1595101
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Instead of installing all dependencies manually, the script should run
with the dependencies specified by the wheels listed in the VPYTHON
section of the header comments.
Bug: angleproject:3415
Change-Id: Ie969ada3ec2550ae2a809164b01930e1590d5db1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1593736
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Some NVIDIA D3D11 drivers are buggy and interprets the level passed to
GetDimensions as being relative to 0, rather than the SRV's MostDetailedMip.
A test is added which reads from non-zero base level integer texture. When the
workaround is not being used, reads outside the first quadrant return black.
Bug: chromium:679639
Change-Id: I5282a1ba207b2d553d1836f9460ec09cb5590ea6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1591594
Commit-Queue: Kimmo Kinnunen FI <kkinnunen@nvidia.com>
Reviewed-by: Kimmo Kinnunen FI <kkinnunen@nvidia.com>
SurfaceGL had these methods already so they are just moving up the inheritance
hierarchy. This ends up simplifying some state tracking we had in our surface
implementations.
BUG=angleproject:2464
Change-Id: I480588ca8470d9ef507f95e0c0297fe126b3abfb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1595434
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
This allows Vulkan EGL objects such as EGL Syncs and EGL Images to give their
garbage to the renderer before destroying.
BUG=angleproject:2464
Change-Id: I59b8e1080e4292bd0856e59a928750c7e77a372e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1562522
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
The same test was hitting a bug with the Nvidia driver on windows+gles.
Bug: angleproject:3413, angleproject:3417
Change-Id: I39426291eac731bcda068829686e09cf406ff661
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1595438
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
EnumDisplayDevicesA returns the card that's connected to the display,
but EnumAdapters return the adapter which the desktop primary is
displayed at index 0. We can use this to determine the device used for
graphics.
Also cleans up the discrepancy between platforms on finding "primary" vs
"active" GPU. Asserts that the GPU expected to run ANGLE commands is the
active GPU, and deprecates the primary GPU to be equal to the active
GPU.
Bug: angleproject:3383
Change-Id: I422fba1bbe47d85b7c09e378d559eaebf89e2625
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1584360
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Previous swaps may not have been submitted by the same context as the current
swap and we can't safely wait on serials submitted by other contexts.
BUG=angleproject:2464
Change-Id: Ibcb23171feae038fd45abdefb80c4e8a373744e2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1562521
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
In some instances running a dispatch call could lead to accessing an
invalid VAO pointer. This seemed to be tied to switching Contexts.
Fix the bug by invalidating the cache pointers on Context switch. Note
that it seems this bug can only affect ES 3.1+ Contexts.
Bug: angleproject:3349
Change-Id: Ib712bcc29215b3fd1c8b7eb0cbd70dea649b3cfc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1594289
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
@@ LAYOUT-xx @@ and @@ QUALIFIER-xx @@ macros are generated by the
compiler when emitting Vulkan GLSL. These macros are replaced at link
time in the Vulkan backend.
Previously, this replacement was done through calls to
angle::ReplaceSubstring, reiterating over the whole source on every
replacement. This CL does a prepass on the input source and chunks it
up in blocks. Search is optimized as only blocks of a certain type are
string-compared (skipping large chunks of shader text). Replace is
optimized as the whole shader is not shifted left or right on every
replacement.
Additionally, this CL modifies the layout macro to the following format:
@@ LAYOUT-xx(extra, args) @@
This is used in a follow up CL to have the compiler provide additional
layout qualifiers.
Bug: angleproject:3220
Change-Id: I6367e781c3304d5f2e0a406e4fb4e6feb4c45f1d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1592070
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
If an image was used by a different context previously, it's stored serial
is not relevent. We always know that any work involving the swap chain image
has been completed by the time we aquire a new one.
BUG=angleproject:2464
Change-Id: I0b12b9ff4b9a68593d661344d2d1e2c9d94e4755
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1592043
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
`out` variables in the vertex shader and `in` variables in the fragment
shader were not decorated with `layout(location=?)` as they should
according to the Vulkan GLSL spec. This change makes sure these
decorations are present regardless of whether the compiler sees these
variables as EvqVaryingIn/Out or EvqVertexOut/FragmentIn.
Bug: angleproject:3412
Change-Id: I66473e876cb989a60b0c6d6a5850a8b2c763d8e2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1590694
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This CL adds a command line option to angle_end2end_tests that will
iterate over all test configs. For each config it'll fork a new child
process that will run only a single config. This will allow us to
isolate each config to a specific child process. Hopefully this will
reduce test flakiness due to driver issues with multiple configs.
The command line option is "--separate-process-per-config".
Note that there are about 25 configs right now.
Bug: angleproject:3393
Change-Id: Ia117b371bbe159c1b0d28d82befffeb0f40467a9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1591428
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
By updating YYLTYPE_IS_TRIVIAL to true, YYSTACK_RELOCATE can be enabled, so
we can dynamically allocate stack size based on needs.
BUG=angleproject:3028
Change-Id: I1b9cc0768cd0c6955589695e703595c56d43f24a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1593954
Commit-Queue: Yi Xu <yiyix@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Consolidate these tests into ANGLETest. Add a new parameter to
PlatformParameters that lets us skip normal test setup.
This removes the last 'configless' tests from angle_end2end_tests.
Bug: angleproject:3393
Change-Id: I87186698ade90f95577534eb8ed1dfd4245f740e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1590467
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This allows us to run angle_end2end_tests with a single config without
using gtest_filter. It will also allow us to run each test config in
a separate process.
Bug: angleproject:3393
Change-Id: I09aaf9cfe55a117b0af8d79ecfd129f3d0f1d7c8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1591427
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
If the shader contains code such as the following:
struct S {
vec4 field;
};
out S varStruct;
The layout qualifier macro is defined as @@ LAYOUT-varStruct @@.
However, the Vulkan backend was replacing @@ LAYOUT-field @@.
Bug: angleproject:3220
Change-Id: Iae15003867e0bed2cc939159a6653429c7a431e0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1571389
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Moving the Platform Methods init to GetDisplay allows us to override
the platform methods as soon as possible. This lets Chromium override
the methods via ANGLEGetDisplayPlatform. It also lets us reset the
platform methods when making a new display. Note that because the
methods pointer is global it's a bit tricky to manage between swapping
configs in ANGLE tests. Using a separate test process for each config
should help.
Bug: angleproject:3393
Change-Id: I351f86422e53075563f6d8fce32efbd40023cd23
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1592045
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
These results are somewhat redundant. Don't need to be shown in the
public doc.
Bug: angleproject:3369
Change-Id: I4994cd5714e727afbfe63fb082dab074ed137d43
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1593959
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
This helper was redundant with the image utils library. Switch the test
to use the existing methods. Doesn't affect test correctness.
This removes more 'configless' tests from angle_end2end_tests.
Bug: angleproject:3393
Change-Id: I49cfbd95c3713b2b4b25c4716a7a279d84ddf994
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1591426
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Add support for GCC Compilers, so it can be build on Ubuntu.
BUG=angleproject:3392
Change-Id: I2f5ac7355a40f52123bd465f86b1e966c59c943d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1592062
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Yi Xu <yiyix@chromium.org>
We don't need to use upper case. Lower case can be more readable.
Skip a test on Linux/NV/Vulkan that became flaky after changing
the test order.
Bug: angleproject:3393
Change-Id: Ie027e08ddc9d47b9484cf5b1aaca72a05dd60517
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574676
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
* Removes D3D11 Warp and Reference configs from tests.
* Removes several permutations of OpenGL back-end specific configs.
* Removes FL 9_3 since it is no longer supported.
* Removes present path "Copy" since it's redundant with normal D3D11.
Reduces number of configs from over 60 to 25.
Bug: angleproject:3393
Change-Id: Ia5a23de3c4865b17ee50673a4066757b901a4b5a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574675
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This test was failing due to patch errors. This could be because the
bot uses DEPS ANGLE instead of ToT. Removing the bot because it was
causing valid CLs to fail on the CQ.
Bug: angleproject:3146
Change-Id: I7b8b120160fe435832cba919c256ce185ade4d90
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1592602
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This CL moves all of the EGLDisplay configuration into an EGL platform
struct. Consolidating display configuration in the struct allows us to
move configuration out of the test constructor. Then when we filter
test configs we don't need to wait for the individual test setup.
Bug: angleproject:3393
Change-Id: I5bd06dcdc9f2867ebc43c1d4984077ada35cafc8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574674
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Context has the invariant that if it is not current anywhere, mCurrentSuface is
null. If makeCurrent fails in ContextImpl::onMakeCurrent, the surface is not
reset, breaking this invariant.
BUG=angleproject:3414
Change-Id: Icb13c8e2d1edd98d87a8af091a3fbacebadb395c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1592064
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Also add a missing arrow from VertexArray to Context.
Bug: angleproject:3002
Change-Id: I2a30df0bb1c9681b4cf5178b75f1264ddf4ca2e2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1592065
Reviewed-by: Jamie Madill <jmadill@chromium.org>
The diagram source is available as a Google Driver document. It can be
opened with the draw.io web app.
Bug: angleproject:3002
Change-Id: Ic7885c8da1aacac5082eea05d0562d3d62f801ba
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1592252
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This was previously returning maxCombinedTextureImageUnits instead of
maxCombinedUniformBlocks. Fixing that exposed a bug in the GL backend
where the combined values were sometimes capped to vertex+fragment
values and sometimes not capped at all.
The reasoning for such capping was that the combined limits as queried
from GL contains stages not available in GLES (such as tessellation).
However, the capping failed to take geometry shader limits into account.
This change adjusts such capping to vertex+fragment+geometry. It also
applies the cappping to all combined limits, rather than a select few.
Bug: angleproject:2099
Change-Id: I7231058b5d7f80b1b2452d9f87d4b0ab6e1cdb17
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1572487
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
None of these functions needed to be member functions. Also make the
naming more consistent.
Bug: angleproject:3393
Change-Id: I7aafe2269a48af703a87bd9a8cf4cfab9e177dd3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574673
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
The swap interval can be changed independent of the Surface config.
Thus it makes more sense to set it explicitly in test setup. This
simplifies the test config.
Also updates some of the API for GLWindowBase. Return an explicit
error from makeCurrent.
Bug: angleproject:3393
Change-Id: Ic62b33018e872bc0e38f2848e2427ed898b60749
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574672
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Required a few build tweaks because GN check does not understand
#ifdef includes.
Bug: angleproject:3411
Change-Id: I1aa7b97626767e3dc973bfa55f5b2a511c806ec9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1589148
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
The the user hasn't called SwapBuffers explicitly, we should not write to
the window surface. This is especially a problem when the native window has
already been destroyed.
BUG=angleproject:2464
Change-Id: Ib4289de471ba2ad10e5cc21a8c2af946642f138c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1586355
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Also modify or remove some tests to sync up with the expected behavior
stated in spec.
Related to https://github.com/KhronosGroup/WebGL/pull/2780
If any draw buffer with an attachment does not have a defined fragment shader output,
draws generate INVALID_OPERATION.
Also remove Framebuffer masking for inactive outputs.
This workaround is no longer necessary as the WebGL spec has changed.
It also was never fully working and had bugs with certain orders of
calls.
Bug: angleproject:2872
Bug: chromium:927908
Bug: chromium:943538
Change-Id: I73715a6ab851ae3db7096f49ea0a9fdd6f576703
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1530018
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
If vkAcquireNextImageKHR fails, the aquireImageSemaphore would be leaked,
wrap it in a vk::Scoped so it is always cleaned up.
BUG=angleproject:2464
Change-Id: Ic4a0e16c89ea7c35cf060e5601760422e673c080
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1585318
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
This allows contexts to flush and update state when they are no longer
going to be current.
BUG=angleproject:2464
Change-Id: Ie577475a94090631a0208542b32a12a239bdeb75
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1553824
Reviewed-by: Geoff Lang <geofflang@chromium.org>
The lists of tests can't be added to the sheets if more than 50,000
lines. Since the goal is to get rid of all unexpected passes/failures,
it's reasonable to clip the lists by length. Other formatting changes
too.
Bug: angleproject:3398
Change-Id: Ice461862fb4266e0ad1280f20de85224fc6d7e97
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1585612
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>