Before this change, TIntermConstantUnion::foldUnaryComponentWise always
used the first operand component for some operators. Use the operand
component corresponding to the result component.
Bug: angleproject:7801
Change-Id: I99a941a9eee0c10a4bcb3f515aa5cbf5accc0d52
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3996520
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Auto-Submit: 小田喜陽彦 <[email protected]>
Commit-Queue: Jonah Ryan-Davis <[email protected]>
This is a reland of commit 85c98a92bb
Original change's description:
> Vulkan: Only allocate default attribute if needed
>
> mDirtyDefaultAttribsMask has all bits set when starts.
> ContextVk::handleDirtyGraphicsDefaultAttribs() is looping all dirty bits
> and try to allocate buffer for it, which means we are looping 16
> times when app starts. This CL changes to allocate a buffer only if used
> by program.
>
> Bug: b/258862506
> Change-Id: I2f0a75d1fe141c9ac3101088fdc4ce4f60b0c4ee
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4024544
> Reviewed-by: Shahbaz Youssefi <[email protected]>
> Reviewed-by: Yuxin Hu <[email protected]>
> Commit-Queue: Charlie Lao <[email protected]>
Bug: b/258862506
Bug: angleproject:7866
Change-Id: Iad0b6a6ce5ec42e48461a199773eb8dc9976265e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4144938
Reviewed-by: Yuly Novikov <[email protected]>
Reviewed-by: Yuxin Hu <[email protected]>
Commit-Queue: Charlie Lao <[email protected]>
The internal uniform, which is used for passing GL state on
some platforms, could be removed by GL drivers when built-ins
are not accessed; this may lead to failed frontend assertions.
Refactored relevant compiler state and validation helpers to
avoid ambiguous usage.
Added ClipCullDistanceTest.Unused test.
Bug: angleproject:4452
Change-Id: I06fdf9a69e01afb2ad11fa12e0510d8b0421e4bc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4143839
Commit-Queue: Alexey Knyazev <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Previously we were using the key value as the resource value.
In some cases these values would become mismatched when running
a replay, which would cause interpreter errors.
Bug: angleproject:7887
Change-Id: I7f8e687986e8282a6df066bdae5ace07e4510b47
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4140258
Reviewed-by: Cody Northrop <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
macOS 13/iphoneOS 16 deprecated Metal APIs, causing warnings when
building ANGLE targeting Ventura as the minimum supported OS. WebKit
handles deprecated APIs by selectively silencing warnings around the
affected code.
This change adds ANGLE_APPLE_ALLOW_DEPRECATED_{BEGIN/END} and wraps code
generating warnings to silence the warning.
Bug: angleproject:7908
Change-Id: I7469652e0f4e0cf41ae3c295c2e3ae6bbd72e949
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4121822
Reviewed-by: Kenneth Russell <[email protected]>
Commit-Queue: Kenneth Russell <[email protected]>
RenderPassCommandBufferHelper::isImageWithLayoutTransition() was added
in crrev.com/c/3366014 to detect if there is a barrier inserted for the
renderPass. If yes, we have to endRenderPass before compute shader,
since compute dispatch goes into outsideRenderPassCommands, which writes
into primary command buffer before renderPassCommands. Otherwise the
compute dispatch will be using the image before the actual layout
transition occurs, which is wrong. But to detect if the image has a
layout/barrier transition in the renderPass, it maintains an
angle::FlatUnorderedSet. With recent change for per active context queue
serial, we can use the queue serial to detect this. This CL adds a
queueSerial for image layout/barrier change and compares it with
RenderPassCommands' queueSerial to decide if the renderPass has a
layout/barrier for the image.
This CL also did some minor clean ups: Removed unused API
ContextVk::getActiveImages(). Removed writtenByCommandBuffer() check in
CommandBufferHelperCommon::bufferWrite() before calling
setWriteQueueSerial, since the check is more expensive than set. Added
setQueueSerial call in OutsideRenderPassCommandBufferHelper::imageWrite
to be consistent with imageRead. (This might be fixing a bug here).
Replaces a few retainResource(image) to image->setQueueSerial for
consistency.
Bug: b/264472911
Change-Id: I74badd6b8a35f86640e42d330a1a709ccfb961c3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4136948
Reviewed-by: Yuxin Hu <[email protected]>
Reviewed-by: Amirali Abdolrashidi <[email protected]>
Commit-Queue: Charlie Lao <[email protected]>
This reverts commit 61728827d2.
Reason for revert: it breaks aosp build: https://android-review.git.corp.google.com/c/platform/external/angle/+/2374971. Build error: `FileNotFoundError: [Errno 2] No such file or directory: 'angle_code_affecting_program_serialize'`
Original change's description:
> Reland "Make ANGLE program version only dependent on data that matters"
>
> This is a reland of commit c303758fbc
>
> Changes made on top of original commit
> 1. Enable execution permission on python script
> program_serialize_data_version.py
> 2. Remove unused list in libGLESv2.gni
> 3. In angle/BUILD.gn, change file path from
> "relative to angle_root", to "relative to root_build_dir",
> so that inside the script program_serialize_data_version.py,
> we don't have to find the absolute path of the code files for
> hashing.
>
> Original change's description
>
> > This change introduces a new variable ANGLE_PROGRAM_VERSION
> > to track the version of ANGLE source files that affect shader
> > program serialization/deserialization. This change include more
> > source files than necessary, to serve the purpose of a conservative
> > jumping off point. We will narrow down the list of files for
> > ANGLE_PROGRAM_VERSION hash generation in the future.
>
> > Add a new script program_serialize_data_version.py that will
> > be triggered during the build when the related source files changed.
> > The script will generate a hash and the hash size from the related
> > source files. In program serialization/deserialization and cache
> > key generation, we will use this hash value instead of the entire
> > ANGLE git hash. When the hash value changed, we know that the
> > related source files changed, and we should invalidate the program
> > cache and re-generate the blob cache / program binary.
>
> > Bug: angleproject:4981
> > Change-Id: I2fb609416738d459d3289190c232c2d797ba58e3
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4072215
> > Reviewed-by: Shahbaz Youssefi <[email protected]>
> > Reviewed-by: Cody Northrop <[email protected]>
> > Reviewed-by: Jamie Madill <[email protected]>
> > Commit-Queue: Yuxin Hu <[email protected]>
>
> Bug: angleproject:4981
> Change-Id: Iaa9eb0ab33439197bc30d03064fc245ea7ef1ea8
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4113445
> Reviewed-by: Amirali Abdolrashidi <[email protected]>
> Reviewed-by: Cody Northrop <[email protected]>
> Commit-Queue: Yuxin Hu <[email protected]>
Bug: angleproject:4981
Change-Id: If7d3779c8f40dafa9a9c057f669ab53d0494526e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4140138
Bot-Commit: Rubber Stamper <[email protected]>
Reviewed-by: Amirali Abdolrashidi <[email protected]>
Commit-Queue: Yuxin Hu <[email protected]>
When a texture is been sampled from both fragment shader and compute
shader, you will have the same VkImageLayout. We will not try to end
renderPass, which means you end up running into similar situations with
OutsideRenderPassCommandBufferHelper::bufferRead where an image is
already read accessed by a started renderPass and now read accessed by
an outsideRenderPassCommands. Since renderPass has greater queueSerial,
we should not tag it with outsideRenderPassCommands' queueSerial.
This CL also adds two tests, one for color texture and another for
depth texture (which is car_chase uses). Both exposes the same bug.
Bug: angleproject:7916
Change-Id: I840ca8947caeb7a96c4c9ccb7c9eca2476837c9c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4133548
Reviewed-by: Yuxin Hu <[email protected]>
Reviewed-by: Amirali Abdolrashidi <[email protected]>
Commit-Queue: Charlie Lao <[email protected]>
When does app read from Android Hardware Buffer
is outside of ANGLE's control. If we defer glFlush,
it is possible that when the app is reading from
AHB, the commands have not been flushed and executed,
causing app to read unexpected data. This change
adds a check to not defer glFlush when the Framebuffer
draw attachment is Android Hardware Buffer.
Bug: b/262886794
Change-Id: Ie0606f71b1a4f4f20511b7327e7ffb8c096ac727
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4126700
Reviewed-by: Amirali Abdolrashidi <[email protected]>
Reviewed-by: Charlie Lao <[email protected]>
Commit-Queue: Yuxin Hu <[email protected]>
The `SpirvType` is used as a key in a hash map. When using Visual Studio
17.4, the build fails as `SpirvType`'s equality operator is not defined.
This declares `SpirvType`'s equality overload on its header file.
Bug: angleproject:7925
Change-Id: If5013df36eb9c33bba88eebe8752df7808b02ff5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4136932
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
The idea behind is to save metrics in a structured output with
full context so that we don't have to parse stdout and
reconstruct that context (e.g. which test was running when
the output was printed etc).
Note: we already have a "histogram" file (addHistogramSample)
written but it is structured using some UUID-based ids making its
digestion more complicated (https://anglebug.com/7299#c3).
This CL just writes events as one-json-per-line
simplifying downstream handling and debugging.
Just a sanity check / logging in the merge script for now.
Bug: angleproject:7299
Change-Id: I56dada643eceef180ce9bb1aa9ae6a641ea41e4c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3945112
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Roman Lavrov <[email protected]>
When tracking texture updates during glCopyImageSubData, choose
an enum supported by PackedEnum when looking up the textureID.
Also add a test for a common pattern used by the Unreal Engine that
trips up FrameCapture.
Test: CopyImageTestES31.CubeMapCopyImageSubData/*
Bug: angleproject:7913
Change-Id: I6c0fee69064cc6dc81177093ec9461dd5ccc152a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4126449
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Cody Northrop <[email protected]>
The existing code seems to try to keep all AHB formats defined in
android_util.cpp (potentially in an attempt to simplify format
conversions?). However, trying to avoid redefinition errors when
conditionally re-defining the AHB formats across builds/branches
is difficult.
IIUC, there are two levels at play when building for Android:
1) "target level": the level of the phone/device you are building
for.
2) "build level": the level of the repository/checkout you are
building from.
The "target level" (__ANDROID_API__) cannot be used to guard the
definitions in android_util.cpp because it is possible to build
for an older device in a newer branch. For example, suppose
AHARDWAREBUFFER_FORMAT_X was introduced in Android T. If ANGLE
tried to redefine AHARDWAREBUFFER_FORMAT_X in android_util.cpp
with the guard "if __ANDROID_API__ < T", re-definition errors
would still occur when building for Android S devices (
__ANDROID_API__ set to S) from inside of an Android T branch
because the format would still be defined in
android/hardware_buffer.h. A failure of this type can be seen in
aosp/2308065 which tried to guard AHARDWAREBUFFER_FORMAT_R8_UNORM
with "if __ANDROID_API__ < 33". Additionally, Android sets
__ANDROID_API__ to 10000 before releases are cut and it is
supposed to be fixed at release time. However, this has
been observed to not be fixed on some less maintained side
branches.
Detecting the "build level" seems to be quite difficult. When
building from outside of Android, this is the NDK level which
can be detected using __ANDROID_NDK__ and __NDK_MAJOR__.
When building from inside of Android, this is the latest level
available on your specific branch. I believe this can only be
found by incrementally checking for the existence of the various
__ANDROID_API_R__, __ANDROID_API_S__, etc defines. This alternative
can be seen in https://crrev.com/c/4039066. However, this is very
difficult to find and read.
Instead, let's just define ANGLE's own enum which mirrors the
Android enums which can be used without having to worry about
the current build system or release/branch.
Bug: b/259551816
Test: cvd start --gpu_mode=guest_swiftshader
Test: atest librenderengine_test
Test: ANGLE presubmit
Test: Android presubmit on aosp/master (aosp/2360445)
Test: Android presubmit on aosp/android13-gsi (aosp/2360447)
Test: Android presubmit on aosp/android11-gsi (aosp/2360520)
Change-Id: I62f12cb0e1cc4b3b24aab7b85f39360a2cd2e438
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4112148
Commit-Queue: Jason Macnak <[email protected]>
Reviewed-by: Ian Elliott <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>