This reverts commit e1e6f2940c.
Reason for revert: This fix is incorrect, it ends up being a noop. Reverting this first before landing a different fix.
Original change's description:
> Make copyTexImage2D robust when source area is out of bounds
>
> Whenever the source area of the texture being copied is out of
> bounds and robust resource init is enabled, it is necessary to
> clear the invalid portion of the source area to 0 in the copy
> operation.
>
> Bug: angleproject:3930
> Change-Id: If1605b917097006c37e7d59c66babbc32d0ba6d8
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2378004
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
TBR=sugoi@chromium.org,geofflang@chromium.org,jmadill@chromium.org,sugoi@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: angleproject:3930
Change-Id: I9e37a3f739eb7ce5d6d6ab5ca59d11ce9aae8483
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2388718
Reviewed-by: Alexis Hétu <sugoi@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
The block size requirement for each mip level meant that all
DXT textures had to be POT sized. Relax these restrictions for
non-zero mip levels to allow NPOT DXT textures.
Increase the size of the D3D11 staging textures to the nearest
block size to make sure allocation succeeds.
Bug: angleproject:4841
Change-Id: I42fa295a0965241d77f81e57b17454091fda9376
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2380237
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
AMD workarounds relied on the vendor string containing "AMD" or
"ATI". Some vendor strings only contain "Radeon", which lead to
workarounds not being enabled.
Bug: angleproject:5004
Change-Id: Ie32852212afd1df1f3f691c87a5459e1b53b74b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2385932
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
For mutable textures, right now glTexImage call and some of other cases,
we are still using the ImageHelper's staging buffer. This will release
the staging buffer after flush to reduce memory footprint.
Bug: b/164511310
Change-Id: Ie1e52865a1c3a8f235c88331c4bb83c50d3f04da
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2378179
Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
GL_EXT_texture_compression_s3tc_srgb wasn't being exposed on macOS
because formatutilsgl.cpp was looking for GL_EXT_texture_sRGB, but
it was moved to core in 2.1 and the macOS driver doesn't report it
anymore.
Bug: angleproject:4997
Change-Id: Iae736fac6d315f567ff5d834a043134f91625e59
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2380516
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Whenever the source area of the texture being copied is out of
bounds and robust resource init is enabled, it is necessary to
clear the invalid portion of the source area to 0 in the copy
operation.
Bug: angleproject:3930
Change-Id: If1605b917097006c37e7d59c66babbc32d0ba6d8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2378004
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Add the VK_COMMAND_POOL_CREATE_TRANSIENT_BIT flag when creating the
PersistentCommandPool since the command buffers are only used once and
then reset. Update the tracking bugs.
Bug: b/166641492
Bug: b/166793850
Change-Id: I5827b5df7dd150756325421fc6ff0283bbd8b8e1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2381943
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
The script that loads the entry point loaded
glRenderbufferStorageMultisampleEXT from
GL_EXT_multisampled_render_to_texture wrong. This is fixed in
https://github.com/KhronosGroup/VK-GL-CTS/pull/221.
Bug: angleproject:4836
Change-Id: I843b359b12a042f08a63ba6723cf31bdb8509661
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2331740
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Using boxed types, this change allows the compiler to catch errors when
a level index in one space (e.g. GL) is mistakenly used in another space
(e.g. VK).
This change uncovered a number of bugs due to such mistakes which are
fixed.
Mistakes are still possible when the index is explicitly extracted, for
example to be given to a Vulkan command, or when it's created, for
example when retrieved from gl::ImageIndex::getLevelIndex. Future work
can include using gl::LevelIndex in gl::ImageIndex directly to alleviate
the latter at least.
Bug: angleproject:4880
Change-Id: I6427c68c3bc096f771402f51c8554d8171758aa9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2380232
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
The check for "IsPlatformAvailable" was inverted. We were incorrectly
trying only to create a context on invalid configs.
Bug: angleproject:4449
Change-Id: I03fbdc7794a338a55b9dc64521915a8be247bf35
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2376045
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This is another warning turned on in Skia. It enforces an explicit
copy assignment operator in some implicitly-generated cases. It
caught one potential error in SubresourceUpdate.
Bug: skia:7647
Change-Id: Ia501f619cf7f3d2e8647cdbbda2936f51f9721ba
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2381953
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This silences a warning present in Skia. The warning is disabled
in ANGLE/Chrome by build's compiler.gni.
Bug: skia:7647
Change-Id: Ie6308b7f4395786564aa79db8eb35401f3d98048
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2382414
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
They were passed as size_t, while GL level indices are GLint throughout
ANGLE.
Bug: angleproject:4880
Change-Id: I43bc9f01a607e457b55a061f473450d3360db808
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2380230
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
This will avoid allocate staging buffer if there isn't one already.
Bug: b/164511310
Change-Id: Ieb5ef12fa58c52c0a62276cab6de135fdd62780c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2377121
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
This is the initial CL to start migrating to abseil in various places:
- formatutils.h
- FramebufferVk.h
- Program.h
- ProgramExecutableVk.h
- RewriteRowMajorMatrices.cpp
This intentionally hits a couple different places in the code to make
sure the abseil dependencies are added to the required targets.
Bug: angleproject:4873
Change-Id: I68c7d067b6912b0cc0ecde231501dbed92f0b189
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2321735
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
This is caught in the Skia build.
Bug: skia:7647
Change-Id: I9b164f6fcc55b7e13981659ee8a08766a99a2122
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2381084
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
stageSubresourceUpdateAndGetData call are made and then flush the
commands out, so they could just switch to use context's staging buffer
instead of use per object's staging buffer.
Bug: b/164511310
Change-Id: Iff7944a37073bb3641498e334847f599903858b1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2376895
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Fixes a small bug in xxhash.
Bug: skia:7647
Change-Id: Ibd0bd8dc4febfe585e257786d9683ea09c94ec6a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2376718
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
1. Add third_party/abseil-cpp to DEPS so it can be used in ANGLE.
2. Add abseil directory to ANGLE overrides.
3. Add third_party/abseil-cpp to .gitignore.
4. Add third_party/abseil-cpp to roll_chromium_deps.py so it's
auto-rolled periodically.
Bug: angleproject:4873
Change-Id: Ic158bba844e88ec90ac56a2f8c817168c4bea17f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2321734
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Context's staging buffer is shared for all kind of usages. We should
pass in alignment requirement for allocate call whenever it is different
from the default alignment. This adds allocateWithAlignment call to
DynamicBuffer call and switch ImgeHelper's usage of it to
allocateWithAlignment
Bug: b/164511310
Change-Id: Idcb6b6f95d6862ee6cb8fca9c164910b7e085a17
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2373590
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Metal requires the vertex attribute offset to be multiples of 4, and its
stride must not be less than attribute's size.
This should fix the WebGL's test:
conformance/attribs/gl-vertexattribpointer-offsets.html
Bug: angleproject:4846
Bug: angleproject:2634
Change-Id: I0784a8ccaedd5e6c58a266243bfa94ba36e53e11
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2374829
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This reduces preferredLargeHeapBlockSize from the default
value of 256 MB to 4 MB, which reduces the initial block
size from 32 MB to 512 KB.
4 MB is the same size as used by Chromium and Skia. It seems
to be a good compromise of not wasting unused allocated space
and not making too many small allocations.
This change is limited to non-Qualcomm GPUs as a number of
tests are failing on Qualcomm after this change and the
initial investigation indicates a potential driver bug. See
http://anglebug.com/4995 for more details.
Bug: chromium:1122718
Bug: fuchsia:58959
Change-Id: Ifdaf863ef38e72098a04ee57dec46ee71cab6ac3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2376891
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: David Reveman <reveman@chromium.org>
Two bugs were affecting the following scenario:
- Create program with xfb and no default uniforms
- Draw without xfb
- Begin xfb
- Draw with xfb
- End xfb
- map and validate
The first bug was that the descriptor set that contains the xfb buffers
and default uniforms was never allocated for the first draw call
resulting in VVL errors and crashes.
The second bug was that "Begin xfb" was not setting the xfb buffers
dirty bit, which meant that after the first draw call bound dummy
buffers to the descriptor set, they would not get updated. This was
simultaneously fixed in 5d3a4ca4e, but the added test nevertheless tests
this.
Bug: angleproject:4660
Change-Id: I16eee315e39ec5a657481e54ecd0491581e886aa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2376172
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>