|
6f80f0f0
|
2022-08-06T02:29:19
|
|
Translator: Clean up the compile flag passing interface
Historically, compile flags were sent to the translator as a bitmask.
Recently, we were getting close to running out of bits. Additionally,
direct-to-metal work had started to introduce constants to be passed to
the translator, which were misplaced in ShBuiltInResources and Caps.
Recent work on Pixel Local Storage adds even more constants, aggravating
the situation.
In this change, the interface to passing compile flags is reworked. A
struct is passed (instead of a bitmask) that has one bit for each flag.
This can be indefinitely extended. Additionally, the constants needed
by metal and PLS are also placed in this struct. In turn, the backends
can set these options directly, and don't have to hack them into Caps to
further get hacked into ShBuiltInResources.
Bug: angleproject:7559
Change-Id: If93f1e1b8818ad3a0ac708ab04ab93b4b397d114
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3812562
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7fe0694c
|
2022-07-14T16:42:30
|
|
Vulkan: Use push constants for driver uniforms
* Updated the driver uniforms so they would be defined as push
constants in SPIR-V. Their data would be updated via
pushConstants() when handling the driver uniform dirty bits.
* Updated TOutputVulkanGLSL to be able to generate the push
constants as required.
* When handling the driver uniform dirty bits, we no longer
allocate a buffer.
* Removed the driver uniform descriptor set from the pipeline
layout.
* Removed the binding-related functions and flags for the driver
uniforms.
* In invalidateGraphicsDescriptorSet(), DIRTY_BIT_DESCRIPTOR_SETS
is used instead of DIRTY_BIT_DRIVER_UNIFORMS_BINDING. (Same for
invalidateComputeDescriptorSet())
* DIRTY_BIT_DRIVER_UNIFORMS_BINDING is replaced with
DIRTY_BIT_DRIVER_UNIFORMS in other places.
* Removed mDriverUniform and DriverUniformsDescriptorSet from
ContextVk.
* Added mSupportedVulkanShaderStageMask to RendererVk, which is used
in creating the pipeline layout and updating the push constants.
* Added a TODO note for driverUniformsDescriptorSetIndex.
Bug: angleproject:6858
Change-Id: I91037d378528962a816b12ff3f21249ee17b7652
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3782570
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
061188a7
|
2021-08-04T10:07:47
|
|
Translator: General clean up
General clean up done as part of other changes, split to simplify
review.
Bug: angleproject:4889
Bug: angleproject:6132
Change-Id: Iade9954d187a759be9edd0e3754be007f4133c56
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3071598
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>
|
|
af1eed2e
|
2021-06-10T01:55:59
|
|
Vulkan: Generate gl_FragColor/Data declarations in AST
gl_FragColor and gl_FragData are not available in Vulkan. Prior to this
change, their declaration as webgl_FragColor and webgl_FragData was done
in text. This change implements an AST transformation that declares a
normal fragment output variable and replaces all references to these
built-ins with those variables.
Bug: angleproject:4889
Change-Id: If224e089dec25e4aa580beb135e1be2890de7887
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2953042
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
1b680b77
|
2021-06-02T22:04:45
|
|
Reland "Make SH_CLAMP_INDIRECT_ARRAY_BOUNDS do proper AST transformation"
This is a reland of a474fd7de769ae817db83490d410510cdbed75b2
The integer clamp used in this transformation is not available in es100
shaders, and float clamp is used instead.
Original change's description:
> Make SH_CLAMP_INDIRECT_ARRAY_BOUNDS do proper AST transformation
>
> This translator flag adds a clamp to non-literal indices to arrays. Two
> strategies were provisioned, using the clamp intrinsic or a hand-written
> function. The latter is ununsed in angle, chromium, firefox and
> webkit, so this change removes this option and uses the clamp intrinsic
> unconditionally.
>
> The clamp itself was added at output generation time with special flags
> set on the index node. This is changed such that a proper AST
> transformation is done and no-special handling would be necessary.
>
> Bug: angleproject:4361
> Bug: angleproject:4889
> Change-Id: Ieccfd2c1c347563fb5282e9fa66d39304e62f2ca
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2935041
> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: angleproject:4361
Bug: angleproject:4889
Change-Id: I9397ec7e6bdfb706c2a891b33fd3b2b79e883ccc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2940902
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
|
|
10f15011
|
2021-06-03T19:22:53
|
|
Revert "Make SH_CLAMP_INDIRECT_ARRAY_BOUNDS do proper AST transformation"
This reverts commit a474fd7de769ae817db83490d410510cdbed75b2.
Reason for revert: breaks GLES2ConformTest, see roll into Chromium:
https://chromium-review.googlesource.com/c/chromium/src/+/2935093
Original change's description:
> Make SH_CLAMP_INDIRECT_ARRAY_BOUNDS do proper AST transformation
>
> This translator flag adds a clamp to non-literal indices to arrays. Two
> strategies were provisioned, using the clamp intrinsic or a hand-written
> function. The latter is ununsed in angle, chromium, firefox and
> webkit, so this change removes this option and uses the clamp intrinsic
> unconditionally.
>
> The clamp itself was added at output generation time with special flags
> set on the index node. This is changed such that a proper AST
> transformation is done and no-special handling would be necessary.
>
> Bug: angleproject:4361
> Bug: angleproject:4889
> Change-Id: Ieccfd2c1c347563fb5282e9fa66d39304e62f2ca
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2935041
> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: angleproject:4361
Bug: angleproject:4889
Change-Id: I911cfe0199b04dbc3d6d4265775b6c2de00a9777
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2937024
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
a474fd7d
|
2021-06-02T22:04:45
|
|
Make SH_CLAMP_INDIRECT_ARRAY_BOUNDS do proper AST transformation
This translator flag adds a clamp to non-literal indices to arrays. Two
strategies were provisioned, using the clamp intrinsic or a hand-written
function. The latter is ununsed in angle, chromium, firefox and
webkit, so this change removes this option and uses the clamp intrinsic
unconditionally.
The clamp itself was added at output generation time with special flags
set on the index node. This is changed such that a proper AST
transformation is done and no-special handling would be necessary.
Bug: angleproject:4361
Bug: angleproject:4889
Change-Id: Ieccfd2c1c347563fb5282e9fa66d39304e62f2ca
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2935041
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9bc837f6
|
2021-04-07T15:24:12
|
|
Vulkan: Generate SPIR-V directly from the translator; Part 1
This is the first change in a series to generate SPIR-V directly from
the translator's AST, instead of the generating text GLSL and feeding it
to glslang.
This change implements the majority of the work needed to map AST types
to SPIR-V types, and declare types and interface variables in SPIR-V.
Additionally, it lays the infrastructure to conditionally enabling this
path in end2end tests.
No tests are currently enabled as the change doesn't actually generate
code for function bodies yet.
Bug: angleproject:4889
Change-Id: Iacb28b6907fd48c50e4cc5a0e7ad72f6eed241d4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2889603
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@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>
|
|
2f737c25
|
2021-02-25T16:55:14
|
|
Translator: Rename GLSL to SPIR-V in Vulkan and Metal output
Preparation for actual SPIR-V output instead of GLSL.
Bug: angleproject:4889
Change-Id: Ic279b23d3a817bd5dca66a844905378207afdbac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2721194
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
550f2a3e
|
2021-02-24T09:49:42
|
|
Vulkan: Shader support for EXT_shader_framebuffer_fetch_non_coherent
Translator can accept gl_LastFragData and 'inout' variable to gain
access to framebuffer attachment data. The Vulkan translator replaces
it with the SubpassInput type variable. Note that this works only for
the noncoherent version of the extension.
Bug: angleproject:5454
Test: *EXTShaderFramebufferFetchNoncoherent*.*
Change-Id: I392f84ee3ad3eb9fbd09d0b7ff83731a9a3f33f6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598060
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
8797714c
|
2020-12-01T11:39:25
|
|
Vulkan: Support OES_shader_io_blocks
Enables OES/EXT_shader_io_blocks extensions in Vulkan backends.
With shader I/O blocks, the varyings can now be an array of struct (the
block itself) of struct (nested in the block).
This change is missing a number of features. In particular, if the
shader I/O block has a location decoration in the middle of the block,
that is not handled yet.
Based on changes from m.maiya@samsung.com and jmadill@chromium.org.
Bug: angleproject:3580
Tests: dEQP-GLES31.functional.shaders.linkage.es31.io_block.*
dEQP-GLES31.functional.separate_shader.validation.es31.io_blocks.*
dEQP-GLES31.functional.program_interface_query.program_input.*
dEQP-GLES31.functional.program_interface_query.program_output.*
Change-Id: I593840475d2365ff6c9ce7b2290f5ee462a30dfb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2567645
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
1a5c7a16
|
2020-02-25T12:02:31
|
|
Reland "Vulkan:Include precision qualifier in GLSL"
Currently still ignoring precision qualifiers for Vulkan shaders by
default, but have added feature "enablePrecisionQualifiers" that can be
enabled in order to include precision qualifiers.
With this initial implementation, it's possible to get precision
qualifier mis-matches in the generated GLSL 4.50. According to the
spec this is allowed. From GLSLangSpec 4.50 section 4.7 "Precision and
Precision Qualifiers":
For the purposes of determining if an output from one shader stage
matches an input of the next stage, the precision qualifier need not
match.
However, when converted to SPIR-V and run through the shader validation
any mismatches will cause shader validation errors. Initially just
ignoring those errors with this commit.
Bug: angleproject:3078
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057749
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
Change-Id: Ieecca604bb2c834c9b1c2bcab85279d1f8755dfa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2086280
|
|
a60e4973
|
2020-02-27T20:11:20
|
|
Revert "Vulkan:Include precision qualifier in GLSL"
This reverts commit 93e72f5f0eb80b89334ea8fe577b32901a00b5fb.
Reason for revert: This is having a negative impact on gfxbench
Manhattan 3.1 tests (20-30%) with only a minor improvement (~4%) in TRex offscreen. Pulling out for now and need to re-evaluate best
solution here.
Original change's description:
> Vulkan:Include precision qualifier in GLSL
>
> With this initial implementation, it's possible to get precision
> qualifier mis-matches in the generated GLSL 4.50. According to the
> spec this is allowed. From GLSLangSpec 4.50 section 4.7 "Precision and
> Precision Qualifiers":
>
> For the purposes of determining if an output from one shader stage
> matches an input of the next stage, the precision qualifier need not
> match.
>
> However, when converted to SPIR-V and run through the shader validation
> any mismatches will cause shader validation errors. Initially just
> ignoring those errors with this commit.
>
> Bug: angleproject:3078
> Change-Id: Ia2b04f90f0a7b6b1302c1b1b3e32bcfd8db9ed49
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057749
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Tobin Ehlis <tobine@google.com>
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Commit-Queue: Tobin Ehlis <tobine@google.com>
TBR=tobine@google.com,timvp@google.com,jmadill@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: angleproject:3078
Change-Id: I84984e2a963bde573f0f1de585001ceb83623c89
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2079334
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
93e72f5f
|
2020-02-25T12:02:31
|
|
Vulkan:Include precision qualifier in GLSL
With this initial implementation, it's possible to get precision
qualifier mis-matches in the generated GLSL 4.50. According to the
spec this is allowed. From GLSLangSpec 4.50 section 4.7 "Precision and
Precision Qualifiers":
For the purposes of determining if an output from one shader stage
matches an input of the next stage, the precision qualifier need not
match.
However, when converted to SPIR-V and run through the shader validation
any mismatches will cause shader validation errors. Initially just
ignoring those errors with this commit.
Bug: angleproject:3078
Change-Id: Ia2b04f90f0a7b6b1302c1b1b3e32bcfd8db9ed49
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2057749
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
|
|
f1f082e1
|
2020-01-17T14:53:38
|
|
Vulkan: Set varying location & xfb decorations in SPIR-V
The shader translator outputs arbitrary location indices. Once compiled
by glslang, the SPIR-V transformer modifies these decorations. If the
transform feedback extension is used, it will also add the relevant
decorations to the varyings that are captured.
Bug: angleproject:3394
Change-Id: I5ecafd0536408612a5d4b920dbabbfabe650657c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2008468
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
5ca050d1
|
2020-01-20T14:59:41
|
|
Vulkan: Set fragment output locations in SPIR-V
The shader translator outputs arbitrary location indices for fragment
outputs. Once compiled by glslang, the SPIR-V transformer modifies
these decorations.
Bug: angleproject:3394
Change-Id: Ib9d8336bccc392e789e4d93031fdcce9c466b7a6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2011214
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
bef8ca7d
|
2020-01-20T14:19:05
|
|
Vulkan: Set vertex attribute locations in SPIR-V
The shader translator outputs arbitrary location indices for vertex
attributes. Once compiled by glslang, the SPIR-V transformer modifies
these decorations.
Bug: angleproject:3394
Change-Id: I88453b44e3a8770f51e79228148233ff308f1885
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2011212
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
71e6afb1
|
2020-01-14T14:12:31
|
|
Vulkan: Set set/binding in SPIR-V
This change introduces a SPIR-V transformer that modifies shader
interface variable decorations directly in SPIR-V instead of
manipulating the input GLSL. Currently, descriptor set and binding
indices are set by the transformer.
The shader translator outputs arbitrary set and binding indices. Once
compiled by glslang, the SPIR-V transformer modifies these decorations.
The ultimate goal is to be able to modify the SPIR-V again when program
pipeline objects decide a different set/binding is necessary.
Bug: angleproject:3394
Change-Id: If358265a72bf1fe9f5676562b39a632cb2e05dc4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2001477
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
8dfe472c
|
2020-01-13T15:20:51
|
|
Vulkan: Output qualifiers in the translator
With the exception of varyings, every other qualifier can be directly
output by the translator. This simplifies and optimizes glslang
wrapper.
Varyings' in/out qualifiers are still placed in @@ QUALIFIER macros so
glslang wrapper can remove them, if inactive, not by commenting them
out, but by turning them into global variables.
Bug: angleproject:3394
Change-Id: I9a3d18df2cfd36a38308bf8f71ac12f1e1513ece
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1998839
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
feb3b6cc
|
2020-01-13T22:58:59
|
|
Vulkan: Remove row->col major shader transformation
This was done based on the incorrect assumption that Vulkan GLSL doesn't
allow layout qualifiers on interface block fields. This was due to
glslang compile failures in some shaders that included mixed row- and
column-major fields in interface blocks.
However, the failures were only in the case the interface block is
inactive, in which case glslang wrapper previously replaced the
layout/qualifier of the interface block with |struct|, which left the
shader with an unused struct definition with fields that have layout
qualifiers; an invalid shader.
The change introduced in
https://chromium-review.googlesource.com/c/angle/angle/+/1951523
removes inactive shader interface declarations. The above scenario thus
never occurs, rendering the row- to column-major transformation
unnecessary.
Bug: angleproject:3443
Change-Id: Ice34a0fc6e047b79a4d44f04b730ec59bdfafe33
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1961098
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
07f0f019
|
2019-12-19T14:47:46
|
|
Translator: Memory qualifiers on SSBO fields
These were not output prior to this CL. Of these qualifiers, readonly
and writeonly are unnecessary as ANGLE already does the appropriate
validation, but the rest (coherent, volatile, restrict) are necessary,
even though the tests pass on the bots by coincidence of driver
behavior/test simplicity.
Bug: angleproject:3602
Change-Id: Ie75fee0f004944b50ef21124ba25c4315e082b85
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1976499
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b8e056dd
|
2019-12-11T15:02:43
|
|
Vulkan: Have the translator output in/out qualifiers
Currently, when assigning varying locations, we assign in/out qualifiers
based on whether the varying name is present between different shader
stages.
This is broken for separate shader objects as there is possibly no pair
of shaders to be able to tell which is input and which is output (by
trying to find the same varying in a stage before or after the shader).
Bug: angleproject:3571
Change-Id: Id928a3eaa16e917c81bae0b3414c41842eb2b664
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1961993
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
a48f95ab
|
2019-10-14T14:49:49
|
|
Move Vulkan GlslangWrapper code to a shared location.
Metal backend will reuse Vulkan's GlslangWrapper code.
The Metal backend will use this code to translate glsl to spirv then
cross compile to Metal Shading Language using spirv-cross.
So the source code of GlslangWrapper should be moved outside vulkan folder.
Bug: angleproject:2634
Change-Id: I208062daf0d77756c9d32cfdab925b7dfdf83e05
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1858042
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
912e52d8
|
2019-08-23T00:25:09
|
|
Vulkan: Storage image support
Image bindings are placed after atomic counters in the "resources"
descriptor set.
There are two issues yet to be addressed:
- GL can create a 2D (array) view of a 3D image, but this is not allowed
in Vulkan. If this cannot be made possible, emulation needs to be
done.
https://github.com/KhronosGroup/Vulkan-Docs/issues/1033
- GL can create an image view of a texture with a different format and
have the data reinterpreted. This is not currently done.
Bug: angleproject:3563
Change-Id: I95c4d92c50bb033212a9a67f3f2d6f97c074c7bf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1767366
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
cd31f286
|
2019-06-25T14:22:41
|
|
Implement Draw base vertex and base instance functions
This patch implements functionality of glDrawArraysInstancedBaseInstanceANGLE,
glDrawElementsInstancedBaseVertexBaseInstanceANGLE,
glMultiDrawArraysInstancedBaseInstanceANGLE,
and glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE
Workaround for OpenGL driver on Mac:
gl_VertexID on Mac with AMD GPU doesn't include baseVertex value.
So replace gl_VertexID with (gl_VertexID + angle_BaseVertex) if any.
Workaround for Vulkan GLSL:
gl_InstanceIndex on Vulkan includes baseInstance. So replace
gl_InstanceIndex with (gl_InstanceIndex - angle_BaseInstance) when
angle_BaseInstance is declared.
Bug: chromium:891861, angleproject:3402
Change-Id: Ia1d94b5d4d7da7e635468c05c962c4f7eb1b1919
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1750126
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d6c7fec1
|
2019-08-12T16:46:57
|
|
Vulkan: Support mixed column/row-major buffer fields
Adds comprehensive tests for mixed column/row-major interface blocks,
which flush out various bugs in different OpenGL drivers too.
Bug: angleproject:3443
Change-Id: Ie88cca743373891bbb49d9f564f30407475e07fb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1749334
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
b82d8633
|
2019-07-15T11:23:08
|
|
Vulkan: Atomic counter buffer support
Vulkan doesn't treat atomic counters especially, and they are emulated
with atomic access to storage buffers.
A single atomic counter buffer binding per pipeline is supported. All
the atomic counters identify an offset within this buffer. The shader
is modified to include a storage buffer definition with
`uint counters[];` as the only field.
A compiler pass replaces atomic counter definitions with variables that
hold the corresponding offset parameter, as well as changing atomic_uint
types to just uint (as the offset). Where an atomic counter variable is
used, it is replaced with the offset variable (plus the array index, if
array). At the same time, built-in `atomicCounter*` functions are
replaced with a corresponding `atomic*` function and
`memoryBarrierAtomicCounter` is replaced with `memoryBarrierBuffer`.
Bug: angleproject:3566
Change-Id: Iefb3d47de6a5cb3072bfa0cb94a46ac6a886d369
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1704635
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
5dfad811
|
2019-07-02T13:23:27
|
|
Vulkan: GLSL output support for SSBO memory qualifiers
Makes the QUALIFIER macro take arguments similar to LAYOUT, to allow
passing in tokens to be conditionally output after the storage
qualifier.
Bug: angleproject:3561
Change-Id: I4368eba2c34c1398f81d33cd23c9e56557fd4ed8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1685876
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
c75d6dc8
|
2019-06-05T16:12:01
|
|
Vulkan: Add support for gl_VertexID/gl_InstanceID
Adds support for GLES 3.0 feature which adds gl_VertexID and
gl_InstanceID built-in variables to vertex shader.
Bug: angleproject:3221
Change-Id: I372d7ac34bed376b506e327725f0eca2513852fa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1646735
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
9d519ab1
|
2019-05-09T23:09:46
|
|
Vulkan: Rework layout block storage conversion
Previously, a pass over the shader was made, converting shared and
packed interface blocks with block storage to std140. This resulted in
link success between interface blocks with different storage as they
were all translated to std140.
With this change, this pass is removed. The link step proceeds with the
block storage specifiers as seen by GLES, and only upon Vulkan GLSL
shader generation "shared" and "packed" are converted to std140.
Bug: angleproject:3199
Change-Id: I069415ab9c9b4e1034bc00f64cd2d9e2d73f5956
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1605262
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
5517ce95
|
2019-05-07T00:27:06
|
|
Vulkan: fix qualifier erase for unused vertex attributes
Bug: angleproject:3219
Change-Id: I8f8f5572eed5126ab03702953883b313f022a264
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1598548
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
216f73d0
|
2019-04-12T13:32:30
|
|
Vulkan: add uniform buffer object support
Support for layout qualifiers in interface blocks are added. All
interface blocks are adjusted to either be in std140 or std430.
In the Vulkan backend, a new descriptor set is added for UBOs. A dirty
bit is added for UBO updating and pipeline layouts and descriptor
bindings are updated.
Bug: angleproject:3199, angleproject:3220
Change-Id: I271fc34ac2e1e8b76dee75e54a7cff0fe15fe4ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1565061
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
62742f9e
|
2019-05-01T16:14:50
|
|
Vulkan: Optimize shader source macro replacement
@@ LAYOUT-xx @@ and @@ QUALIFIER-xx @@ macros are generated by the
compiler when emitting Vulkan GLSL. These macros are replaced at link
time in the Vulkan backend.
Previously, this replacement was done through calls to
angle::ReplaceSubstring, reiterating over the whole source on every
replacement. This CL does a prepass on the input source and chunks it
up in blocks. Search is optimized as only blocks of a certain type are
string-compared (skipping large chunks of shader text). Replace is
optimized as the whole shader is not shifted left or right on every
replacement.
Additionally, this CL modifies the layout macro to the following format:
@@ LAYOUT-xx(extra, args) @@
This is used in a follow up CL to have the compiler provide additional
layout qualifiers.
Bug: angleproject:3220
Change-Id: I6367e781c3304d5f2e0a406e4fb4e6feb4c45f1d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1592070
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
e25ff9d8
|
2019-05-01T00:02:05
|
|
Vulkan: Fix qualifiers for varyings
`out` variables in the vertex shader and `in` variables in the fragment
shader were not decorated with `layout(location=?)` as they should
according to the Vulkan GLSL spec. This change makes sure these
decorations are present regardless of whether the compiler sees these
variables as EvqVaryingIn/Out or EvqVertexOut/FragmentIn.
Bug: angleproject:3412
Change-Id: I66473e876cb989a60b0c6d6a5850a8b2c763d8e2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1590694
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
366df2b2
|
2019-01-18T15:40:34
|
|
Vulkan: Support external texture binding points.
BUG=angleproject:2668
BUG=angleproject:3023
Change-Id: Idab0c4cbe1c7ed203ace50f1a6701dba11a40242
Reviewed-on: https://chromium-review.googlesource.com/c/1422548
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@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>
|
|
c0bb36cb
|
2018-07-10T11:10:31
|
|
Vulkan: Add driver uniforms to shader.
Bug: angleproject:2717
Change-Id: I542f3b0f2de21857d7fea0267f07d2d0eec78a8c
Reviewed-on: https://chromium-review.googlesource.com/1131567
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Luc Ferron <lucferron@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
3ec304db
|
2018-04-18T14:14:25
|
|
Vulkan: Support struct initializers in shaders
Also adds a new test in GLSLTest to validate the initialization of
a struct on the same line as its declaration.
Bug: angleproject:2459
Change-Id: Ib37e20378f8ec76541db26392663bcba03390756
Reviewed-on: https://chromium-review.googlesource.com/1017340
Commit-Queue: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
f1d3c20c
|
2018-04-16T07:44:27
|
|
Vulkan: Fix the issue with unused attributes / varyings
When an attribute, a uniform or a varying isn't used, we now remove
their layout and in/out qualifiers so that the shader can still refer
to these var names.
Bug: angleproject:2456
Change-Id: I5f1241d91bd46f663750adfab2562ef87ce69ae5
Reviewed-on: https://chromium-review.googlesource.com/1014009
Commit-Queue: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
d91c3793
|
2018-04-06T09:36:36
|
|
Vulkan: Implement support for structs in uniforms
- Also enables 174 additional dEQP tests.
Bug: angleproject:2446
Change-Id: I07cce46815d2f7a80fd48e7fd9407f7d528b397f
Reviewed-on: https://chromium-review.googlesource.com/998406
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Luc Ferron <lucferron@chromium.org>
|
|
8b5e8fdb
|
2017-12-15T14:59:15
|
|
Replace remaining usage of TName with TSymbol
TName used to contain just a subset of the information stored in
TSymbol. It makes more sense to use TSymbol directly instead of
converting it to TName.
This also improves type safety a bit by making some functions only
take in TVariable or TFunction instead of the more generic TName.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: Icb46923c25d33ebbbbc06ddc487da25957dda771
Reviewed-on: https://chromium-review.googlesource.com/829143
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
4dd167fb
|
2017-11-09T13:08:31
|
|
Vulkan: Assign locations to varyings.
These were actually always required, but only was caught by the newer
versions of the SPIR-V toolchain.
BUG=angleproject:2237
Change-Id: I43fef179e8792e46a602b39a6decafcab03b19df
Reviewed-on: https://chromium-review.googlesource.com/760638
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
de03e003
|
2017-10-21T14:04:20
|
|
Vulkan: Add shader handling for textures.
BUG=angleproject:2167
Change-Id: I33940288331a23b940753795e5e43b8cabcb87f5
Reviewed-on: https://chromium-review.googlesource.com/732189
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
6276b922
|
2017-09-25T02:35:57
|
|
Vulkan: Implement basic uniform shader parsing.
This is a first step at implementing uniforms with descriptor sets.
It does not actually bind uniforms and upload data, but it does
implement uniform shader parsing. Uniforms are gathered into a single
uniform block which is bound to set 0, with binding 0 for vertex
uniforms and binding 1 for fragment uniforms.
Also adds a ReplaceSubstring helper to string_utils.
Also removes the precision writing from OutputVulkanGLSL since this
was generating warnings with glslang.
BUG=angleproject:2167
Change-Id: I9ec8351ec1973e583100f99292b0080ee968067b
Reviewed-on: https://chromium-review.googlesource.com/699938
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
2a9e107c
|
2017-09-22T11:31:57
|
|
Vulkan: Support multiple vertex outputs.
This is a bit of a hack, similar to how D3D11 works. We need to write
output locations in the GLSL shader before we send them to glslang,
so we wait until the link call, then string-replace some hard-coded
identifeir code to the attribute location determined by ANGLE.
This CL also fills in some of the vertex format conversion tables in
formatutilsvk.cpp.
BUG=angleproject:2167
Change-Id: I2424d0d990bdbcd831a4dd130e61e87d8f8f479f
Reviewed-on: https://chromium-review.googlesource.com/677555
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
|
|
a5e693af
|
2017-07-13T16:07:26
|
|
Make unique id counter a member of TSymbolTable
This makes unique id counting thread-safe.
BUG=angleproject:624
TEST=angle_unittests
Change-Id: Ie0f2c7e574470b39750d37d2181c790bc874b275
Reviewed-on: https://chromium-review.googlesource.com/570419
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
e794cd86
|
2017-01-13T17:29:51
|
|
Vulkan: Implement new GLSL translator back-end.
The Vulkan GLSL translator back-end will handle validating and
translating our WebGL/ESSL shaders into Vulkan-specific GLSL.
glslang (the Vulkan one) accepts both GLSL and GLSL ES shaders
as inputs, and both the desktop and ESSL back-ends give
incompleteness warnings when used. For now, use the desktop GL
450 as a target for Vulkan GLSL.
The Vulkan-specific changes are currently only to add locations
to every vertex input and fragment output.
BUG=angleproject:1575
Change-Id: I7c3f32f522e9d18e5f8618eb7927336bf4fbdcf2
Reviewed-on: https://chromium-review.googlesource.com/412266
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|