2D array texture's robust resource init didn't work due to
mtl::InitializeTextureContents() expects one slice at a time, however
TextureMtl::initializeContents() created entire layers index via
GetZeroLevelIndex() before passing to mtl::InitializeTextureContents().
Fixed by changing to GetLayerMipIndex() instead.
Bug: angleproject:2634
Change-Id: Ie8d80d927a987c2b393d913fda8288b6e06e97d0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2494527
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com>
There are legacy apps that have uniforms declared with
different precisions across shaders. There is some wiggle
room in the ESSL spec to accommodate such cases as long as
the uniforms are not statically used in shaders. We choose
this lenient interpretation since it allows for more apps
to be compatible with ANGLE.
This change allows BADLANDS to progress past a black screen.
Bug: angleproject:4971
Tests: angle_end2end_tests
--gtest_filter=GLSLTest_ES31.UniformPrecisionMatchValidation*
Change-Id: Icdd2056c8415803eb34f2840b0758e1acf53c23a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2495493
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
This test is timing out on a Windows 7 config.
Test: GLES1ConformanceTest.AmbLight/ES1_Vulkan
Bug: angleproject:5234
Change-Id: I4c3ccdeb58d793952aaa44d4902dedf7ce192ec3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2496142
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Partially implemented to make it easier to debug.
Only debug group is supported for now.
Bug: angleproject:2634
Change-Id: I029dd4283790fb57a6964aad89c37d092e3378e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2433331
Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
If UtilsVk::clearFramebuffer issues a draw call on the currently open
render pass (as opposed to starting one itself), ContextVk would be
unaware of the fact that the graphics pipeline and descriptor sets have
been changed.
This change sets the necessary dirty bits for ContextVk to recover from
a UtilsVk::clearFramebuffer call.
Bug: chromium:1141040
Change-Id: I865220fb5b3b78bf4c6b6b2896e57d8a7490c270
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2493184
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Attributes that are not active shouldn't have made it to the
ShaderInterfaceVariableInfoMap of gl::ShaderType::Vertex. This change
turns a few ifs to ASSERT in SpirvVertexAttributeAliasingTransformer.
Bug: angleproject:4249
Change-Id: I3da4ea773eae20fe2f126b82f7790e9f2cab0bc1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2491929
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Rolling ANGLE into AOSP requires the following fixes:
1.) Update scripts/roll_aosp.sh to not delete third_party/abseil-cpp.
2.) Update BUILD.gn to add a dependency on libnativewindow for
"angle_common".
Test: AOSP Presubmit
Bug: angleproject:5230
Change-Id: If97c44ce041e576edc7c0c43700030b4538e8ab5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2495550
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
Also cleans up some compiler warnings that crept in because of how
we structured the test sources in GN. We also no longer need special
handling for the test "main" files.
Must land after http://crrev.com/c/2495003 rolls into ANGLE.
Bug: angleproject:5124
Change-Id: I43ff91b5c8f00214886cd8ac2403702e5026a840
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2495281
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This reverts commit 7a0263547c.
Reason for revert: Breaks roll of ANGLE into AOSP:
ERROR at //testing/test.gni:76:5: Assertion failed.
assert(_use_raw_android_executable || enable_java_templates)
^-----
See //third_party/catapult/tracing/tracing/BUILD.gn:35:1: whence it was called.
test("histogram_unittests") {
^----------------------------
See //src/tests/BUILD.gn:262:17: which caused the file to be included.
deps += [ "//third_party/catapult/tracing/tracing:histogram" ]
^-------------------------------------------------
Original change's description:
> Link C++ histogram support into angle_perftests.
>
> This is the first step in uploading histogram data instead of a gtest
> special format. We importing several new libraries:
>
> - tools/protoc_wrapper
> - third_party/protobuf
> - third_party/catapult (was already used for Android)
>
> No functional change. Only affects compilation. Protobuf support is
> disabled when not available.
>
> Bug: angleproject:5161
> Change-Id: Ie28d57d7e142c437ebd51463ce3e2cafd87468d1
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2482294
> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
> Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
TBR=ynovikov@chromium.org,bsheedy@chromium.org,jmadill@chromium.org
Change-Id: I62c4b926cbe82d10e460b28b5f864521e2b1f8ee
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:5161
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2495549
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
A bug in Vulkan-ValidationLayers is stopping changes from being rolled
into ANGLE. Suppress this warning for now, until the root cause is
addressed.
Bug: angleproject:5191
Change-Id: I7c6cb65055bdc7b2eb3679f26f09530b1cff3775
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2495543
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
For single test execution we don't need to be running the watchdog
thread. This only serves to cause timeouts in slow running tests.
Adds a new method to keep the --batch-id argument in the list of
parameters so other functions can process them.
Bug: angleproject:5124
Bug: angleproject:5218
Change-Id: I958230149b7d79830802cd55f67f0190de607200
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2495282
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This cleans up some of the logic around command completion. We no longer
query each Fence in order after a finishToSerial call. Instead we clear
out all the commands that have been completed up to the latest Fence.
Also cleans up ordering code. Because we now have a linear ordering of
Serials we can validate the ordering is "good".
Attempt at solving a suspicious ASSERT firing on AMD Win7.
Bug: angleproject:5198
Change-Id: I7750eff7f8d3aff397e7880f997ad86c9bf7d7a8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2490342
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Take the following example:
attribute mediump vec4 a; // location 0
attribute highp vec2 b; // location 0
f(b)
This was previously translated to:
attribute mediump vec4 a; // location 0
f(a.xy)
That difference here is that b was previously highp, but a.xy is
mediump. This change drops RelaxedPrecision from attributes so that
they are all highp.
Note that the temporary SPIR-V ids these attributes are loaded into
still retain their RelaxedPrecision decoration (if any), and the
precision of calculations in the shader is not increased by this
change.
Bug: angleproject:4249
Change-Id: Idca0fc667ad6e36ddf428b65ea03706272a9ed9c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2488131
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
A few fixes to how we check for the sRGB override in the
TextureVk class. In at least one instance there was a potential
edge case where in syncState we might not create the Texture
with the mutable bit the second time through the function.
Bug: angleproject:5176
Change-Id: I4f1ca6e469b10514c3a0de3120be9ade62568084
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2482292
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
As the hook runs, we'll now be printing each trace's
progress. This uses some tricks with Python's subprocess.
Bug: angleproject:5210
Change-Id: I4e776a89c2b3e06ba67f9a82969aa394b24208d5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2491104
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Descriptor pools need to live as long as the descriptor sets that are
allocated from them. Using Serials while building a command to judge a
pool's lifetime is prone to errors, since a command's Serial value
isn't known until the command is submitted, leading to deleting pools
too early relative to when the descriptor set is actually used.
This CL updates DescriptorPoolHelper to inherit from Resource, so the
descriptor pools can be retain()'ed. This allows the Resource's counter
to indicate that a pool is in use until the command's Serial is known
and can be recorded to indicate when the command completes. This
prevents descriptor pools from being destroyed before the command
completes (while the descriptor sets are still in use), or even before
the command has been submitted. Destroying a descriptor pool resets all
of the descriptors that were allocated from it, which can trigger a
variety of VVL errors depending on when it's erroneously performed.
This CL also adds the necessary retain() calls for the descriptor pools.
In particular, the pools need to be retained each time a cached
descriptor set that was allocated from it is re-used. This is relatively
simple with the current design, since we always clear the descriptor set
caches whenever a new pool is allocated, so the descriptor pool binding
is always accurate.
Bug: angleproject:5030
Test: MultithreadingTest::MultiContextDrawSmallDescriptorPools()
Change-Id: I5fdeeb46159448dfd679d7169e423048348be5ab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2437609
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
This is the first step in uploading histogram data instead of a gtest
special format. We importing several new libraries:
- tools/protoc_wrapper
- third_party/protobuf
- third_party/catapult (was already used for Android)
No functional change. Only affects compilation. Protobuf support is
disabled when not available.
Bug: angleproject:5161
Change-Id: Ie28d57d7e142c437ebd51463ce3e2cafd87468d1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2482294
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tests appear to pass now. Going to be changing functionality in this
area so prefer to have them enabled.
Bug: b/154030730
Bug: angleproject:3271
Change-Id: I1c0ffe40b726943c146fa06aa16de79d434760bc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2493182
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
This switches 'angle_*_tests' to be identical to
'standalone_angle_*_tests'. Once rolled into Chromium we can
then switch back to using 'angle_*_tests' and finally remove
'standalone_angle_*_tests' entirely.
Must land after https://crrev.com/c/2490987
Bug: angleproject:5124
Change-Id: I1f4794d429733a43113dcba6aaaba0c047607e50
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2491932
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tests dEQP-EGL.functional.fence_sync.* can cause SyncHelper::clientWait
to be called with a null contextVk which we were trying to deference to
get to the renderer. We have a pointer to the renderer already so just
use that.
Bug: b/154030730
Change-Id: If64ec2c960f39b893d2e47a11638d16f830aecfd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2493181
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
To avoid a large performance impact from adding Vulkan debug-util
markers for every GLES entrypoint, the EVENT() macro needs a run-time
check that avoids constructing a ScopedPerfEventHelper object.
Test: angle_perftests -v --local-output --gtest_filter="TracePerfTest.Run/*nba*"
Bug: b/170249632
Change-Id: I422111cdf6f6f713800e7ac587e66582bd00359f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2491009
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
According to the EXT_color_buffer_half_float spec:
"Dependencies on OES_texture_half_float
If OES_texture_half_float is not supported, then all references to
RGBA16F_EXT, RGB16F_EXT, RG16F_EXT, R16F_EXT, HALF_FLOAT_OES and
half should be ignored.
If OES_texture_half_float is supported, textures created with:
<internalformat> = RGBA
<format> = RGBA
<type> = HALF_FLOAT_OES
are renderable."
This fixes 4 viz_unittests when running with SwANGLE:
All/GLI420ConverterPixelTest.ScaleAndConvert/0
All/GLI420ConverterPixelTest.ScaleAndConvert/1
GLScalerPixelTest.Example_ScaleAndExportForScreenVideoCapture
GLScalerPixelTest.ScalesWithColorManagement
The original attempt at landing this change
(https://chromium-review.googlesource.com/c/angle/angle/+/2489726)
was reverted due to dEQP failures on the Metal backend. After some
investigation, it was decided to simply disable the 2 offending
tests for now.
Bug: angleproject:5174
Change-Id: Id1e382b72d91109e4718c729cc6c5f0a0f413d7d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2491930
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Using an ASSERT, the SPIR-V transformer is run at link time to catch
bugs in tests that link but don't draw.
Bug: angleproject:4249
Change-Id: Icbeeb6e968f9901ba003918b1dd1d2eef0792469
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2488227
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
VertexAttributeTests used 'mediump' precision to sample ushort
with 65533/65534/65535 which exceed the range defined in ESSL Spec.
(Spec "4.5.2 Precision Qualifiers")
Change precision of attribute 'test' and 'expected' to 'highp'
for numbers that exceed the minimum range.
Bug: angleproject:5211
Change-Id: I01e5c999ec43d17a7390835d2ac88ce2bc0b4c5b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2491621
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This change builds on vertex attribute aliasing SPIR-V tranformation for
non-matrix types to add support for matrix attribute types. This is
done by turning every matrix attribute declaration into multiple vector
attribute declarations, and reusing the same mechanism for resolving
aliasing between non-matrix types.
Take the following example:
attribute mat4 a; // location 0
attribute vec3 b; // location 1
attribute mat3 c; // location 1
attribute vec4 d; // location 2
The shader is modified as such:
attribute vec4 a_0; // location 0
attribute vec4 a_1; // location 1
attribute vec4 a_2; // location 2
attribute vec4 a_3; // location 3
attribute vec3 c_0; // location 4
attribute vec4 d; // location 5
attribute vec3 c_2; // location 6
mat4 a;
mat3 c;
and in the beginning of main(), the following code is inserted:
a = mat4(a_0, a_1, a_2, a_3);
c = mat3(c_0, d.xyz, c_2);
The shader continues to use a and c as before.
Bug: angleproject:4249
Change-Id: Idfcb8c6037ca0c1f21de8203d7e2a1b66fed6e7e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2488128
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
In preparation for matrix attribute aliasing support, where
CalculateAliasingAttributes would get a bit more complex.
This change adds a fast-check function to determine if there is any
aliasing at all.
Bug: angleproject:4249
Change-Id: Ib2aa08b2da29a194baa905ba8f9aa2cdef0ae2c5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2488127
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This reverts commit 1dc0d3945e.
Reason for revert: Causes a failure on the bots. See: http://anglebug.com/5206
Original change's description:
> Allow rendering to half float in ES2 contexts when possible
>
> According to the EXT_color_buffer_half_float spec:
>
> "Dependencies on OES_texture_half_float
>
> If OES_texture_half_float is not supported, then all references to
> RGBA16F_EXT, RGB16F_EXT, RG16F_EXT, R16F_EXT, HALF_FLOAT_OES and
> half should be ignored.
>
> If OES_texture_half_float is supported, textures created with:
>
> <internalformat> = RGBA
> <format> = RGBA
> <type> = HALF_FLOAT_OES
>
> are renderable."
>
> This fixes 4 viz_unittests when running with SwANGLE:
> All/GLI420ConverterPixelTest.ScaleAndConvert/0
> All/GLI420ConverterPixelTest.ScaleAndConvert/1
> GLScalerPixelTest.Example_ScaleAndExportForScreenVideoCapture
> GLScalerPixelTest.ScalesWithColorManagement
>
> Bug: angleproject:5174
> Change-Id: If8623b1edbc8f0bac83513ea202ef49ad388101c
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2489726
> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
TBR=sugoi@chromium.org,geofflang@chromium.org,sugoi@google.com
Change-Id: Iab2df8ac563661fcf270425408b17e7bbe48a255
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:5174
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2490820
Reviewed-by: Alexis Hétu <sugoi@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@chromium.org>