|
a44693f6
|
2025-09-17T14:50:37
|
|
Vulkan: Fix SPIR-V gen for invariant structs
Bug: angleproject:349994211
Change-Id: I7db05d9a6232a577a65f7a337cfd1636bce0c53b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6961859
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
44db20f2
|
2025-09-17T15:57:09
|
|
Revert "Add a "noncoherent" layout qualifier to PLS"
This reverts commit ef9c5ce43110f4f8ba56124bdee927944ce3ddd1.
Reason for revert: Causes issues on Apple silicon crbug.com/445727125
Original change's description:
> Add a "noncoherent" layout qualifier to PLS
>
> Raster ordering can be expensive. If an app knows the geometry in a draw
> does not overlap, it can mark the PLS planes as noncoherent and opt for
> using barriers instead.
>
> Bug: angleproject:40096838
> Change-Id: I2d686c2e64f51940face186637a9fcadcc251bef
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6923300
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Kenneth Russell <kbr@chromium.org>
> Commit-Queue: Chris Dalton <chris@rive.app>
Bug: angleproject:40096838
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ibc24bed27cec406b6e4ffa9aaa8fe3a2110b58ba
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6962955
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
|
|
f128872e
|
2025-09-16T23:37:08
|
|
Translator: Compare variables by unique id instead of pointer
Bug: angleproject:349994211
Change-Id: I32ab2ffe9a04e196330949484e704913d0f4e41d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6955119
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
ef9c5ce4
|
2025-09-07T17:50:37
|
|
Add a "noncoherent" layout qualifier to PLS
Raster ordering can be expensive. If an app knows the geometry in a draw
does not overlap, it can mark the PLS planes as noncoherent and opt for
using barriers instead.
Bug: angleproject:40096838
Change-Id: I2d686c2e64f51940face186637a9fcadcc251bef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6923300
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app>
|
|
16771259
|
2025-09-12T11:10:18
|
|
Update main() prototype in shader if main() has been replaced.
If the main() function definition has been wrapped/replaced in a shader
and a main() function prototype is also present, the prototype needs to
be replaced. Otherwise it will continue to reference the replaced
main() which can cause issues with shader translation steps.
Bug: angleproject:444653099
Change-Id: Ie6ce85cac89e026876a1b6e25cd294f1d8a536c4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6944807
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Kimmo Kinnunen <kkinnunen@apple.com>
|
|
b8281f5d
|
2025-09-09T17:15:26
|
|
Add condition check in emulate dithering shader code
Prior to this change, the emulate dithering shader code will write to
all elements of gl_FragData, regardless of whether the dither value is
zero or not: gl_FragData[i] = gl_FragData[i] + dither_value.
If dither_value is 0, then this doesn't change gl_FragData[i] and it
incurs unnecessary shader writes.
This change adds a boolean variable that is initialized to
false, and it is only set to true if dither value for that output
element is changed from zero to non-zero value. This way we are only
issuing shader write operations when necessary.
Bug: angleproject:425733272
Change-Id: Iacfd81ff9a1d7d0f71ecf8d119033b2500d2869e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6931777
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a0cc64cd
|
2025-09-10T15:18:17
|
|
HLSL: Mark shadow sampler textureLod calls as using gradients
TextureLod calls bottom out in the HLSL SampleCmp function which does
not take a LOD parameter so we end up dropping it. This causes them to
need gradients. Mark them as using gradient so that any loop they are
used in is flagged and not unrolled by FXC.
Reverted original fix from
https://chromium-review.googlesource.com/c/angle/angle/+/6421496
because the wrong number of parameters are passed to the generated
comparison sampling function when it is changed to LOD0.
Thanks to Mikkel Simonsen at Unity and Calder Young for the tests.
Fixed: angleproject:406190894
Change-Id: Ia9255e4336099045366c02f945a3c4de8075427a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6936488
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
|
|
a471c005
|
2025-08-19T17:24:38
|
|
WGSL: derivative_uniformity diagnostic should be a warning
WGSL requires derivatives to be calculated only if it can
statically prove control flow is uniform. GLSL allows
dynamically uniform control flow in this case. This CL uses
WGSL's diagnostic filter to make derivative_uniformity
diagnostics into warnings, to match GLSL semantics.
Bug: angleproject:392542001
Change-Id: I98dd55205ad6d3c9d13ca3f94c0e7858ba92d536
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6862844
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Matthew Denton <mpdenton@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
cfe2c8fe
|
2025-06-25T13:25:01
|
|
WGSL: RewriteMultielementSwizzle
WGSL doesn't support assignments to multi-element swizzles.
This is used in a lot of shader tests, so temporarily work around
this with an AST traverser that splits these assignments into
multiple assignments that only assign to single element
swizzles.
One special case is multiplication-by-a-matrix assignment:
vec.xy *= mat;
is converted to
vec.x = (vec.xy * mat).x;
vec.y = (vec.xy * mat).y;
Bug: angleproject:392542001
Change-Id: I3f393039aae13eb3f2c5dc5e553f68eb03b6316d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6847280
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Liza Burakova <liza@chromium.org>
|
|
c1cdc2b5
|
2025-08-22T15:23:58
|
|
Transform SPIRV to use 16-bit float for lower precision uniforms
This change adds a ShCompileOption flag transformFloatUniformTo16Bits.
The flag is turned on in vulkan backends where VK_KHR_16bit_storage
extension is supported, and uniformAndStorageBuffer16BitAccess feature
is supported. When the compiler flag is turned on, in the generated
SPIRV, float data types in mediump and lowp uniforms are transformed
from 32-bit to 16-bit. The 16-bit float uniform data is converted to
32-bit with OpFConvert instruction upon loading in SPIRV, this is to
minimize the changes in OutputSPIRV.cpp. The converted variable is
decorated with RelaxedPrecision, so that SPIRV compiler should be able
to treat the converted variable as 16 bits, and the hardware can
still benefit from reduced precision floats.
The frontend is also notified such SPIRV shader changes by setting
the isFloat16 bit in CollectVariables() step, and the frontend will
transform float uniform data from 32-bit to 16-bit before storing the
data into memory. That way, the uniform data that SPIRV shader reads
matches with the uniform data type transformed in the SPIRV shader.
This change also updates some test code to allow relative 2^-10
precision wiggle room for mediump uniform floats. This is valid
according to spec:
https://developer.arm.com/documentation/102502/0101/Shader-precision
Bug: angleproject:405795981
Bug: angleproject:440941211
Change-Id: I05db7f5ef744df513fbad87cfed8aa173890ec26
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6851560
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
eefcdafd
|
2025-08-29T00:13:27
|
|
Fix some old clang-tidy warnings about move constructors
-- Remove move of copy-only ImmutableString
-- Fix rule-of-five issues with StringPart.
Bug: b/364788123
Change-Id: Ief9c2a83df15d2e8856e8f729c1908df65004bfc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6896659
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Tom Sepez <tsepez@chromium.org>
|
|
6f0337a0
|
2025-08-28T23:13:22
|
|
Avoid some needless c_str() calls.
Remove conversions from string -> char* -> string, as detected some
time ago by a clang compiler plugin. Typically, this occurs when
passing a c_str() result to a function that expects a string argument.
Bug: b/412730353
Change-Id: I1d9c83e9ed5c4900eec266e71f534661f0f3d4d4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6896657
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
1ae273ee
|
2025-08-27T10:47:59
|
|
Translator: Output struct members in OutputTree
Bug: chromium:438038775
Change-Id: I2a1bed5207b1b2c26f20ee9ebd80fb00ec803bc2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6891072
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
af0386cb
|
2025-08-27T10:44:53
|
|
Reorder structs entirely made of samplers to the end of struct
An earlier change [1] moved samplers to the end of structs so that
extracting them does not disturb the indices to the non-sampler fields.
This change does the same for structs that only contain samplers,
because they too get removed from the parent struct, disturbing indices.
[1]:https://chromium-review.googlesource.com/c/angle/angle/+/5748789
Bug: chromium:438038775
Change-Id: I7ac2ea13723bf06b4b172b6e70f0dbe85bc45ce3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6891071
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
9dc36791
|
2025-08-28T07:24:21
|
|
WGSL: Fix unused variable in translator
Test: Build with is_debug = false
Bug: angleproject:441701631
Change-Id: Ifa44bb5388788602e76c2ae2005bdd41d2c22dd4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6896036
Auto-Submit: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a02670d6
|
2025-08-26T20:41:16
|
|
Move unsafe buffers inside header guard macros
While this is exactly opposite of what Chromium has chosen to do,
there is an issue with clang-format trying to indent preprocessor
directives four spaces relative to include guard. This is because
Angle's .clang-format file specifies IndentPPDirectives: AfterHash
but Chromium's does not. The current placement is sufficient to
throw off clang-format's guard detection since the guard macro no
longer covers the entire file.
Bug: b/436880895
Change-Id: Ic6b99c8cef6213939cdf9b42af8730e1eb423065
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6885892
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b9cec916
|
2025-08-12T19:44:18
|
|
WGSL: default uniforms gathered in interface block
The default uniform struct was being manually output by
OutputUniformBlocksAndSamplers(), which did not add the appropriate
@align(16) annotations to lay the struct out according to WGSL's
uniform address space layout requirements.
This CL uses Vulkan's method of gathering the default uniforms
into an interface block. The interface block will be output
normally by the traverser, including @align() annotations.
The variable declaring an instance of the interface block is
still output by OutputUniformBlocksAndSamplers() because it needs
special @group() and @binding() annotations.
Bug: angleproject:376553328
Change-Id: Ib3be7d51ffedefe5ec579a1c9aaf0a535146c694
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6795028
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Liza Burakova <liza@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
25390156
|
2025-08-21T00:13:19
|
|
Suppress unsafe buffers on a file-by-file basis in src/ [1 of N]
In this CL, we suppress many files but stop short of actually
enabling the warning by not removing the line from the
unsafe_buffers_paths.txt file. That will happen in a follow-on
CL, along with resolving any stragglers missed here.
This is mostly a manual change so as to familiarize myself with
the kinds of issues faced by the Angle codebase when applying buffer
safety warnings.
-- Re-generate affected hashes.
-- Clang-format applied to all changed files.
-- Add a few missing .reserve() calls to vectors as noticed.
-- Fix some mismatches between file names and header comments.
-- Be more consistent with header comment format (blank lines and
trailing //-only lines when a filename comment adjoins license
boilerplate).
Bug: b/436880895
Change-Id: I3bde5cc2059acbe8345057289214f1a26f1c34aa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6869022
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
f63751db
|
2025-08-22T10:34:45
|
|
Fix the UniformSortComparator not following strict weak order
If one uniform is lowp and the other uniform is mediump, then the
compare(a, b) and compare (b, a) both return true. This violates the
strict weak order rule where:
If comp(a, b) == true then comp(b, a) == false
This change fixes the bug.
Bug: angleproject:405795981
Change-Id: I47e2668fc0fa87ecea9d3f9bce511c9823a39929
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6876519
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
20dca0b9
|
2025-08-14T13:54:37
|
|
Add a new TInterfaceBlock class member to hint ANGLE default Uniform
In later change, we will transform floats in ANGLE default uniform
struct from 32-bit to 16-bit in SPIRV. The new class member
mIsDefaultUniformBlock will help us identify this special struct.
This change is no op.
Bug: angleproject:405795981
Change-Id: I939caf7491ab5d7de130ba6a2fd8b1202958c375
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6852398
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
a06cb368
|
2025-08-12T11:45:43
|
|
Fix GCC -Wdangling-pointer warning in NodeStackGuard
The previous implementation stored the address of a local member
(oldNodeStack) into ConsList::tail, which triggers the warning even
though the lifetime is safe within the guard's scope.
This change allocates a copy of the previous nodeStack on the heap
using std::make_unique, and stores that pointer in tail. This ensures
the referenced ConsList object has a lifetime tied to the guard object
itself and is not considered a dangling pointer by GCC's static
analysis.
BUG: angleproject:438226513
Change-Id: Ifea04515db7b1988dff6ec41c60799158b753128
Signed-off-by: Sungyong Choi <sywow.choi@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6845476
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
806c80ec
|
2025-08-14T13:41:58
|
|
Add a new ShaderVariable struct property
Add a new ShaderVariable struct property isTransformedFP16FloatUniform.
This property will be set by compiler when the corresponding shader
variable data type in shader code is transformed from 32 bit to
16 bit. The property value be later passed to LinkedUniform so that
the frontend knows if it should transform the data from 32 bit to 16
bit before writing to memory, and if it should transform the data
from 16 bit to 32 bit after reading from memory.
This change is no op.
Bug: angleproject:405795981
Change-Id: Iaae15baa8ab9f7c3295071fa1e1ab04752bd69bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6852396
Auto-Submit: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
25f5e2cf
|
2025-08-13T17:03:19
|
|
Vulkan: Add support for built-in gl_PrimitiveShadingRateEXT
Add support for built-in gl_PrimitiveShadingRateEXT and relative const
value.
Bug: angleproject:397255625
Change-Id: I25d51f5805697e137b232175ee790808c45850b7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6845515
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
1d8279a2
|
2025-08-13T13:35:02
|
|
Do not sort ANGLE internal uniforms or built-in uniforms
On Mac, for webGL app on chrome, if the uniforms added by ANGLE
are not placed at the top of the ANGLE_UserUniforms struct, the user
defined uniforms in the same ANGLE_UserUniforms struct seem to be
messed up and not read correctly by shader code. This change fixes
it by moving the sortUniforms() function call to the place before we
add ANGLE internal uniforms. That way ANGLE internal uniforms will
be inserted later and stay on top of ANGLE_UserUniforms struct.
Bug: chromium:437678149
Change-Id: I34a0d3dcb98c5fe30ad248381ecb5f7f78252275
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6847281
Auto-Submit: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
63d8f74c
|
2025-08-12T19:39:03
|
|
WGSL: move DeclareDefaultUniforms() out of SPIR-V
WGSL needs the same thing (default uniforms gathered into
an interface block).
Changes 3 things in the file move:
1. Now capable of adding a named interface block (Vulkan's
is nameless) to hold the default uniforms.
2. Removes inactive uniforms
3. Deals with the case where there are no active default
uniforms, by not declaring an interface block at all.
Bug: angleproject:376553328
Change-Id: Ia25318b4db93068010c3c44414cd00803b783799
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6843929
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
|
|
edb05627
|
2025-08-12T12:17:36
|
|
Fix sort uniform bug
Current sort doesn't take care of the case when both uniforms
are struct specfiers. Given that struct types are easily broken by
sort, make the sort not reordering uniforms if both are structs.
Bug: b/437825940
Change-Id: Idda1810ac4234f7e1547735e4e09658ab0a57eed
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6842936
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7e28089b
|
2025-07-31T18:44:01
|
|
WGSL: support bvecs in uniforms
WGSL does not allow booleans in the uniform address space.
The last CL uses u32s to represent bools in the uniform address
space, and this CL uses vecN<u32> to represent bvecN.
Bug: angleproject:376553328
Change-Id: Ibf9f1fbf230ca03dd3d4661ba599e5fb1cb26ac4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6808955
Reviewed-by: Liza Burakova <liza@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
|
|
b2e2766c
|
2025-08-12T11:08:46
|
|
Translator: Reject bool < bool
This is not allowed per the GLSL ES spec.
Bug: chromium:437983671
Change-Id: I9bd46718a35917dcdf6382cd51253ca2b68d5636
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6842555
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
ca3d732d
|
2025-07-24T16:22:31
|
|
WGSL: support bool in uniforms
WGSL does not allow booleans in the uniform address space.
This CL changes the translator to substitute u32 for bool
in the uniform address space, and convert it to bool on use.
Arrays of bools are obviously arrays of u32s, and those
will need special conversion functions to convert the entire
array<u32> to array<bool> if necessary.
This also includes the optimization of an array<bool> in a
uniform--when indexing into it, only the indexed element
will be converted to a native bool, instead of converting
the entire array and then indexing.
Note that substituting u32 for bool matches std140, so this
change requires no changes to layout of uniforms.
Also note that WGSL really likes explicit casts, so there's
not really a way to avoid inserting explicit casts everywhere
when using u32.
Bug: angleproject:376553328
Change-Id: I8f72e55c6b401c28ff622622df7a450b7032721f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6785609
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Liza Burakova <liza@chromium.org>
|
|
fc0e0397
|
2025-07-31T13:15:45
|
|
Translator: Fix location validation for inout
Without this validation, a shader using an inout variable can
write into a memory beyond the limit set by MaxDrawBuffers when
shader framebuffer fetch is enabled.
* Extended the location check in visitSymbol() to include InOut
qualifiers (EvqFragmentInOut) as well (in ValidateOutputsTraverser).
* Moved RewritePixelLocalStorage() after ValidateOutputs() to avoid
issues related to locations not being specified in the InOut nodes
from the PLS implementation.
* Added a unit test to test that this case results in a compilation
error: GLSLTest_ES3.CompileFSWithInoutLocBeyondMaxDrawBuffers
Bug: chromium:435139154
Change-Id: I44c729377a2e1d3126c2d279172217b2ab92b57b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6806230
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a1d5d102
|
2025-07-22T02:15:43
|
|
WGSL: Allow matrices as in/out vars in shaders
WGSL only supports scalars and vectors in in/out vars in shaders,
matrices will need to be broken into column vectors and then
put back together at the beginning (or end) of the shader.
Arrays also need to be split, which will be done in another CL.
Bug: angleproject:42267100
Change-Id: If1ba28c1b687ae0a3a5a554479f0ff0b5d9df39c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6777201
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Liza Burakova <liza@chromium.org>
|
|
6a3ff5a1
|
2025-07-17T12:41:13
|
|
WGSL: extra debug logging for failure cases
Bug: angleproject:42267100
Change-Id: I8938526b60af71d15d4327bc10fa172117afef60
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6777200
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
343e3bdc
|
2025-07-17T12:38:31
|
|
ScalarizeVecAndMatConstructors: also handle scalar constructors
In WGSL you cannot "construct" a scalar from a non-scalar (vec or mat).
This modifies ScalarizeVecAndMatConstructors to handle scalar
constructors as well, indexing and swizzling the argument to select the
first element of the nonscalar.
This makes dEQP-GLES2.functional.shaders.conversions.vector_to_scalar.*
pass (except those that use bool uniforms which are still unsupported).
Bug: angleproject:42267100, angleproject:395659799
Change-Id: Ibaa3dc14f36fecb384bfb6e7f226c6d5f377dd5f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6777199
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
b7582680
|
2025-02-24T18:04:32
|
|
Reland: GL: Allow untranslated shaders to pass through on GLES
Add an EGL extension EGL_ANGLE_create_context_passthrough_shaders which
uses the NULL translator and passes the original shader to the driver.
The parser is still used for shader reflection.
Always enable the null compiler backend. It has almost no binary size
cost and is now potentially used when the null ANGLE backend is not
enabled.
Bug: angleproject:398857482
Change-Id: Id528189ccbbacb1c444eacb151baadfda9fcc04b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6488609
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
cbff5658
|
2025-07-16T14:10:47
|
|
ScalarizeVecAndMatConstructorArgs: cast for mat constructors
In WGSL, matrix constructors also can't handle arguments of differing
basic type than the constructor's basic type, so cast when necessary.
Makes dEQP-GLES2.functional.shaders.conversions.scalar_to_matrix.*
pass for WGSL.
dEQP-GLES2.functional.shaders.conversions.matrix_to_matrix.* does not
yet pass because WGSL can't handle matrix shader inputs/outputs.
Bug: angleproject:42267100, angleproject:395659799
Change-Id: Ia4761190c78ccfe7d748275642361ada93314529
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6777198
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Liza Burakova <liza@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
|
|
2c1a55b3
|
2025-07-16T13:44:49
|
|
WGSL: implement == for vectors by wrapping in all()
WGSL's vec comparisons are component-wise, so wrapping the result in a
call to all() returns true if all components compare equal, matching
the behavior of GLSL's vec comparisons (== and !=).
Bug: angleproject:42267100
Change-Id: Icfbfacf72e53096e2567fa89bcd4bf573e457ec1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6777197
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Liza Burakova <liza@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
|
|
e98dec82
|
2025-07-20T22:16:00
|
|
Translator: Remove Sampler2DRectShadow
This is a desktop GLSL type.
Bug: angleproject:370937467
Change-Id: Ife8b50e57f6e054ccd35df10c2157f8e4a218d37
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6774081
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
251ffe62
|
2025-07-15T17:37:30
|
|
Vulkan: Add support for built-in gl_ShadingRateEXT
Add support for built-in gl_ShadingRateEXT of
GL_EXT_fragment_shading_rate
Bug: angleproject:420310117
Change-Id: Ie11b139a0371b5995f1533a85e02c590cd36109c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6733750
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7cbb77a8
|
2025-07-14T11:32:04
|
|
Fix the uniform reorder bug
When sorting uniforms, we should first check if both uniforms are
structs, and make sure to place the uniforms with specifier in front
of the uniforms without specifier.
Bug: chromium:431318231
Change-Id: I8be9501f34073983b7f3d040780b749a7366e3d2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6733547
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
93b659f9
|
2025-07-04T12:35:29
|
|
Remove PoolAllocator push/pop feature
PoolAllocator would manage a stack of memory pools upon client
calling push() and pop(). This made the code unnecessarily complicated.
The feature was only used with nesting of one, to mark the memory
unused after a shader compile.
Fix by removing the push/pop feature. Instantiate PoolAllocator in
places the previous push() was and uninstantiating instead of previous
pop().
This removes the feature where the PoolAllocator would hold on to
the allocated memory in order to reuse it. This is seen as a
progression: the allocator is held by the compiler, the compiler is
held by the shader and each shader typically see only one compile.
Thus the free pages were just leaking unused until the shader was
destroyed. Instead, destructing the PoolAllocator instead of pop()
will donate the memory back to platform/OS, where it is likely
more useful.
To preserve existing Vulkan behavior, add PoolAllocator::reset()
which would mark the memory unused but leave them reserved for the
PoolAllocator.
Removes UB where PageHeader::nextPage would be accessed after
~PageHeader.
Bug: angleproject:429513168
Change-Id: I21e58b46e0887380db3a2cab5ce22f0042cfae9e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6701153
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
1443a451
|
2025-07-04T16:18:30
|
|
Regenerate the parsers with current cl format
The format tool has changed since last parser generation.
This causes overly many changes when downstream regenerates
the parsers.
The diff formatting fails for flex and bison generated content.
Format them in full always.
Bug: angleproject:429588208
Change-Id: I7a4b8e966e9502920fc25f5c1c5bf80246f5cf0b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6705451
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
|
|
5d51bd19
|
2025-07-01T15:40:10
|
|
Translator: Handle arrays of samplers in FlagSamplersWithTexelFetch
This was found while running tests for Dawn's "sized binding arrays"
(including arrays of textures) with ANGLE + Swiftshader.
Adds a test that ASSERTs without the change.
Bug: chromium:411573957
Change-Id: Ib7fad0f5c0b4f3aa70e6af5bf5977b82956e1986
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6695013
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
56e9bfff
|
2025-06-19T00:00:00
|
|
GL: Remove obsolete macOS workarounds
Bug: angleproject:427600175
Change-Id: I8bfc062b71f1a34de09cbf76b504293ccd081fe0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6676022
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
beae1b4a
|
2025-06-19T00:00:00
|
|
Metal: Remove obsolete workarounds
Removed Intel-specific Metal workarounds
that are not used on macOS 12 and later.
Removed a redundant version check.
Bug: angleproject:427600175
Change-Id: I34c7e53108f7e030512c9436ab2b9ae38ad17946
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6672312
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
f48fcb46
|
2025-06-19T07:11:48
|
|
Revert "Metal: Wraparound int arithmetic for add, sub"
This reverts commit 2f6f0514563d81e439e04ba09eee9e8a1d6ca8d1.
Reason for revert: Leads to MSL compiler errors:
> error: non-const reference cannot bind to vector element
Bug: angleproject:382215759
Original change's description:
> Metal: Wraparound int arithmetic for add, sub
>
> Implement wraparound int arithmetic for
> int, ivec +, -, +=, -=, ++, --.
>
> All of the added tests pass also without the changes.
>
> Bug: angleproject:382215759
> Change-Id: I7605582ab2931e63010c34fba474797f7edd19f9
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6578729
> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
Bug: angleproject:382215759
Bug: chromium:425746892
Change-Id: I831d96c6ee7b8bcdeaa08fbf32d430def87a3c30
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6656001
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a2b84cc0
|
2025-06-17T09:47:58
|
|
Fix bug in translator fuzzer.
We were incorrectly checking a type against a spec.
bug: angleproject:425580663
Change-Id: I7a57852b143ea26a41414015414d43720e2e53b1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6650788
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
94ee620d
|
2025-05-22T10:07:05
|
|
Metal: Allow optimization of simple loops
Reimplement the feature to avoid undefined behavior of infinite loops.
Add EnsureLoopForwardProgress rewrite pass that inserts a volatile
variable access to all loops that it cannot analyze as being finite.
Detect loops of form `for (; i <op> x; ++i)` as being finite.
The <op> can be any of <,<=,>,>=,==, != operator.
The i can be int or uint.
The ++i can be -- or ++, -=1, +=1.
This assumes that backends using the feature emit signed int arithmetic
with defined wraparound semantics.
Uses volatile write instead of asm("") due to asm not forcing the
behavior in some compiler versions. The volatile variable access is
defined in C++ as forward progress, and by inheritance this works in
MSL.
Later commits may remove injectAsmStatementIntoLoopBodies if
ensureLoopForwardProgress is appropriate for all use-cases.
Bug: angleproject:418918522
Change-Id: Ic9c29f57044b792195386483208632354d24c854
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6575051
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
|
|
005336e4
|
2025-06-11T17:17:16
|
|
WGPU: Basic texture cubes
Allows uploading to texture cube faces and sampling from them
in shaders using samplerCube.
Bug: angleproject:420782526
Change-Id: I45d4370fcc418f39afb225114d13632a78c7c200
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6593999
Reviewed-by: Liza Burakova <liza@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
|
|
1e613fec
|
2025-05-27T16:59:26
|
|
Compiler: sort uniforms by precision
This change reoreders the AST sequences so that uniform declarations
with lower precisions are places in front of uniform declarations with
higher precisions. This is to prepare for the upcoming change that
converts uniforms declared with mediump or lowp to 16-bit and pack them
to 32-bit integeter using packHalf2x16().
Bug: b/405795981
Change-Id: I5e1e293399dc8b51b9a6e83115f95beb0c4a7b1b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6594255
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
af6313f5
|
2025-06-02T10:31:27
|
|
Check redundant statements for comma op in MSL translator.
Bug: angleproject:421891565
Change-Id: I0475476f360f103a3da4df263dae9c604a8bfef5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6610091
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Kimmo Kinnunen <kkinnunen@apple.com>
Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
|
|
bc2c85a6
|
2025-05-27T11:40:33
|
|
Translator: Set correct qualifiers on user-declared gl_PerVertex
Bug: angleproject:409439499
Change-Id: Ia4bc1335d977f2b138af877e5d698914b182ff52
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6592612
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
2f6f0514
|
2025-05-22T15:59:19
|
|
Metal: Wraparound int arithmetic for add, sub
Implement wraparound int arithmetic for
int, ivec +, -, +=, -=, ++, --.
All of the added tests pass also without the changes.
Bug: angleproject:382215759
Change-Id: I7605582ab2931e63010c34fba474797f7edd19f9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6578729
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
|
|
157a99aa
|
2025-05-20T23:59:29
|
|
Update logic for redeclaring gl_FragDepth.
Update ParseContext logic to handle redeclaration of gl_FragDepth.
Bug: angleproject:419066563
Change-Id: I774d036922ec75ca151f1c871afc243ca09a3061
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6573532
Reviewed-by: Kimmo Kinnunen <kkinnunen@apple.com>
Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
96c9f065
|
2025-05-15T19:22:29
|
|
WGPU: Flip y for the default framebuffer
Bug: angleproject:389145696
Change-Id: I0d527ad3dc24dbca7e9d914b03edacdc257a568f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6477137
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
|
|
671f55d8
|
2025-04-03T22:54:44
|
|
Vulkan: Fix texelFetch(externalSampler) behavior
GLES expects YUV decoding to happen with texelFetch when an external
sampler is used, but texelFetch's translation (OpImageFetch) does not do
such a thing. A transformation is added to replace that with a texture
call at the right coordinate.
Bug: angleproject:405149439
Change-Id: I3a8d07a6399705ec07718b38085ee4bc1ad2af6c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6431570
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
cac1e824
|
2025-04-29T18:27:36
|
|
WGSL: Output driver uniform and UBO structs
This is the WGSL half of the change to implement driver uniforms.
Driver uniforms are implemented as a UBO and reuse the default
set of driver uniforms. User-provided UBOs don't yet have
variables outputted for them.
This requires moving MSL's ReduceInterfaceBlocks to the tree_ops
dir in order to change interface block definitions into struct
definitions.
Bug: angleproject:389145696
Change-Id: I27f3837b3d115f2ffac66cc545f3b60ca9f01cb6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6477564
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
4b69ba93
|
2025-04-28T16:45:56
|
|
WGPU: upload texture bind groups and configured samplers
GLSL samplers are split into separate sampler/texture variables
in WGSL. Before this CL, the WGSL translator generated shaders
that look like:
@group(1) @binding(@@@@@@) var ANGLE_sampler_samp2D :
sampler;
@group(1) @binding(@@@@@@) var ANGLE_texture_samp2D :
texture_2d<f32>;
@group(1) @binding(@@@@@@) var ANGLE_sampler_sampCube :
sampler;
@group(1) @binding(@@@@@@) var ANGLE_texture_sampCube :
texture_cube<f32>;
This CL replaces those with actual binding numbers
@group(1) @binding(0) var ANGLE_sampler_samp2D :
sampler;
@group(1) @binding(1) var ANGLE_texture_samp2D :
texture_2d<f32>;
...
Such that @binding(n*2) is the WGSL sampler variable corresponding
to the n-th GLSL sampler and @binding(n*2+1) is the WGSL texture
variable corresponding to the n-th GLSL sampler.
This CL then generates binding group layouts matching the above,
and uploads textures and configured samplers in bind groups.
This makes some of the deqp_gles2 tests 2d texture tests pass,
though some fail because they need a flipped y coordinate.
Not yet supported:
1. arrays of samplers
2. shadow samplers
3. cube textures
Bug: angleproject:389145696
Change-Id: I2ab18ae5ebb4d1289101266bd9451576aa04ce2a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6382272
Reviewed-by: Liza Burakova <liza@chromium.org>
Auto-Submit: Matthew Denton <mpdenton@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
828bec45
|
2025-04-26T16:12:56
|
|
Vulkan: Fix SPIR-V gen for constant constructors
... inside non-constant constructors of different basic type.
The SPIR-V generator proactively casts the elements of the inner
constructor to the type of the outer constructor, but it was mistakenly
using the original inner constructor's type id for the constant instead
of the cast type id.
Bug: chromium:413775106
Change-Id: I95e8b1dcc1ba36777eb4475042f0d106a6abe109
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6489041
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
555038b8
|
2025-04-23T12:47:02
|
|
Translator Fuzzer: Enable required options
Bug: chromium:409603851
Change-Id: I73067fcd3855f6cdcb6eea05b06bafa45d23fb19
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6482917
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
f355e2b3
|
2025-04-15T18:58:25
|
|
Vulkan: Remove preferDriverUniformOverSpecConst
This was practically true for every vendor on Android (where rotation
matters). For Qualcomm, it was also true due to a bug in version
checking and didn't seem to be causing any concerns. Where pre-rotation
is supported, it is better to enable this feature to avoid excessive
pipeline creation.
This change removes the feature and makes sure ANGLE always uses
uniforms for rotation instead of spec consts. While technically this
may have an adverse effect on platforms that never need pre-rotation,
the ability is retained for all vendors since pre-rotation is finding
its way into more platforms and would likely eventually be needed
everywhere anyway.
Bug: angleproject:42265878
Bug: angleproject:42262166
Change-Id: I4b64c04da46db08cfdd44b60789b66d93d8e8b17
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6459025
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: mohan maiya <m.maiya@samsung.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
5dd05578
|
2025-04-14T07:34:57
|
|
Revert "GL: Allow untranslated shaders to pass through on GLES"
This reverts commit 4e77552b86a89b449ada6d6c18f84285f5812b1d.
Reason for revert: breaks ChromeOS and fuzzers
Bug: angleproject:398857482
Original change's description:
> GL: Allow untranslated shaders to pass through on GLES
>
> Add an EGL extension EGL_ANGLE_create_context_passthrough_shaders which
> uses the NULL translator and passes the original shader to the driver.
> The parser is still used for shader reflection.
>
> Bug: angleproject:398857482
> Change-Id: I7c5fcc318c7e11931f78c08dcbf4764bf77d397d
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6297527
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Bug: angleproject:398857482, angleproject:410423936
Bug: chromium:410114655, chromium:410100607, chromium:410121218
Bug: chromium:410052365, chromium:410290507, chromium:410178288
No-Presubmit: true
Change-Id: I45b01960637a1cda05d21a7df6d07465f6a8f5e9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6448984
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
4e77552b
|
2025-02-24T18:04:32
|
|
GL: Allow untranslated shaders to pass through on GLES
Add an EGL extension EGL_ANGLE_create_context_passthrough_shaders which
uses the NULL translator and passes the original shader to the driver.
The parser is still used for shader reflection.
Bug: angleproject:398857482
Change-Id: I7c5fcc318c7e11931f78c08dcbf4764bf77d397d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6297527
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
02ae054c
|
2025-04-07T13:48:29
|
|
Translator: Fix init of inactive output variables
Bug: chromium:398401939
Change-Id: I0df494b945b8d0e805a62cf7645d06bf233f36ca
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6438495
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
d27a1fd0
|
2025-04-03T19:59:20
|
|
Compiler: Allow denorm float values in the lexer
This adds an option to preserve denorm values in the lexer,
skipping the explicit zero conversions for below range floats.
There are applications in the wild that expect to be able to
use denorm float values. They are typically immediately converted
to integer values, not used in floating point operations.
The option is only enabled for Vulkan backends.
Test: FloatLexTest, DenormFloatsToIntValues, app traces
Bug: b/406827038
Change-Id: Iab5a1a69a540b78ccbce8ea90b532d2d4976e29e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6432237
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
|
|
0e28c030
|
2025-04-02T17:26:28
|
|
ScalarizeVecAndMatConstructorArgs on WGSL shaders.
WGSL does not support mixing types in the constructors of vectors and
matrices. Use the ScalarizeVecAndMatConstructorArgs traverser to
scalarize these constructors and update it to cast to the destination
type if the inputs are not in that type already.
Bug: angleproject:395659799
Change-Id: I4c270f2b18e79393e3c187916f33ad719bc88a63
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6427067
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
fd722f9a
|
2025-03-31T23:23:26
|
|
Avoid emitting SampleCmp in discontinuous loops.
Apply fix by Mikkel Simonsen from Unity to use texture level 0 when
using textureLod with a shadow sampler inside a discontinuous loop.
Bug: angleproject:406190894
Change-Id: If02b687f15ec4c3e8bd1b8eece72098d498e2ce1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6421496
Auto-Submit: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
|
|
0d1478f3
|
2025-03-27T18:40:05
|
|
Fix dFdx() dFdy() in frag shader not work as expected
When render to FBO0, Y axis will flipping, Angle's compile module
will handle this, but only when glsl version > 300, that's a mistake
as glsl 100 also have dFdx/dFdy when have GL_OES_standard_derivatives.
Bug: angleproject:406819301
Change-Id: I656cfcfdeff1e80db374cfa083578adda6064e69
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6407233
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Neil Zhang <Neil.Zhang@arm.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
362161fa
|
2025-03-28T11:22:46
|
|
Translator: Use unsized int for swizzle components
Bug: angleproject:349994211
Change-Id: Ibee2c664f159960cf9bf860496038bbb32ae355a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6408391
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
dba77589
|
2025-03-21T14:02:29
|
|
Translator: Fix output-variable-init vs after-main declarations
Bug: chromium:400504716
Change-Id: I105180cd10dda5238c228d16c9f4e15f1bf49e77
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6383079
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d314868d
|
2025-03-21T16:13:45
|
|
Translator: prune `side_effect,noop` to `side_effect`
... if the result is unused. If `noop` includes a reference to a struct
that's entirely made of samplers, the transformation that removes
samplers from structs doesn't know what to do with the empty
expressions.
Bug: chromium:390467743
Change-Id: I62ccce6031e1bb4a0c875d0f7dce9adefb7e208d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6383081
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
00d99277
|
2025-03-19T17:22:24
|
|
[WGSL] Emit sampler types and texture lookup builtins
The split texture/sampler WGSL variables will now have the correct
types corresponding to their GLSL types.
Texture builtins are translated as faithfully as possible. There are
some issues with the translation:
1. Texture builtins using an implicit level-of-detail in a vertex
shader are supposed to sample from the base mip level. Right
now these are translated into WGSL functions that cannot be used
in a vertex shader at all.
2. Some texture builtins that take integer samplers do not have
corresponding WGSL versions, e.g. the sampling GLSL function
texture() takes integer samplers but the mostly equivalent
WGSL builtin, textureSample(), will only take float samplers.
3. A number of GLSL texture builtins are not supported in WGSL
when uses on shadow samplers, e.g. anything with a bias
parameter, an explicit LOD parameter, or explicit gradients,
Bug: angleproject:389145696
Change-Id: Idfd75721f88181db9643235b954629ac477163e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6372082
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Liza Burakova <liza@chromium.org>
|
|
0b98cf97
|
2025-03-14T16:42:32
|
|
Translator: Fix a bug with struct-with-sampler rewrite
Bug: chromium:388884060
Change-Id: I8843e0ab9698224020628bedc7a528865d91d2bf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6354207
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
00e0b31a
|
2025-03-10T15:17:50
|
|
Vulkan: Don't generate OpTypeSampledImage for sampler buffers
That is banned in SPIR-V 1.6.
Bug: angleproject:402056128
Change-Id: Ie30880628228b6949632dbe99b85b2abc9e991d3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6340667
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
0cdbc781
|
2025-03-06T11:22:18
|
|
WGSL: Output samplers, including samplers from structs
This output two WGSL variables for each GLSL sampler, including samplers
in structs. This does not output the correct types for the WGSL
variables, yet, nor does it generate texture access function calls.
It also can't deal with arrays of samplers, which are not allowed in
WGSL.
Note that WGSL does not allow structs containing samplers to be
arguments to a function, like Vulkan, nor does it allowed arrays of
samplers at all, unlike Vulkan. This deals with the former problem the
same way as Vulkan and Metal, by monomorphizing functions that take
unsupported arguments.
Bug: angleproject:389145696
Change-Id: I346688783dd2771c8fe6848b6783d948ed111783
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6253672
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
|
|
3d806ba6
|
2025-03-02T00:15:36
|
|
Translator: Split textureGather* ops
... based on whether the comp or refz arguments are present.
Bug: angleproject:349994211
Change-Id: I19e638f6cb27cdb890c5e30c0662aad30888d2da
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6313582
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
8dd4a6e8
|
2025-02-28T16:50:51
|
|
Translator: Remove rect and 2DMS* images from atomic ops
They are a relic of desktop GLSL support.
Bug: angleproject:349994211
Change-Id: I111467fea111d22e2d12003d639bec268e418b44
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6313639
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d39cabbd
|
2025-02-27T15:15:46
|
|
Translator: textureGather* always takes refZ with shadow sampler
Bug: angleproject:349994211
Change-Id: I8337b80bf1d9ecae6943c6f1432b710040081273
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6309579
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
03de46ef
|
2025-02-20T00:00:00
|
|
Metal: Remove divMatrixScalar polyfills
MSL 2.3+ natively supports
matrix by scalar division.
Bug: angleproject:372169468
Change-Id: I2055ab8cfff01d8a52ddc0de4d5c3bc115271aed
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6289047
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
3972cfa1
|
2025-02-18T19:52:06
|
|
YUV should support on all the shader stages
* The spec requires all shader stages should support YUV. Therefore,
move YUV related functions out of the switch.
* Add a new end2end test that sampling YUV in the vertex shader.
Bug: angleproject:391919465
Change-Id: I7811d419d5f1461c2499c522a902c3b2149289a1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6263325
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
c4caed5f
|
2025-02-10T06:17:01
|
|
Revert "UNREACHABLE -> __builtin_unreachable() in release clang builds"
This reverts commit 7370bb573dd8b37006d409fc8917ff49912dd75a.
Reason for revert: issue identified by fuzzer crbug.com/394980074
Original change's description:
> UNREACHABLE -> __builtin_unreachable() in release clang builds
>
> This enables compiler optimizations such as reducing the amount of
> branching, see anglebug.com/394129077#comment1
>
> Reduces .so size in an Android perf build by 0.4%. I spot checked a few
> differences and saw less branches (this will be causing a different
> behavior in UNREACHABLE branches) as well as more functions getting
> inlined (likely due to compiler heuristics due to less branches)
>
> Bug: angleproject:394129077
> Change-Id: I23411ca7a49d3daf2a0621bfcc0b2523d4db4f5a
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6231111
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Charlie Lao <cclao@google.com>
> Commit-Queue: Roman Lavrov <romanl@google.com>
Bug: angleproject:394129077
Bug: chromium:394980074
Change-Id: I7398d86c692e5c50ac1185c30e2053eb87f9bd70
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6248417
Auto-Submit: Roman Lavrov <romanl@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7370bb57
|
2025-02-04T13:19:37
|
|
UNREACHABLE -> __builtin_unreachable() in release clang builds
This enables compiler optimizations such as reducing the amount of
branching, see anglebug.com/394129077#comment1
Reduces .so size in an Android perf build by 0.4%. I spot checked a few
differences and saw less branches (this will be causing a different
behavior in UNREACHABLE branches) as well as more functions getting
inlined (likely due to compiler heuristics due to less branches)
Bug: angleproject:394129077
Change-Id: I23411ca7a49d3daf2a0621bfcc0b2523d4db4f5a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6231111
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
|
|
1161ac8e
|
2025-01-23T13:25:01
|
|
WebGPU: Implement no-op gl_PointSize
Support writing to the gl_PointSize builtin but do not pass it to the
next shader stages.
Bug: angleproject:392604862
Change-Id: I845a3edeb0ce8e7ea41a5e96e5f3b443100f2cbf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6194555
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
|
|
8ee72cc7
|
2025-01-13T13:44:31
|
|
WGSL: support matCx2 in uniforms
matCx2 in WGSL does not match std140 layout and so it needs to
be translated as array<ANGLE_wrapped_vec2, C> when in a uniform.
On use it needs to be converted to a WGSL-native matCx2.
This also includes the optimization of an array<matCx2> in a
uniform--when indexing into it, only the indexed element
will be converted to a native matCx2, instead of converting
the entire array and then indexing.
Bug: angleproject:376553328
Change-Id: I1d84471234b3d3cf4cf361ae89cb61675d5bf9a8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6157788
Reviewed-by: Liza Burakova <liza@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
0cfea380
|
2025-01-15T10:46:54
|
|
Rename sh::TSpan as general purpose angle::Span
Span abstraction is useful for making buffer manipulation more
consistent. The commit makes the Span available to all code until
std::span can be used.
Bug: angleproject:389951202
Change-Id: Id0c6b54bb6e75d3cc4e85af854d9e61b66906752
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6170997
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
65513240
|
2025-01-03T17:26:55
|
|
Fix initializing output variables
... by compiling a list of TVariables instead of names that are later
looked up. The latter results in wrong symbols being initialized when
the output variables are shadowed.
Bug: chromium:376738756
Bug: chromium:377553431
Change-Id: I76b9688c035476c547ac73cff380629161210406
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6143374
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
b1a0d60f
|
2025-01-08T15:10:41
|
|
WGSL: Fix accidentally overloaded functions
Small-stride arrays in uniforms with the same element type, but
different array sizes, would cause the WGSL generator to produce
conversion functions with the same name but different array sizes.
This CL puts the array size in the name of the function to
avoid overloading, which is unsupported in WGSL.
Bug: angleproject:376553328
Change-Id: I446e91ccb9da2872c88f1a4e05283aacc9d6f8b1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6160334
Commit-Queue: Matt Denton <mpdenton@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Matt Denton <mpdenton@google.com>
Reviewed-by: Liza Burakova <liza@chromium.org>
|
|
363f6264
|
2025-01-07T10:35:09
|
|
WGSL: unwrap single array element from uniform
...instead of unwrapping the entire array when only one element is
being accessed.
The is step #4 from the implementation plan in
https://docs.google.com/document/d/17Qku1QEbLDhvJS-JJ9lPQAbnuZtLxWhG-ha5eCUhtEY/edit?tab=t.0#bookmark=id.dt9vmixnpdvo
Bug: angleproject:376553328
Change-Id: I6c559f44b75cd1d3c4a478141c11f65a33d76bdf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6102117
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Matt Denton <mpdenton@google.com>
Reviewed-by: Matt Denton <mpdenton@google.com>
Reviewed-by: Liza Burakova <liza@chromium.org>
|
|
6f32ed6c
|
2025-01-03T23:54:22
|
|
Fix struct sampler rewrite vs comma
Bug: chromium:377614665
Change-Id: I2c0e8230e31405c9e7fd165a9fca68b7e9f31a76
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6142516
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d1496a22
|
2025-01-03T22:54:27
|
|
Produce same compile errors for op= as op
Bug: chromium:376787367
Change-Id: Ic2c1415c184c603b86876e5eb70eee602639abbf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6142515
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
53ec86ab
|
2024-12-17T14:40:31
|
|
WGSL: support small stride arrays in uniforms
WGSL requires arrays in the uniform address space to have a stride
a multiple of 16.
This CL makes WGSL translator emit wrapper structs for array element
types used in the uniform address space, when the array stride is
not a multiple of 16. The exception is for structs that aren't
an aligned size of 16n, and for any types matCx2, since they are
(or will be) handled in different ways that ensure alignment to 16.
This should leave only f32, i32, u32, and vec2.
See https://www.w3.org/TR/WGSL/#example-67da5de6 for an example
of using a wrapper struct.
This requires converting arrays with a wrapper struct element type
to arrays with an unwrapped element type when they are first used;
this can be "optimized" later for the common case of accessing a
single array element, which can then be unwrapped immediately. This
CL generates WGSL conversion functions when necessary.
After this, the only types that can't yet be used in a uniform
are matCx2 and bools.
This is #2 in
https://docs.google.com/document/d/17Qku1QEbLDhvJS-JJ9lPQAbnuZtLxWhG-ha5eCUhtEY/edit?tab=t.0#bookmark=id.rt3slgehd4te
Bug: angleproject:376553328
Change-Id: I1edfa7f481a6cbf5b595643aae8728e67bc4b770
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6092038
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Liza Burakova <liza@chromium.org>
Reviewed-by: Matt Denton <mpdenton@google.com>
Commit-Queue: Matt Denton <mpdenton@google.com>
|
|
f80d15ad
|
2025-01-03T16:19:13
|
|
Vulkan: Fix crash with array of array of samplers vs comma
Bug: chromium:385256122
Change-Id: I9b356401e7c007060e95bb95ca8269411178ce66
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6143373
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
e72cc71b
|
2024-12-13T11:59:29
|
|
Vulkan: Remove framebuffer fetch from shader if unused
Some application shaders may use `inout` variables to simplify shader
generation (presumably), but in the end don't actually ever read from
those variables.
This change tries to detect some very simple but common cases where it's
clear that the shader completely overwrites the variable without reading
from it and turns `inout` into `out`. When coherent framebuffer fetch
emulation kicks in, these shaders would no longer cause unnecessary
barriers.
Bug: angleproject:377923479
Change-Id: I0970b72f551b24409337a375cf97aa63bb511fb5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6094425
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
|
|
e82a2eab
|
2024-11-28T00:00:00
|
|
Support multisample 2D array textures on ES 3.0 contexts
Supported via OES_texture_storage_multisample_2d_array
enabled together with ANGLE_texture_multisample.
Drive-by:
Fixed exposure conditions in the OpenGL
backend to match the implementation.
Fixed: angleproject:382298321
Change-Id: I21b037aac7bebc35df267e9dd468088ebce35e71
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6075241
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
473798bf
|
2024-11-28T00:38:36
|
|
WGSL: @align appropriate struct members in uniforms.
Structs used in the uniform address space need to have certain
members aligned according to the uniform address space layout
constraints (substantially similar to std140).
This CL adds @align annotations where necessary, in structs used
in the uniform address space. Strictly speaking, it's okay to apply
@align annotations to all structs used in the WGSL program, but this
CL uses a pre-pass AST traverser to records all the structs used
in the uniform address space. This is to avoid more unreadable
generated code, and when more transformations are applied to
these structs in future CLs, less generated code overall.
After this, the only types that can't yet be used in a uniform
are matCx2, arrays with stride not divisble by 16 (except when the
array element type is a struct), and bools.
This is #1 in struct translation in
https://docs.google.com/document/d/17Qku1QEbLDhvJS-JJ9lPQAbnuZtLxWhG-ha5eCUhtEY/edit?tab=t.0#bookmark=id.rudfrn2o6jv1
Bug: angleproject:376553328
Change-Id: Ibff3414043a6ecb4a01ef8e3e71dad9c1066ddfd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6056951
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Liza Burakova <liza@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
5288ed36
|
2024-11-26T00:00:00
|
|
GL: Enable ANGLE_texture_multisample on OpenGL ES
Trivially enabled on supported device contexts.
Improved readablility of conditions
for implicit GLSL version upgrades.
Fixed: angleproject:381113379
Change-Id: I843f7119da2a3cffb255af97f654d714add9f482
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6055117
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
239ef680
|
2024-11-21T00:00:00
|
|
Metal: Support ANGLE_texture_multisample
* Added explicit multisample texture creation support
* Added support for SAMPLE_MASK frontend state
* Adjusted Metal backend caps
Fixed: angleproject:380475003
Change-Id: I90250e14da52869cb954b5a61d9c670e958a526c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6048958
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
bfa03a84
|
2024-11-19T13:32:31
|
|
Metal: Fix vec swizzles to bvecs on AMD
Constructing bvecs explicitly from swizzles would produce double
swizzles, and this would fail validation at validateNoSwizzleOfSwizzle.
Fix by folding the expression passed to coersion bvec constructor.
Cannot test more in isolation for now, since AddExplicitTypeCasts uses
Metal specific SymbolEnv.
Bug: angleproject:379758210
Change-Id: I175941747ef1c7acb8c88683c1188843a154aa8a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6034935
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
|
|
8e9dc1a6
|
2024-11-19T11:08:31
|
|
Validate anonymous struct names with namespace
Consider GLSL:
struct { vec4 e; } g;
struct sbbf { vec4 f; };
The struct name validation would fail if user chosen struct name would
clash with a symbol name that ANGLE internally gave to an anonymous
struct.
Fix by importing Name abstraction from MSL backend. A symbol name is
a pair (namespace, string).
Move operator<<(std::ostream &os, const ImmutableString &str)
to sh namespace because that is more natural for operator overloading
name resolution. MSVC works with this.
Bug: angleproject:379758201
Change-Id: Icc9b02aa8cb532e1d925e2fba4c45468f01b9144
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6035029
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
|
|
8409b41e
|
2024-11-20T14:38:30
|
|
Report error on unsized interface block array
GLSL of forms:
uniform S{...} a[];
in R{...} b[];
out Q{...} c[];
Should produce error unless the shader is tesselation or geometry
shader.
Fix the errors for VS and FS. GS and TS likely need more work.
Bug: angleproject:379996129
Change-Id: Ib31c9a81717a8cd1c984eb4ce2e993d563bb3c4f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6038333
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
|
|
ec773865
|
2024-11-19T14:46:29
|
|
Qualifier in const for sampler2D fails validation
The commit 039660a0757e8e5b661c1850747b688b6642f56d failed to special
cased "const in".
Fix by special casing also on EvqParamConst.
Bug: angleproject:379762012
Change-Id: Ife6966ea536972874645ae22b504712249817638
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6035505
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|