|
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>
|
|
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>
|
|
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>
|
|
e670fc72
|
2021-01-18T15:51:42
|
|
Implement shader compiler changes for Tessellation.
Numerous rule changes to support validating Tessellation Control and
Evaluation shaders. New per-patch inputs and output variable support.
Includes a new traverser step that validates barrier function calls.
Functionality changes upcoming in http://crrev.com/c/2568234
Bug: angleproject:3572
Change-Id: If8da1c21d30efa12c60ed0d6c3f8cf0b27e4c86f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633936
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
|
|
173f1c94
|
2020-12-03T13:53:16
|
|
Translator: Collect gl_in as a varying.
This unifies the variable handling for IO blocks. Previously the
gl_in block we treated as an "in block" similar to an interface block.
Bug: angleproject:5423
Change-Id: Idf2db4c209055fa9ffca567dab39c89464eba156
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2571966
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
33a00efd
|
2019-11-27T09:21:45
|
|
Add Compute Shared Memory Size Validation
Add tracking of shared memory declarations in compute shaders.
Test:
angle_deqp_gles31_tests --gtest_filter=dEQP.GLES31/functional_debug_negative_coverage_callbacks_compute_exceed_shared_memory_size_limit
Bug: 4173
Change-Id: If2a86d467a82f73fa5b2ee0ced752701acfe1872
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1934653
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
90a58622
|
2019-09-04T15:39:58
|
|
Refactor ShaderVariable to Remove Specializations
The following structs are being refactored and moved into the parent
struct ShaderVariable:
VariableWithLocation
Uniform
Attribute
OutputVariable
InterfaceBlockField
Varying
Bug: angleproject:3899
Test: CQ
Change-Id: I389eb3ab4ed44a360e09fca75ecc78d64a277f83
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1785877
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
9d737966
|
2019-08-14T12:25:12
|
|
Standardize copyright notices to project style
For all "ANGLE Project" copyrights, standardize to the format specified
by the style guide. Changes:
- "Copyright (c)" and "Copyright(c)" changed to just "Copyright".
- Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1").
- Fixed a small number of files that had no copyright date using the
initial commit year from the version control history.
- Fixed one instance of copyright being "The ANGLE Project" rather than
"The ANGLE Project Authors"
These changes are applied both to the copyright of source file, and
where applicable to copyright statements that are generated by
templates.
BUG=angleproject:3811
Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b980c563
|
2018-11-27T11:34:27
|
|
Reformat all cpp and h files.
This applies git cl format --full to all ANGLE sources.
Bug: angleproject:2986
Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f
Reviewed-on: https://chromium-review.googlesource.com/c/1351367
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
822a84b1
|
2018-03-23T12:30:18
|
|
Get builtin symbol info from the node in CollectVariables
Since we now have a TVariable pointer in TIntermSymbol, we don't need
to look up variables from the symbol table.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: Id09610ccec5898eb56dcc5e9112e173edcf7ac97
Reviewed-on: https://chromium-review.googlesource.com/977828
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
d27f5c8d
|
2017-08-23T09:38:08
|
|
ES31: Implement GL_OES_geometry_shader built-ins in GLSL compiler
This patch intends to implement all built-in constants, variables and
functions defined in OpenGL ES 3.1 extension GL_OES_geometry_shader
in ANGLE GLSL compiler.
1. Add all built-in constants defined in GL_OES_geometry_shader.
2. Add built-in functions EmitVertex() and EndPrimitive() required
in Geometry Shader.
3. Add built-in variables gl_PrimitiveIDIn and gl_InvocationID to
Geometry Shader.
4. Add built-in variables gl_PrimitiveID and gl_Layer to both
Geometry Shader and Fragment Shader when GL_OES_geometry_shader
is enabled.
BUG=angleproject:1941
TEST=angle_unittests
Change-Id: I92821553ed0efee2ccb77fead6e065e7799819d0
Reviewed-on: https://chromium-review.googlesource.com/627670
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
d8105a03
|
2017-08-08T09:54:36
|
|
ES31: Implement gl_in in Geometry Shader
This patch intends to implement geometry shader built-in interface
block instance gl_in defined in GL_OES_geometry_shader.
1. Add the definition of gl_in and its interface block gl_PerVertex
into the symbol table.
2. Support gl_Position as a member of gl_in.
3. Set the array size of gl_in when a valid input primitive type is
known.
4. Add check that it should be a compile error to index gl_in or
call length() on gl_in without a valid input primitive declaration.
This patch also adds unit tests to cover all these new features.
BUG=angleproject:1941
TEST=angle_unittests
Change-Id: I8da20c943b29c9ce904834625b396aab6302e1e1
Reviewed-on: https://chromium-review.googlesource.com/605059
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
78ed6cd9
|
2017-08-09T16:19:00
|
|
Rename VariableInfo files to CollectVariables
Files that only have a single function should be named consistently
with the function. Unnecessary include in CallDAG.h is removed.
BUG=angleproject:2068
TEST=angle_unittests
Change-Id: I27d55a766b9eb66fcfd1e0a2341a2843bb9dc5bb
Reviewed-on: https://chromium-review.googlesource.com/608368
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|