Previously, all suported extensions were always exposed in the
preprocessor. This broke some games which relied on ESSL1-only extension
macros not being defined in ESSL3 shaders. This change adds min/max
version information to list of extensions so the preprocessor can
conditionally expose extensions based on the shader language version,
both via the extension name macros and the #extension directive.
Test: angle_unittests --gtest_filter="VersionTest.*"
Test: angle_end2end_tests --gtest_filter="*ESSL*ExtensionMacros*"
Test: Run com.gameloft.android.ANMP.GloftGGHM on Pixel 6
Bug: b/268091452
Change-Id: I2332a6cb964f54c47d23e2ef6b24e99a0b5c8202
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4304907
Reviewed-by: Cody Northrop <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Mike Schuchardt <[email protected]>
Chrome doesn't have a codegen template for queries that model the
"robust" signature, so support both types.
Specify that the robust variants are only supported if
ANGLE_robust_client_memory is supported, so Chrome and other
implementations don't have to support them.
Bug: chromium:1421437
Change-Id: Icc69b69ce9ce0a2cfad0dbeed1f3b29bcfa92d20
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4321867
Commit-Queue: Chris Dalton <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
The ANGLE_shader_pixel_local_storage implementation makes internal use
of various other extensions. These extensions must be implicitly enabled
when ANGLE_shader_pixel_local_storage is in use. In this CL:
* Convert ANGLE_shader_pixel_local_storage and
ANGLE_shader_pixel_local_storage_coherent to requestable extensions.
* Implicitly enable the dependency extensions, including each other, at
the time either of these extensions is enabled.
Bug: angleproject:7279
Bug: chromium:1421437
Change-Id: I26acbda776fe7045ea99d4f1e3df445e7a5cfd7f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4306526
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Commit-Queue: Chris Dalton <[email protected]>
It was assumed that the external MTLSharedEvent passed to eglCreateSync
should be signaled by the GL. This change adds
EGL_SYNC_METAL_SHARED_EVENT_SIGNALED_ANGLE, which when passed as the
value for EGL_SYNC_CONDITION during eglCreateSync, changes the behavior
to not insert a fence command into the command stream.
Test: angle_end2end_tests --gtest_filter=EGLSyncTestMetalSharedEvent.AngleMetalSharedEventSync_WaitSync_ExternallySignaled
Bug: angleproject:8064
Change-Id: Ia1b8615b976f293d411b7d2be506b0ac87d64dee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4307152
Reviewed-by: Kenneth Russell <[email protected]>
Commit-Queue: Kenneth Russell <[email protected]>
Reviewed-by: Sunny Sachanandani <[email protected]>
Suppressed misbehaving trace test in https://crrev.com/c/4317088
This is a reland of commit 71f6d54c8d
Original change's description:
> Add vulkan format image fallback for R16G16B16
>
> This change adds a vulkan format image mapping fallback from R16G16B16
> to R16G16B16A16, R32G32B32_FLOAT and R32G32B32A32_FLOAT for both
> UNORM and SNORM variants.
>
> This is done because in Chrome we want to use R16/RG16 formats which
> are exposed to Skia over the EXT_texture_norm16. Currently,
> EXT_texture_norm16 requires RGB16_EXT which if not present is not
> supported even if R16_EXT and RG16_EXT are supported. This fallback
> helps us support R16/RG16 as well over RGBA16.
>
> It also updates validationES checks for GL_RGBA signed and unsigned
> normalized checking if type is GL_SHORT or GL_UNSIGNED_SHORT.
>
> It adds a method LoadToFloat that allows a type (GLushort or GLshort)
> to be loaded into float format types. This is then used as part of
> fallbacks for load_functions_data.json.
>
> Bug: None
> Change-Id: I5c6879cd2ed5dd6e3440877f4891f269d96d88a1
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4294694
> Reviewed-by: Vasiliy Telezhnikov <[email protected]>
> Reviewed-by: Geoff Lang <[email protected]>
> Commit-Queue: Geoff Lang <[email protected]>
Bug: None
Change-Id: I101dd9e8c62e6794692c9f89c4944297e195f710
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4317089
Reviewed-by: Cody Northrop <[email protected]>
Auto-Submit: Roman Lavrov <[email protected]>
Commit-Queue: Cody Northrop <[email protected]>
The extension is trivially exposed
if the current context supports it.
* Added packed clip control enums
* Removed unused state query code
* Aligned symbol names with the specs
Bug: angleproject:8066
Change-Id: I9d106f39800658ecc75f4525ee93cb534dc49f9e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4306770
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Alexey Knyazev <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Used texture views to sample stencil values
from combined depth/stencil textures.
Texture2DDepthStencilTestES3.TexSampleModes* tests
were split into swizzled and non-swizzled variants
to suppress only swizzled cases on some platforms.
Added a new avoidStencilTextureSwizzle workaround to
skip creating swizzled texture views of stencil-only
textures on platforms that fail to sample from them.
Fixed: angleproject:8051
Change-Id: I0b1148f8d30fc6459239efcdaeee6c0364633cc8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4304058
Commit-Queue: Alexey Knyazev <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
This reverts commit 71f6d54c8d.
Reason for revert: crashing win-trace
https://ci.chromium.org/ui/p/angle/builders/ci/win-trace/3527/overview
Also reproducible on Linux:
% src/tests/capture_replay_tests.py --gtest_filter="Texture2DNorm16TestES3.TextureNorm16R16
Original change's description:
> Add vulkan format image fallback for R16G16B16
>
> This change adds a vulkan format image mapping fallback from R16G16B16
> to R16G16B16A16, R32G32B32_FLOAT and R32G32B32A32_FLOAT for both
> UNORM and SNORM variants.
>
> This is done because in Chrome we want to use R16/RG16 formats which
> are exposed to Skia over the EXT_texture_norm16. Currently,
> EXT_texture_norm16 requires RGB16_EXT which if not present is not
> supported even if R16_EXT and RG16_EXT are supported. This fallback
> helps us support R16/RG16 as well over RGBA16.
>
> It also updates validationES checks for GL_RGBA signed and unsigned
> normalized checking if type is GL_SHORT or GL_UNSIGNED_SHORT.
>
> It adds a method LoadToFloat that allows a type (GLushort or GLshort)
> to be loaded into float format types. This is then used as part of
> fallbacks for load_functions_data.json.
>
> Bug: None
> Change-Id: I5c6879cd2ed5dd6e3440877f4891f269d96d88a1
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4294694
> Reviewed-by: Vasiliy Telezhnikov <[email protected]>
> Reviewed-by: Geoff Lang <[email protected]>
> Commit-Queue: Geoff Lang <[email protected]>
Bug: None
Change-Id: I8373aee3a1d2c2279a3882ff7203d88483e29f4e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4316422
Bot-Commit: Rubber Stamper <[email protected]>
Commit-Queue: Roman Lavrov <[email protected]>
Currently ANGLE does not use "vkResetCommandBuffer()" on Vulkan
Secondary Command Buffers. Instead it uses "vkFreeCommandBuffers()" and
"vkAllocateCommandBuffers".
According to spec, "VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT" is
required only for command buffer reset operations.
However, some ARM drivers may not free memory in
"vkFreeCommandBuffers()" without this flag.
Bug: angleproject:8059
Change-Id: Ibfe45bca345dc48484b625c450369d30805cec77
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4306722
Reviewed-by: Charlie Lao <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Igor Nazarov <[email protected]>
This change adds a vulkan format image mapping fallback from R16G16B16
to R16G16B16A16, R32G32B32_FLOAT and R32G32B32A32_FLOAT for both
UNORM and SNORM variants.
This is done because in Chrome we want to use R16/RG16 formats which
are exposed to Skia over the EXT_texture_norm16. Currently,
EXT_texture_norm16 requires RGB16_EXT which if not present is not
supported even if R16_EXT and RG16_EXT are supported. This fallback
helps us support R16/RG16 as well over RGBA16.
It also updates validationES checks for GL_RGBA signed and unsigned
normalized checking if type is GL_SHORT or GL_UNSIGNED_SHORT.
It adds a method LoadToFloat that allows a type (GLushort or GLshort)
to be loaded into float format types. This is then used as part of
fallbacks for load_functions_data.json.
Bug: None
Change-Id: I5c6879cd2ed5dd6e3440877f4891f269d96d88a1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4294694
Reviewed-by: Vasiliy Telezhnikov <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
Add zlib to delete_only_deps, otherwise gclient seems to choke
on it https://crbug.com/skia/14155#c3
Also git add $root_add_dep instead of "$root_add_dep/*" as
the latter wouldn't add deleted directories
like third_party/zlib in this case.
We also need zlib in unsupported_third_party_deps so that it gets
deleted after gclient sync. When a file from a nested git repo was
already added to the tree previously, git no longer relies on .git
subdirectory detection and works as if .git wasn't there.
This is a reland of commit 39f0eaf809
Original change's description:
> Replace zlib from chrome by Android's zlib.
>
> Implements Elliott's https://r.android.com/2360448 in our codegen. The
> only diffs are ordering and third_party_android_ndk_cpu_features.
> We only seem to depend on cpufeatures for zlib.
>
> //third_party/zlib/google:compression_utils_portable is the root
> dependency, so cutting it makes other zlib libs disappear from
> Android.bp
>
> zlib_google_compression_utils_portable and libz_static
> that this CL depends on were added in https://r.android.com/2359720
>
> Tested by running roll_aosp.sh in Android tree and building.
> third_party/zlib got deleted locally so presumably it should
> get deleted by the roller
>
> Bug: b/262603863
> Change-Id: I2651cc21121d741526055fa2b0288d0dcfa5c62a
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4111891
> Reviewed-by: Cody Northrop <[email protected]>
> Commit-Queue: Roman Lavrov <[email protected]>
Bug: b/262603863
Change-Id: I87226e294a3e293ed5fcdeb2f0cf52f55917c1f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4300169
Reviewed-by: Amirali Abdolrashidi <[email protected]>
Commit-Queue: Roman Lavrov <[email protected]>
This extension allows texturing of the stencil
component of a packed depth stencil texture on
OpenGL ES 3.0 contexts.
Trivially exposed on backends that support
OpenGL ES 3.1, which requires this feature.
Adjusted the tests to check for the new
extension string instead of the context
version.
Bug: angleproject:8051
Change-Id: I4d833acbc72e7374bde91d4c861598a0fdaf9b90
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4295312
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Alexey Knyazev <[email protected]>
This reverts commit 39f0eaf809.
Reason for revert: Broke roller https://crbug.com/skia/14155
Original change's description:
> Replace zlib from chrome by Android's zlib.
>
> Implements Elliott's https://r.android.com/2360448 in our codegen. The
> only diffs are ordering and third_party_android_ndk_cpu_features.
> We only seem to depend on cpufeatures for zlib.
>
> //third_party/zlib/google:compression_utils_portable is the root
> dependency, so cutting it makes other zlib libs disappear from
> Android.bp
>
> zlib_google_compression_utils_portable and libz_static
> that this CL depends on were added in https://r.android.com/2359720
>
> Tested by running roll_aosp.sh in Android tree and building.
> third_party/zlib got deleted locally so presumably it should
> get deleted by the roller
>
> Bug: b/262603863
> Change-Id: I2651cc21121d741526055fa2b0288d0dcfa5c62a
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4111891
> Reviewed-by: Cody Northrop <[email protected]>
> Commit-Queue: Roman Lavrov <[email protected]>
Bug: b/262603863
Change-Id: Ie17cb5b63a2c86a7414230bf9b0e8ef16e8734bb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4298280
Commit-Queue: Roman Lavrov <[email protected]>
Bot-Commit: Rubber Stamper <[email protected]>
Implements Elliott's https://r.android.com/2360448 in our codegen. The
only diffs are ordering and third_party_android_ndk_cpu_features.
We only seem to depend on cpufeatures for zlib.
//third_party/zlib/google:compression_utils_portable is the root
dependency, so cutting it makes other zlib libs disappear from
Android.bp
zlib_google_compression_utils_portable and libz_static
that this CL depends on were added in https://r.android.com/2359720
Tested by running roll_aosp.sh in Android tree and building.
third_party/zlib got deleted locally so presumably it should
get deleted by the roller
Bug: b/262603863
Change-Id: I2651cc21121d741526055fa2b0288d0dcfa5c62a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4111891
Reviewed-by: Cody Northrop <[email protected]>
Commit-Queue: Roman Lavrov <[email protected]>
This CL separate out the logic of mLastCompletedQueueSerial update and
retireFinishedCommands and garbage clean up into different functions. At
submission, previously we are always check fence and update
mLastCompletedQueueSerials and calling reset on finished commands and do
garbage clean up. With this CL, we only do the fence check and update
mLastCompletedQueueSerials. Then it request worker thread to do the
command buffer reset and garbage cleanup. We uses the CommandProcessor's
thread for the reset and cleanup, since async submission path needs to
handle this clean up anyway.
This CL also added a new feature flag asyncCommandBufferReset and it is
disabled right now. This will be enabled in the follow up CL.
Bug: b/255411748
Change-Id: I6da558f8d4c962eb038e2378ccc76c464101cde2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4244823
Reviewed-by: Shahbaz Youssefi <[email protected]>
Auto-Submit: Charlie Lao <[email protected]>
Commit-Queue: Charlie Lao <[email protected]>
Reviewed-by: Amirali Abdolrashidi <[email protected]>
D3D11:
* Exposed EXT_texture_border_clamp extension string,
to ensure that the relevant CTS tests are running.
* Updated StateManager11::setSamplerState to adjust
the border color based on the texture format.
* Refactored ShaderConstants11::updateSamplerMetadata to
correctly adjust the border color for integer formats.
* Removed unused SamplerMetadata.internalFormatBits
D3D9:
* Updated Renderer9::setSamplerState to adjust the border
color value based on the current texture format.
* Added borderColorSrgb feature required for some drivers.
GL:
* Copy alpha value to green for A and LA legacy formats to
workaround driver bugs when lumaWorkaround is not used.
Tests:
* Added ES 2.0 tests for texture formats
that require border color adjustments.
Fixed: angleproject:7969
Change-Id: I3d36cce43e76e6d5069a51865152c2250ecbb017
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4291000
Commit-Queue: Alexey Knyazev <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Adds support for running ANGLE pixel tests with a more permissive
inexact matching algorithm. This is done by passing in
--use-permissive-pixel-comparison=1 to the test runner.
This is intended to reduce the amount of manual triage work
required on CLs that are expected to have a larger amount of
differences, such as SwiftShader rolls.
On the bots, this will normally be disabled, but will be enabled
if "Use-Permissive-Angle-Pixel-Comparison: True" is present as
a CL footer.
This footer is not yet included automatically anywhere, so
there should be no functional change as a result of this CL yet.
Bug: angleproject:7985
Change-Id: Ie815fac42edb2198dd4d115fc50650504df136c0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4288612
Auto-Submit: Brian Sheedy <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
There is a maximum limit for device memory object allocation. On some
platforms, there can be an error regarding too many object allocations
when 4096 device memory handles have been allocated. Suballocation can
help mitigate this issue. In this CL, some images will be allocated
using VMA API calls, which use suballocation.
* Added a new feature (useVmaForImageSuballocation).
* Added VMA allocation for ImageHelper, which is used in initMemory().
* Suballocation is used for VMA image allocation.
* If enabled, mVmaAllocation will be initialized in the ImageHelper
object (instead of mDeviceMemory).
* It is currently used for all platforms.
* Minor change to the name of an arg in CreateBuffer() declaration.
* Added test to make sure we can allocate at least 4096 images on
supported platforms (8000 in the test).
* Skipped the test "NonZeroBaseEmulatedClear" when run on Linux/Intel
if this feature is enabled (due to output color mismatch).
* Skipped several tests for capture/replay on Windows.
Bug: b/218891184
Change-Id: Ibf80c9c8c485b301da7d23b5ba4bcbb1a8e3194f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4191202
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Charlie Lao <[email protected]>
Commit-Queue: Amirali Abdolrashidi <[email protected]>
Macro was originally undefined in crrev.com/c/361291.
Undefining it breaks UWP build with newer compilers.
Keeping the macro defined doesn't affect libGLESv2 exported symbols,
so it looks like there is no need to undefine it.
Bug: chromium:1380553
Change-Id: I6476aa015949e5f2639160fac80db39da710bfb7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4262071
Commit-Queue: Yuly Novikov <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Update Metal format tables according to the Metal Format Tables.
Disables OES_texture_float_linear on current iOS hardware, since
R*32Float filtering is not available.
Fixed: angleproject:8028
Change-Id: I29603d308f1992feb62ee997b0f69f8e6d0d385e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4266915
Commit-Queue: Kimmo Kinnunen <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Auto-Submit: Kimmo Kinnunen <[email protected]>
So far calls involving EGLSync were not tracking the actual
sync objects, and this may lead to race conditions in
multi-threaded and multi-context scenarios.
This CL adds the type EGLSyncID and some specialized code
handling of egl::Sync to distinguish EGLSync from the already
existing GLSync objects in order to track them separately.
Bug: angleproject:7911
Change-Id: I91b188a41069bc0620f51c55ee516d23b55bdd38
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4200095
Commit-Queue: Gert Wollny <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>