|
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>
|
|
47c66901
|
2024-10-21T12:47:22
|
|
Vulkan: Set gl_Layer to 0 if the framebuffer is not layered
Bug: angleproject:372390039
Change-Id: I29067c9488e06f6dd2e90f207fecb843267fb77c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5949263
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7bc4b7e3
|
2023-03-27T00:00:00
|
|
Metal: Implement OES_sample_variables
New ESSL built-ins are mapped to their Metal
counterparts and tweaked to follow OpenGL ES
semantics when needed.
Fixed A2C interaction with sample coverage
by emulating the former on non-Apple GPUs.
Bug: angleproject:8097
Fixed: angleproject:5087
Change-Id: I5d28a941af5cbc14743a3930731529f11f55febd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4404896
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Kyle Piddington <kpiddington@apple.com>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
8050079c
|
2022-08-08T16:35:10
|
|
Vulkan: Remove basicGLLineRasterization
* Removed basicGLLineRasterization from the ANGLE features.
* Removed "viewport" from the extended driver uniform classes.
Bug: angleproject:2830
Bug: angleproject:7558
Change-Id: I289b1e2b536a6bd0c1ab24844835221e617a296d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3818165
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ce3c0fe9
|
2022-06-06T12:09:45
|
|
Vulkan: Make depth-correction uniform controlled
This change makes sure SPIR-V transformations are not required for depth
correction, having the number of potential pipelines.
Bug: angleproject:5881
Change-Id: If3f66b34bdd1127ae588cbc822ea7cf01fa8621f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3691801
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
2df17a12
|
2022-05-25T16:18:37
|
|
Vulkan: Pack driver uniforms
Previously 5 vec4s were used for driver uniforms + 2 vec4s if
specialization constants couldn't be supported.
The driver uniforms are rearranged and packed such that only 2 vec4s are
normally used, which include fallback for specialization constants as
well. In the future, most of the specialization constants may turn into
uniforms, and this change prepares for that.
Additional uniforms are used (3 vec4s) only if common extensions are
missing; transform feedback and bresenham lines.
This change makes it more practical for driver uniforms to be turned
into push constants. Additionally, these uniforms could potentially be
loaded and cached at the beginning of the shader for more efficient
memory access.
On Pixel6, with this change, the traces show no difference in wall time.
On most traces, CPU time shows up to ~7% improvement.
Bug: angleproject:7366
Change-Id: I0f47f863955af06a19c69d1f1d7c45b97d95476e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3668151
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
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>
|
|
c5271e8e
|
2022-04-04T23:28:35
|
|
Vulkan: Emulate GL_KHR_blend_equation_advanced
Based on a change by Brandon Schade <b.schade@samsung.com>
In the translator, when advanced blend is enabled, an input attachment
is added. Based on the listed advanced blend equations, emulation code
is added that performs those equations' functions. The blend equation
itself is passed through a driver uniform.
Note that the advanced blend extension only allows a single output to
use advanced blend, and that should be at location 0.
In the Vulkan backend, when advanced blend is used, the driver uniform
to select the equation is updated and normal blending is disabled.
Bug: angleproject:3586
Change-Id: Icc42e8be238d34fca149087eb9cfe616a7643a6b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3575738
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
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>
|
|
095d7c0a
|
2022-01-06T01:20:53
|
|
Translator: Clean up spec const / driver uniform types
Bug: angleproject:6755
Change-Id: I8fb1557a5e29fcc28d5cb2f3aaa2c4a14b72583d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3369125
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
4114fe23
|
2021-11-20T22:05:56
|
|
Vulkan: Simplify transform feedback emulation logic
In [1], the program is transformed to not output transform feedback
logic when transform feedback is inactive. With that change, it's no
longer necessary to dedicate a driver uniform to indicate if transform
feedback is active.
[1]: https://chromium-review.googlesource.com/c/angle/angle/+/3294661
Bug: chromium:1209285
Change-Id: Ica725d0da08e2676f442fe6307962d367b443535
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3294702
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b3cbfd55
|
2021-07-07T12:31:57
|
|
Fix multiple end2end crashes in direct-to-MSL compiler.
This set of changes:
- Adds a single place (CompilerMtl::useDirectToMSLCompiler) where the
direct-to-MSL compiler can be enabled, still at compile time rather
than run time. It is still disabled by default.
- Initializes MTLWaitableCompileEventImpl::mShader, without which all
shader compiles crash.
- Fixes a mismatch of the ANGLERasterizerDisabled variable name in
the generated MSL.
- Removes the transform feedback bindings as an argument to the
vertex shader's main0(). Transform feedback support needs to be
reimplemented in this compiler backend.
- Added an option to the DriverUniform class to emit as either an
interface block or a struct. The direct-to-MSL backend assumes it
is a struct.
- Disable variable reference validation when referencing either
sample mask or rasterizer discard functionality in the shader.
- Disable struct usage validation when inserting references to
ANGLE_TextureEnv. This occurs during pipeline rewriting and it's
infeasible to disable it at that point, so disable it during
pipeline rewriting - which means it's disabled for all shaders.
- For angle_end2end_tests, disable the file API hooking which
disables the Metal shader cache. This speeds up the tests
significantly - by roughly a factor of 5.
With these changes, several hundred angle_end2end_tests run without
any assertion failures, though still with many test failures. The next
crash is in:
GLSLTest.NamelessScopedStructs/ES2_Metal
and will likely require a larger bug fix, or more changes to be
upstreamed from WebKit's repository.
Bug: angleproject:5505
Change-Id: Ia1ea9a13867f00035d4aeccf907fd032255588e3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3010486
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
|
|
d7aa0130
|
2021-04-26T16:56:15
|
|
Upstream Apple's direct-to-Metal backend: compile translator.
This change is meant to merge the translator changes from Apple's
direct-to-Metal backend. Taken from Kyle Piddington's CL:
https://chromium-review.googlesource.com/c/angle/angle/+/2857366/
The goal of this CL is to merge the translator code in a state that
compiles, but not to switch the Metal backend over to use this
translator backend yet.
Bug: angleproject:5505
Change-Id: I68a6354604498cd5fd1eb96c13fc56f3b38f2bd0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2897536
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
|
|
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>
|
|
77637f2d
|
2021-02-19T15:18:52
|
|
Vulkan: Generate xfb support code in SPIR-V for emulation path
This change moves the code generation at link time from source code to
SPIR-V. As a result, transform feedback extension and emulation paths
are more similarly handled before SPIR-V transformation (they both store
information identically in the ShaderInterfaceVariableInfoMap).
This change gets rid of the @@ XFB-OUT @@ marker. With no source code
generation at link time, shader compilation can be moved to
glCompileShader time.
Bug: angleproject:4888
Change-Id: I8cdb89c22b57ce48cf5d226b8e41622d9d550d46
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2713269
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
dfd9bdfd
|
2021-01-16T11:32:30
|
|
Reland "Vulkan: Generate gl_Position pre-rotation in SPIR-V"
This reverts commit 3d39b7c5eab88c420d982155ffbb6181c678ceea.
Reason for revert: Fixed interaction with the
`forceDriverUniformOverSpecConst` workaround.
Original change's description:
> Revert "Vulkan: Generate gl_Position pre-rotation in SPIR-V"
>
> This reverts commit 0f86b196ffaffeeee3460e3188f20a7ac120796d.
>
> Reason for revert:
> Breaks pre-rotation for all apps, so they are displayed in portrait instead of landscape.
>
> Original change's description:
> > Vulkan: Generate gl_Position pre-rotation in SPIR-V
> >
> > Instead of having the translator output pre-rotation code in the vertex
> > stage based on a specialization constant, this change makes the SPIR-V
> > transformer perform pre-rotation of gl_Position on the last geometry
> > stage.
> >
> > An alternative solution would be to generate pre-rotation code in the
> > translator in every geometry stage, each controlled by a separate
> > specialization constant. This change avoids unnecessary modifications
> > to earlier stages. The generated shaders are also smaller, as they
> > don't contain a mat2[8] pre-rotation constant matrix. The SPIR-V
> > transformer knows the pre-rotation at transformation time, so it can
> > simply use swizzles to achieve the same results.
> >
> > This also ties in with upcoming changes which move gl_Position.z
> > correction to the last geometry shader stage, which is trivially done
> > piggy-backing on the infrastructure in this change.
> >
> > Bug: angleproject:5478
> > Change-Id: I9d5d9d19f3ccda665f5504368ce5ddfa5f383faf
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598584
> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> > Reviewed-by: Charlie Lao <cclao@google.com>
> > Reviewed-by: Jamie Madill <jmadill@chromium.org>
>
> TBR=syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
>
> Change-Id: I81f237fa6b10c7d59831363bee8999e7ad2f09be
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: angleproject:5478
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633694
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Commit-Queue: Tim Van Patten <timvp@google.com>
TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
Bug: angleproject:5478
Change-Id: I7c5eaeef03d9520abd36a1c4a766b6abbf4fdb45
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633709
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
3d39b7c5
|
2021-01-16T00:15:14
|
|
Revert "Vulkan: Generate gl_Position pre-rotation in SPIR-V"
This reverts commit 0f86b196ffaffeeee3460e3188f20a7ac120796d.
Reason for revert:
Breaks pre-rotation for all apps, so they are displayed in portrait instead of landscape.
Original change's description:
> Vulkan: Generate gl_Position pre-rotation in SPIR-V
>
> Instead of having the translator output pre-rotation code in the vertex
> stage based on a specialization constant, this change makes the SPIR-V
> transformer perform pre-rotation of gl_Position on the last geometry
> stage.
>
> An alternative solution would be to generate pre-rotation code in the
> translator in every geometry stage, each controlled by a separate
> specialization constant. This change avoids unnecessary modifications
> to earlier stages. The generated shaders are also smaller, as they
> don't contain a mat2[8] pre-rotation constant matrix. The SPIR-V
> transformer knows the pre-rotation at transformation time, so it can
> simply use swizzles to achieve the same results.
>
> This also ties in with upcoming changes which move gl_Position.z
> correction to the last geometry shader stage, which is trivially done
> piggy-backing on the infrastructure in this change.
>
> Bug: angleproject:5478
> Change-Id: I9d5d9d19f3ccda665f5504368ce5ddfa5f383faf
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598584
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Charlie Lao <cclao@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
TBR=syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
Change-Id: I81f237fa6b10c7d59831363bee8999e7ad2f09be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:5478
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633694
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
0f86b196
|
2020-12-21T22:54:05
|
|
Vulkan: Generate gl_Position pre-rotation in SPIR-V
Instead of having the translator output pre-rotation code in the vertex
stage based on a specialization constant, this change makes the SPIR-V
transformer perform pre-rotation of gl_Position on the last geometry
stage.
An alternative solution would be to generate pre-rotation code in the
translator in every geometry stage, each controlled by a separate
specialization constant. This change avoids unnecessary modifications
to earlier stages. The generated shaders are also smaller, as they
don't contain a mat2[8] pre-rotation constant matrix. The SPIR-V
transformer knows the pre-rotation at transformation time, so it can
simply use swizzles to achieve the same results.
This also ties in with upcoming changes which move gl_Position.z
correction to the last geometry shader stage, which is trivially done
piggy-backing on the infrastructure in this change.
Bug: angleproject:5478
Change-Id: I9d5d9d19f3ccda665f5504368ce5ddfa5f383faf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598584
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
e2a8a69a
|
2021-01-04T23:52:02
|
|
Vulkan: Move xfb emulation offset calculation to translator
A new function is added by the translator to calculate the transform
feedback offsets in the emulation path. This function makes the
generated code for transform feedback smaller.
Bug: angleproject:3606
Change-Id: I01460f907e20e2887cb720bddad96697fdcb0cf3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2607492
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
64508f44
|
2020-12-12T18:00:10
|
|
Vulkan: Reduce driver uniform data to minimum if specConst is used
If specialization constant is used, driver uniform data structure should
be reduced to minimum to increase cache locality.
Bug: b/175479076
Change-Id: I1fc50666542c6763c60bfe011cde5bc77ccc08e1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2588549
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
8a401051
|
2020-11-19T07:58:05
|
|
Vulkan: Support OES_sample_variables extension
Enable OES_sample_variables extension on Vulkan backend.
Add support for built-in variables, uniform state and constants
- gl_SampleId, gl_SamplePosition, gl_SampleMask,
gl_SampleMaskIn
- gl_NumSamples
- gl_MaxSamples
Bug: angleproject:3588
Tests: dEQP-GLES31.functional.shaders.sample_variables.*
KHR-GLES31.core.sample_variables.*
Change-Id: Idf37c7b4ccb0331dbda7acd6389ff4e1022ba959
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2477907
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
995493cc
|
2020-11-18T20:33:33
|
|
Revert "Vulkan: Remove rotation related data from driver uniform"
This reverts commit fd97c3343e9ff23677124b7528ec945bca65796a.
Reason for revert: The specialization constant for rotation causes
performance regression with older qualcomm driver. We need to keep the
driver uniform code path for the older driver.
Original change's description:
> Vulkan: Remove rotation related data from driver uniform
>
> Rotation is now handled in the shader compiler with specialization
> constant, it should be removed from driver uniforms. Since Metal is
> using the flipXY, flipXY/negFlipXY are still kept in the shader side
> implementation, but have moved to TranslatorMetal in this CL.
>
> Bug: b/171750979
> Change-Id: Ie8d15ef227cb52a6e19e4319ecc9f09bda42e667
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2519863
> Reviewed-by: Ian Elliott <ianelliott@google.com>
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Charlie Lao <cclao@google.com>
TBR=ianelliott@google.com,timvp@google.com,jmadill@chromium.org,cclao@google.com
Bug: b/171750979
Change-Id: Iff9cffb28851ade1d9c5cd23fde73910a19867ce
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2547808
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
fd97c334
|
2020-11-12T11:05:40
|
|
Vulkan: Remove rotation related data from driver uniform
Rotation is now handled in the shader compiler with specialization
constant, it should be removed from driver uniforms. Since Metal is
using the flipXY, flipXY/negFlipXY are still kept in the shader side
implementation, but have moved to TranslatorMetal in this CL.
Bug: b/171750979
Change-Id: Ie8d15ef227cb52a6e19e4319ecc9f09bda42e667
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2519863
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
3f18ad09
|
2020-11-11T14:12:18
|
|
Vulkan: Factor out DriverUniform code to tree_utils/DriverUniform.cpp
The driver uniform code is used by various tree_ops functions. But all
driver uniform code are defined and implemented in the
TranslatorVulkan.cpp file. There is dependency rule that tree_ops code
can not call into vulkan specific function. Right now we are working
around this problem by always having TranslatorVulkan creates uniform
and pass it down to tree_ops. This creates inefficiency for cases that
dFdy/dFdx where we don't know if we will need the driver uniform or not,
until we walk the tree and see the dFdx node. This CL refactors driver
uniform code into its own file and class under tree_utils so that
everybody can use. Mean time we can also make it much easier for metal
to expand it to have its own uniform structure.
Bug: b/173047182
Change-Id: I06bd9a005ccd6dc0a21321a3010dda1eab9d6fdb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2533443
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|