|
d193d51b
|
2024-06-17T22:46:08
|
|
Replace issue ids post migration to new issue tracker
This change replaces anglebug.com/NNNN links.
Bug: None
Change-Id: I8ac3aec8d2a8a844b3d7b99fc0a6b2be8da31761
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5637912
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
5137eb99
|
2024-05-27T01:38:23
|
|
Translator: Fix internal inconsistency with output init
When creating "zero" nodes, this transformation directly takes the
TType's from the variables being initialized. This means that
qualifiers such as invariant, as well as any associations with interface
blocks are retained in these constructors, which is not valid.
This can trip up the SPIR-V generator which does not expect constructors
to be qualified as such (i.e. assumes the TypeSpec to be the default).
Bug: angleproject:342866364
Bug: angleproject:342866374
Bug: angleproject:343011429
Change-Id: If5c38e18ce977bd0eb1a48e41c59f6199eb7d2e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5570155
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7586f8c8
|
2023-02-20T22:10:55
|
|
Translator: Validate correct op usage in nodes
Bug: angleproject:2733
Change-Id: Id555398cd6633ce38e1d4d900c7b739fd9990ad1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4274045
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
98c2e169
|
2022-05-20T16:17:49
|
|
Vulkan: Reduce pre-rotation spec const to bool
The specialization constant now only dictates whether x and y should be
swapped. The complete 8 possible states of rotation and y-flip are
achieved by using this swap in combination with a driver uniform for x
and y flip.
Swapping is still a specialization constant to avoid degrading
performance of dFdx/dFdy which otherwise would need both to be evaluated
instead of one. On platforms which don't support pre-rotation, the
specialization constant will never change and driver uniforms entirely
govern y-flip. On platforms that do support pre-rotation, only two
variations of the pipeline are needed.
Bug: angleproject:7366
Change-Id: I73f84e89fa9349d2098fa5b21573aee57d93a30c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3663151
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
039660a0
|
2022-04-14T13:32:33
|
|
Translator: Drop const from opaque parameter types
`const` is ineffective on opaque types like sampler2D. That qualifier
is now dropped as it was tripping SPIR-V gen up.
New validation is added to make sure such parameters are not
reintroduced.
Test credit of Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Test: angle_end2end_tests --gtest_filter="GLSLTest.ConstSamplerParameter*/*_Vulkan"
Bug: angleproject:7201
Bug: angleproject:7205
Change-Id: I310a47a8eb162ddafb2ab44682520f546f8a5512
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3587345
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
8dc9e83e
|
2022-02-16T21:48:53
|
|
Translator: Fix RunAtTheEndOfShader w.r.t discard
RunAtTheEndOfShader wrapped main() if it ended in discard. However, it
didn't account for the fact that the discard instruction could be
wrapped in a block. This change makes RunAtTheEndOfShader more
conservative w.r.t discard and has it wrap main() on any encounter of
discard.
The change additionally adds AST validation to ensure transformations
don't generate dead code after branches.
Test credit to Cody Northrop.
Test: GLSLTest_ES3.ConstantConditionGuardingDiscard
Test: GLSLTest_ES3.NestedUnconditionalDiscards
Bug: angleproject:7033
Change-Id: Ie9d5210a5cfbb13449720a8a3f44666df9443d98
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3471014
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
665ddccd
|
2021-12-09T23:06:39
|
|
Vulkan: Emulate dithering
Dithering in OpenGL is vaguely defined, to the extent that no dithering
is also a valid dithering algorithm. Dithering is enabled by default,
but emulating it has a non-negligible cost. Similarly to some other
GLES drivers, ANGLE enables dithering only on low-bit formats where
visual banding is particularly common; namely RGBA4444, RGBA5551 and
RGB565.
Dithering is emulated in the fragment shader and is controlled by a spec
constant. Every 2 bits of the spec constant correspond to one
attachment, with the value indicating:
- 00: No dithering
- 01: Dither for RGBA4444
- 10: Dither for RGBA5551
- 11: Dither for RGB565
The translator appends code to the shader that, based on the format
specified by the specialization constant, adds dithering to each color
attachment output. A 2x2 Bayer matrix is used for dithering, indexed by
gl_FragCoord.xy % 2.
Bug: angleproject:6755
Change-Id: Ib45da5938e299b6626bff921119d63e7357dd353
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3374261
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
46149c0e
|
2021-09-17T15:38:47
|
|
Translator: Fix pruning functions that declare a struct
When pruning unused functions, the entire declaration of the function is
removed. If the function declares a struct as part of its return value,
the declaration of that struct was lost. This change makes sure that
declaration survives the pruning. For example:
struct S { vec4 v; } unused_func() { ... }
is now replaced with:
struct S { vec4 v; };
This change also makes struct usage validation more stringent.
Bug: chromium:1248753
Change-Id: Idd9a87fd2e785135775cfea62995fd33adaf3c09
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3169691
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
800e82c6
|
2021-08-23T11:05:23
|
|
Translator: Validate precisions
When declaring a variable, a struct field, function parameter etc,
there's a precision necessarily applied to the entity being declared.
AST Validation is added to enforce this. Intermediate nodes derive
their precision from these entities automatically.
Consistency of intermediate nodes is not validated. This is because AST
transformations replace a node with a transformed one, and that may not
have the same precision. Take the following code:
mediump float x = ...;
mediump float y = ...;
... x + y ...
and assume is transformed as such:
highp float driver_uniform;
... (x * driver_uniform) + y ...
The addition was originally done in mediump, but would seemingly need to
be done in highp after transformation. There are a number of options
here:
- Make sure that when nodes are replaced, the precision is unaffected.
This can be intrusive, requiring temp variables.
- Bubble up the new precision
- Accept the discrepancy
ANGLE opts for the last option, which actually respects the original
shader's intended precision for operations, even if some transformation
needs to temporarily evaluate an expression at a higher precision.
Bug: angleproject:4889
Bug: angleproject:6132
Change-Id: Ibcde3a230de159157783b1c6d5ef1cd63ceb4d8f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3114027
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
798c5200
|
2021-07-31T22:17:48
|
|
Translator: Make precise-ness a property of AST nodes
Instead of creating a "set of precise nodes", the nodes themselves are
marked precise. This change is preparation for another change that
overhauls precision propagation through the nodes, and which would also
be storing the promoted precision in the nodes.
Bug: angleproject:4889
Change-Id: Ieec8864be5cd2e95ed6fb4d90b367946d9f33fa1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3065569
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
1ce78397
|
2021-07-30T16:51:45
|
|
Remove support for WEBGL_debug_shader_precision
This extension was rejected, and the implementation was hacky. This
clean up is part of an ongoing work to improve precision handling.
Bug: angleproject:6059
Change-Id: If08581ec6f19cf1698ffa3dd6d248dc5e68a1d31
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3064303
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ebe943e2
|
2021-07-29T11:19:33
|
|
Vulkan: SPIR-V Gen: Fix gl_Clip/CullDistance
These built-ins can be redeclared in the shader. The translator took
these redeclarations (and gl_LastFragData) as UserDefined symbols.
There were a number of hacks such as in name generation and
CollectVariables, to special-case these redeclarations.
This change instead makes sure that these variables continue to be
considered built-ins with the appropriate qualifiers. A number of fixes
are made accordingly:
- Hacks are removed.
- In fragment shaders, ANGLEClipDistance was initialized with
gl_ClipDistance for further use by the shader. The code generation
however mistakenly produced `gl_ClipDistance[0] =
ANGLEClipDistance[0];`, which caused compilation failures by glslang,
but passed the tests accidentally because they expected link failures
(see next item).
- CollectVariables is fixed to correctly collect gl_Clip/CullDistance
in fragment shaders; previously they were collected as output
varyings, and therefore the aforementioned link error was not produced
in the tests after the compilation error was fixed.
Additional fixes:
- The transformation of gl_Clip/CullDistance was always ever done on one
of them due to misplaced breaks in the loop that detected their
presence.
- The transformation of gl_CullDistance was skipped when it was not
redeclared.
Validation is added to make sure these built-ins always have the correct
qualifier even when redeclared. SPIR-V gen support for these variables
have been fixed as well.
Bug: angleproject:4889
Change-Id: Ic8bf2c508357035cb937ef41a28ae22ffc533ebe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3059921
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7c6da493
|
2021-07-26T21:24:25
|
|
Translator: Make sure built-in variables are consistent
Some transformations left the tree in an inconsistent state, for example
if it used gl_SampleMask from ES3.1+OES_sample_variables and the
transformation added a usage of gl_SampleMask from ES3.2. The offending
transformations are fixed and AST validation is improved to catch such
errors.
Bug: angleproject:4889
Change-Id: I9d9ea5bb43a9408dd4c6dc3e89ec20d60dfeff73
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3054613
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
7f199d75
|
2021-07-20T00:11:23
|
|
Vulkan: SPIR-V Gen: Support geometry shaders
Geometry shader built-ins are implemented. A bug in
DeclarePerVertexBlocks is fixed w.r.t to gl_PerVertex arrays and a new
AST validation option is added to catch that sort of error.
Bug: angleproject:4889
Change-Id: I40b2929e450eac8ae840bbf1a1583e6c4c047c88
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3041623
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
0e1c90cf
|
2021-07-21T10:24:26
|
|
Translator: Validate function parameter qualifiers
This change cleans up a confusion in EvqConst and EvqConstReadOnly,
where the former was frequently used instead of the latter for function
parameters.
The change makes the following renames to make the intent of the
relevant qualifiers clearer:
EvqIn -> EvqParamIn
EvqOut -> EvqParamOut
EvqInOut -> EvqParamInOut
EvqConstReadOnly -> EvqParamConst
Bug: angleproject:4889
Change-Id: Idedd32c08a91de069b91b1657d6b783dddece04a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3041622
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a3df80ea
|
2021-07-19T17:15:13
|
|
Translator: Validate AST consistency w.r.t function calls
This ensures that tree transformations don't create invalid function
calls. Additionally, it's validated that no raw function calls are
issued, as that's deprecated.
Bug: angleproject:4889
Change-Id: Iabbb493dcc0a5654bbb5f930e402bf3492c89979
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3040119
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
|
|
8b869a95
|
2021-06-13T01:09:27
|
|
Translator: Generate Ops for all built-in functions
EOpCallBuiltInFunction is removed in this change, as well as the
"op": "auto" property in builtin_function_declarations.txt. Instead,
gen_builtin_symbols.py automatically generates Ops for every built-in
function and generates the TOperator enum accordingly.
This simplifies SPIR-V code generation by allowing switches to be used
on operators instead of string comparisons.
Bug: angleproject:4589
Bug: angleproject:4889
Change-Id: Ia351524400b0e12a10a5572e27e9b88c6ec2e61c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2958869
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
31641b8e
|
2021-06-05T02:17:47
|
|
Declare specialization constants in the AST
A new qualifier (EvqSpecConst) is added so that specialization constants
can be declared in tree.
This enables TVariable references to specialization constants to be
validated, which were in fact invalid as every reference declared a new
variable. That is fixed.
Bug: angleproject:4889
Change-Id: I1711e41cbc5a1260843d2d004d3568bdae11e963
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2941451
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
daeac238
|
2021-05-08T22:09:38
|
|
Translator: Ensure structs and blocks are uniquely defined
A new AST validation is added to ensure that the same TStructure or
TInterfaceBlock is not redundantly defined. This helps with SPIR-V
generation by allowing the id to be used as key in a hash map that looks
up the corresponding SPIR-V type id.
A bug is fixed where the Vulkan driver uniform declaration created two
identical declarations for ANGLEDepthRangeParams.
A number of other bugs are also fixed in this change, where if a
variable declaration is eliminated (for example due to constant folding,
or inactive interface variable removal) and it contained a struct
specifier, the struct declaration was also removed. OutputGLSLBase had
a hack where structs were declared on first encounter, which was
incorrect as the scope of the declaration could change. Those bugs are
fixed and this hack is removed.
Bug: angleproject:2733
Bug: angleproject:4889
Bug: angleproject:5936
Change-Id: I8e13748c0bf552ae8b052249282769a1f0775603
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2881942
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
58eabfd7
|
2021-04-08T23:57:04
|
|
Translator: Validate consistent variable references
Some transformations change variable declarations. This validation
ensures that all references to said variables are appropriately replaced
as well.
Bug: angleproject:2733
Change-Id: I6c2873968eeed4cba66e70069f84eb69a1f77074
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2818140
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
a7b60f13
|
2021-04-08T23:13:21
|
|
Translator: Validate multi-declarations are separated
Many transformations only look at the first variable in a
TIntermDeclaration. This change validates that once the
SeparateDeclarations transformation has been run, multi-declarations are
not reintroduced.
Bug: angleproject:2733
Change-Id: If5f96689cbdd28817c479dd7c495b91535f87199
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2815565
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
91d469aa
|
2018-08-27T10:47:25
|
|
Initial support for compiler AST validation
This is to be able to catch issues introduced through AST manipulation
earlier than shader compilation time, improving debuggability.
Bug: angleproject:2733
Change-Id: Ic57bc72f2ab438e60f32553d602074f3d72cc4f5
Reviewed-on: https://chromium-review.googlesource.com/c/1199922
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|