Граф коммитов

351 Коммитов

Автор SHA1 Сообщение Дата
Chris Dalton 4a636cdd41 Require all PLS formats to consume exactly 4 bytes of storage
D3D 11.0 UAVs only support R32_FLOAT, R32_UINT, R32_SINT formats.

EXT_shader_pixel_local_storage explicitly states that all PLS variables
consume exactly 4 bytes.

ESSL images can only have both read and write access if their format is
r32f, r32i, r32ui. (We were able to circumvent this via aliasing, but it
was a huge source of bugs.)

There is a large precedent for only supporting 4 bytes of storage in the
capabilities we use for PLS, so this CL removes support for all PLS
storage formats that are not 4 bytes. It also implements an "R32" mode
for PLS, that does manual packing and unpacking of r32* image formats.
If the application wants larger formats, it can always define multiple
PLS planes and piece them together.

Next up we ought to be able to support rg16* types with more
packing/unpacking.

With aliasing gone, and with a bit of tweaking, the PLS tests now pass
on the Pixel 4 GLES bot.

Bug: angleproject:7279
Bug: angleproject:7388
Bug: angleproject:7524
Bug: angleproject:7527
Change-Id: I6b8f62c2428ade6cb5413e33360d734e55dda0eb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3782579
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app>
2022-08-11 18:05:32 +00:00
Chris Dalton 7c6a5459d5 Rename ShFragmentSynchronizationType::None -> NoSynchronization
Use a less generic name. X11.h contains:

    #define None 0L /* universal null resource or null atom */

Bug: angleproject:7279
Change-Id: I7d245b9f771211dea151bfc12363a03374264ac4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3824717
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2022-08-10 17:27:03 +00:00
Shahbaz Youssefi 493b5aff70 Vulkan: Workaround ARM bug with stencil write mask
Bug: angleproject:7556
Change-Id: I0aa17c178071cc15d8ee15f700b0c4932819c72a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3821367
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2022-08-10 16:02:25 +00:00
Shahbaz Youssefi 6f80f0f037 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>
2022-08-09 00:04:02 +00:00
Chris Dalton 861149c7ac Make PLS coherent on desktop OpenGL
Implements ANGLE_shader_pixel_local_storage_coherent using fragment
shader synchronization extensions:

  NV_fragment_shader_interlock
  INTEL_fragment_shader_ordering
  ARB_fragment_shader_interlock

With these extensions combined, we get coherency all 3 big desktop
vendors: NVIDIA, Intel, and AMD.

Bug: angleproject:7279
Change-Id: Ie20b251fb772898e89994b799640f1f2806581eb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3773990
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2022-08-04 14:04:26 +00:00
Lingfeng Yang 3ccaddf925 Vulkan: EXT_YUV_target: layout(yuv) support
This CL adds support for layout(yuv) in the shader, via a new
decoration.

The SPIRV decoration enum number is WIP and depends on final spec.

The decoration is only active if enabled via a flag in ShaderLang, which
will be connected with the feature supports_yuv_target in a future CL.

Bug: b/223456677
Change-Id: I29a724e689d1336a3e42c83d7afa944a11e07353
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3765890
Auto-Submit: Lingfeng Yang <lfy@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Lingfeng Yang <lfy@google.com>
2022-07-29 01:56:31 +00:00
Chris Dalton 15cc001307 Add a GL_ANGLE_shader_pixel_local_storage extension
Plumbs through "GL_ANGLE_shader_pixel_local_storage" and
"GL_ANGLE_shader_pixel_local_storage_coherent" extension strings
advertised by ANGLE and stubs out an initial spec document. This change
doesn't add any new procedures or shader constructs, but it does allow
the PLS tests to start checking for the real extension strings and
requiring the GL_ANGLE_shader_pixel_local_storage extension.

Bug: angleproject:7279
Change-Id: I36877fe4117185a2121f803288123cd69a447cf3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3739590
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app>
2022-07-15 20:39:03 +00:00
Mohan Maiya 9070e279a8 Vulkan: Handle platforms that have imprecise float division issues
Even when the dividend and divisor have the same value
some platforms do not return 1.0f. We need to emit sepcial
division code on such platforms.

Bug: angleproject:3586
Tests: KHR-GLES31.core.blend_equation_advanced.blend*HSL*
Change-Id: Ibb81f57c959ae2c8edb6d361bf6241c019dfb988
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3738439
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2022-07-05 19:12:13 +00:00
Amirali Abdolrashidi 3b988fef30 Vulkan: Remove enableLineRasterEmulation
* Removed the Bresenham line raster emulation specialization
constant, along with related variables and functions.

Bug: angleproject:7366
Change-Id: If17c8ce9b459ad801bae8e887e5674bd9a3ff2bf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3680860
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
2022-06-07 16:21:28 +00:00
Shahbaz Youssefi ce3c0fe901 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>
2022-06-07 03:13:47 +00:00
Shahbaz Youssefi 23f213d136 Vulkan: Make drawable size uniform
As a specialization constant, it's impossible to predict the value the
drawable size may take, which in turn makes it impossible to warm up the
Vulkan pipeline cache at link time.

Bug: angleproject:7366
Change-Id: Ia3d1860a4fcb8e3078fdcb8d02a2e0cd173ea028
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3671976
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2022-05-30 15:12:52 +00:00
Shahbaz Youssefi 2df17a1273 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>
2022-05-27 17:32:30 +00:00
Shahbaz Youssefi 98c2e169c1 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>
2022-05-27 17:15:50 +00:00
Amirali Abdolrashidi fea195678e Vulkan: Remove removeEarlyFragmentTestsOpt flag
* Removed removeEarlyFragmentTestsOptimization and the related
SPIRV transformation and variables.
* Removed mUsesEarlyFragmentTestsOptimization.
* Removed SH_EARLY_FRAGMENT_TESTS_OPTIMIZATION.
* Merged updateUsesEarlyFragmentTestsOptimization() into
updateFragmentInoutRange().

Bug: angleproject:7347
Change-Id: I7299bd4e8ab5363e5cf06eb48419d4f469106e12
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3648217
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
2022-05-25 18:42:58 +00:00
Shahbaz Youssefi 5113ae8ef0 Vulkan: Explicitly enable per-sample shading if `sample` used
The Vulkan spec is not explicit about the `Sample` decoration implicitly
enabling per-sample shading.  While this is being corrected in the spec,
the ARM Vulkan driver does not have this implicit behavior.

A workaround is added such that the usage of the `sample` qualifier is
reported, and used to explicitly enable per-sample shading through the
API.

Bug: angleproject:6876
Change-Id: Idb8345aacdcfa45cb37fefcd30aa5405168d21e3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3615738
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2022-05-03 03:37:33 +00:00
Shahbaz Youssefi 3b65b80379 Vulkan: Work around Qualcomm imprecision with dithering
On qualcomm, sometimes the output is ceil()ed instead of round()ed.
With ditering emulation affecting values, some dEQP tests fail due to
the excessive change in value when dithering bumps the value slightly
over to the next quantum.

In this change, a workaround is added to round() the value before
outputting it.

Bug: angleproject:6953
Change-Id: Iae7df5ca20055b4db3185c6153f3c0bf4ba07f68
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3611064
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2022-04-27 19:47:13 +00:00
Shahbaz Youssefi c5271e8e69 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>
2022-04-13 19:02:22 +00:00
Shahbaz Youssefi 1e773db907 Vulkan: Shader support for KHR_blend_equation_advanced
Translator can accept the layout qualifiers for the advanced blend
equation.  No emulation code is currently generated, and ANGLE will
initially rely on the corresponding Vulkan extension.

Based on change by Brandon Schade <b.schade@samsung.com>

Bug: angleproject:3586
Test: angle_unittests --gtest_filter=*KHRBlendEquationAdvanced*
Change-Id: I3b728c5f144386d7030bbbb301ddb07daa1492b9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3481309
Reviewed-by: Brandon Schade <b.schade@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2022-02-23 20:16:50 +00:00
Brandon Schade 38fada3510 Vulkan: Add support for OES_primitive_bounding_box
Add OES version of the primitive bound box extension

Bug: angleproject:3576
Test: dEQP-GLES31.functional.primitive_bounding_box.*
Change-Id: Ie44d952992a68dfffd5c124dda8dd11069f0c1e1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3425086
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Brandon Schade <b.schade@samsung.com>
2022-02-01 19:26:04 +00:00
Shahbaz Youssefi 665ddccd88 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>
2022-01-31 17:30:33 +00:00
John Cunningham 45237a047d Metal: Fix undefined behavior of depth write
Writing to an unbound depth attachment is undefined behavior in Metal.
Fix this by emitting a function constant to guard depth buffer use
in fragment shaders.

Bug: angleproject:6865
Change-Id: Id7c10d0aeb349aacfe09c397bc292a71199ab50a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3380304
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
2022-01-26 23:52:34 +00:00
Brandon Schade 7dda50fc00 Add frontend for ANDROID_extension_pack_es31a
- Add entry to registry_xml file
- Add handling in the DirectiveHandler

Bug: angleproject:3608
Change-Id: I1cc32a4a97fd9974f65786a9a972b4b541abf658
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3388405
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Brandon Schade <b.schade@samsung.com>
2022-01-18 22:26:47 +00:00
Yuly Novikov f64f9546ae Reland "Decouple gl_BaseVertex/gl_BaseInstance uniforms"
This reverts commit 10e5f34d14.

Reason for revert: exonerated from flaky crash suspect

Original change's description:
> Revert "Decouple gl_BaseVertex/gl_BaseInstance uniforms"
>
> This reverts commit 36bf1ebe5e.
>
> Reason for revert: suspect causing flaky crashes
>
> Bug: angleproject:6763
>
> Original change's description:
> > Decouple gl_BaseVertex/gl_BaseInstance uniforms
> >
> > These are builtin uniforms removed in
> > https://github.com/KhronosGroup/WebGL/pull/3278
> >
> > Decouple them from the original ANGLE_base_vertex_base_instance
> > extension.
> >
> > Make a new ANGLE_base_vertex_base_instance_shader_builtin
> > extension for these builtin uniforms.
> >
> > Bug: angleproject:3402
> > Change-Id: I77b93917976ce435db9c578c0ade37bff18a42b0
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3290304
> > Commit-Queue: Shrek Shao <shrekshao@google.com>
> > Reviewed-by: Geoff Lang <geofflang@chromium.org>
> > Reviewed-by: Kenneth Russell <kbr@chromium.org>
>
> Bug: angleproject:3402
> Change-Id: I75830baa14cf4e7c53750fd14ff76501145b4823
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3315610
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
> Reviewed-by: Kenneth Russell <kbr@chromium.org>
> Commit-Queue: Shrek Shao <shrekshao@google.com>

Bug: angleproject:6763
Bug: angleproject:3402
Change-Id: Ie436dc5d55364e464897d407a53b793941cd5d0b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3321703
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2021-12-07 21:17:07 +00:00
Shrek Shao 10e5f34d14 Revert "Decouple gl_BaseVertex/gl_BaseInstance uniforms"
This reverts commit 36bf1ebe5e.

Reason for revert: suspect causing flaky crashes

Bug: angleproject:6763

Original change's description:
> Decouple gl_BaseVertex/gl_BaseInstance uniforms
>
> These are builtin uniforms removed in
> https://github.com/KhronosGroup/WebGL/pull/3278
>
> Decouple them from the original ANGLE_base_vertex_base_instance
> extension.
>
> Make a new ANGLE_base_vertex_base_instance_shader_builtin
> extension for these builtin uniforms.
>
> Bug: angleproject:3402
> Change-Id: I77b93917976ce435db9c578c0ade37bff18a42b0
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3290304
> Commit-Queue: Shrek Shao <shrekshao@google.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Reviewed-by: Kenneth Russell <kbr@chromium.org>

Bug: angleproject:3402
Change-Id: I75830baa14cf4e7c53750fd14ff76501145b4823
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3315610
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2021-12-04 00:59:38 +00:00
Shrek Shao 36bf1ebe5e Decouple gl_BaseVertex/gl_BaseInstance uniforms
These are builtin uniforms removed in
https://github.com/KhronosGroup/WebGL/pull/3278

Decouple them from the original ANGLE_base_vertex_base_instance
extension.

Make a new ANGLE_base_vertex_base_instance_shader_builtin
extension for these builtin uniforms.

Bug: angleproject:3402
Change-Id: I77b93917976ce435db9c578c0ade37bff18a42b0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3290304
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2021-12-02 00:01:49 +00:00
Cody Northrop e2e77baa13 Revert "Revert "Translator: Remove the SH_VALIDATE flag""
This reverts commit 701e8892f4.

Reason for revert: Chromium dependency fixed in http://crrev/c/3214440

Original change's description:
> Translator: Remove the SH_VALIDATE flag
>
> The SH_VALIDATE flag is a noop, defined as zero (0).
>
> Also move option descriptions up in the file.
>
> Bug: angleproject:6501
> Change-Id: I898106eb68b4508d8f94534cbff66652a69f4f3e
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3207360
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Cody Northrop <cnorthrop@google.com>

Bug: angleproject:6501
Change-Id: I4d1514d6ac04e5bedf3624facf8e9339828fa291
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3229955
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2021-10-19 01:39:24 +00:00
Shahbaz Youssefi f3d5dac3ba Vulkan: SPIR-V Gen: Drop dependency to glslang
The SPIR-V gen path is now made default.  Compilation through glslang is
still supported for debugging, and is enabled on the GLSL* end2end tests
for smoke testing.  On release builds, glslang is not supported.

To test with glslang, add the following gn arg (only necessary if dcheck
is disabled):

    angle_enable_spirv_gen_through_glslang = true

Then enable the generateSPIRVThroughGlslang feature.  This can be done
by setting an environment variable:

    ANGLE_FEATURE_OVERRIDES_ENABLED=generateSPIRVThroughGlslang ./angle_deqp_gles2_tests

Binary size saving:

- 1.3MB on Linux (SPIR-V gen itself: 240KB)
- 730KB on Android (SPIR-V gen itself: 140KB)

Perf tests:

- LinkProgramBenchmark.Run/vulkan_compile_single_thread
  * Through glslang:
      truncated mean: 1287033.36
  * Direct SPIR-V Gen:
      truncated mean: 244495.91  (~80% reduction)

- LinkProgramBenchmark.Run/vulkan_compile_multi_thread
  * Through glslang:
      truncated mean: 4565894.83
  * Direct SPIR-V Gen:
      truncated mean: 1158164.10  (~75% reduction)

Bug: angleproject:4889
Bug: angleproject:6210
Change-Id: I486342702977c8114e90073b97183aba115a8b2d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3115140
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2021-10-14 04:43:32 +00:00
Yuly Novikov 701e8892f4 Revert "Translator: Remove the SH_VALIDATE flag"
This reverts commit 4ca3d7d643.

Reason for revert: breaks roll into Chromium crrev.com/c/3213239
SH_VALIDATE is used in gpu_unittests.

Original change's description:
> Translator: Remove the SH_VALIDATE flag
>
> The SH_VALIDATE flag is a noop, defined as zero (0).
>
> Also move option descriptions up in the file.
>
> Bug: angleproject:6501
> Change-Id: I898106eb68b4508d8f94534cbff66652a69f4f3e
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3207360
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Cody Northrop <cnorthrop@google.com>

Bug: angleproject:6501
Change-Id: Ia9983eac58a07e2a6e3d5fe4d1bfccfb9c48ccd0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212709
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2021-10-08 02:57:23 +00:00
Cody Northrop 4ca3d7d643 Translator: Remove the SH_VALIDATE flag
The SH_VALIDATE flag is a noop, defined as zero (0).

Also move option descriptions up in the file.

Bug: angleproject:6501
Change-Id: I898106eb68b4508d8f94534cbff66652a69f4f3e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3207360
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2021-10-07 23:48:41 +00:00
Kenneth Russell da3db87ec4 Upstream latest changes to Metal backend from Apple to 7/1/2021
This CL merges in the ANGLE changes between these two WebKit commits:
https://git.webkit.org/?p=WebKit.git;a=commit;h=8648b353ab1d7730438c2e08319e1a4d64982c31
https://git.webkit.org/?p=WebKit.git;a=commit;h=166e4924a52971d6a32ad48247a439b16c00e062

Include provoking vertex buffer out of bounds fix
from https://bugs.webkit.org/show_bug.cgi?id=230107

Fix bad merge of resetting of dirty bits, breaking
DepthStencilFormatsTest.DepthTextureRender test and perhaps others.

Disable GL_APPLE_clip_distance when the direct-to-Metal compiler is
active. It can not yet handle the gl_ClipDistance array.

Disable use of rectangular textures for IOSurfaces. Metal can bind
IOSurfaces to 2D textures, and this was passing all tests in the
SPIR-V Metal backend. Introducing rectangular textures breaks the
SPIR-V Metal backend, and the tests currently fail on the
direct-to-Metal backend.

Fix several bugs with ProvokingVertex, which was causing
both the SpirV and Direct backends to incorrectly draw
indices.
(https://bugs.webkit.org/show_bug.cgi?id=230107)

Skip the following tests on the Metal backend which is still failing
  RobustResourceInitTestES3.BlitDepthStencilAfterClearBuffer
  GLSLTest_ES3.GLVertexIDIntegerTextureDrawArrays/ES3_Metal

With these changes, angle_end2end_tests again runs to completion.

Bug: angleproject:6395
Change-Id: I3cc58f531426a95fc8f177a4ad87f56c1855a546
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3167010
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kyle Piddington <kpiddington@apple.com>
2021-10-01 19:25:57 +00:00
Jamie Madill 49af677aef Capture/Replay: Update serialization logic.
- Uses more common toString methods instead of custom ones.
- Uses enum to string in more places intsead of numeric enums.
- Adds missing group scopes in several places.
- Skips serializing empty image levels.

Bug: angleproject:5133
Change-Id: I2c9523981aba4ec0afb5f0623cb34154db263e6b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3097805
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-08-19 13:45:44 +00:00
Shahbaz Youssefi 1ce7839728 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>
2021-08-04 20:07:30 +00:00
Shahbaz Youssefi 09d5047b41 GL: Remove the rewriteVectorScalarArithmetic workaround
This workaround was implemented for a bug in Nvidia driver 387 which is
end-of-life.  More recent driver branches (390 and 4XX) are fixed, and
so this workaround is no longer required.  The implementation of the
workaround itself could introduce bugs.

Bug: chromium:772651
Bug: chromium:1201084
Change-Id: I3db179eb90d9124235bdad2daacc712302906d8e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3067952
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2021-08-04 15:47:24 +00:00
Brandon Schade 217acac2b4 Vulkan: Add support for EXT_primitive_bounding_box
1. Added support for EXT_primitive_bounding_box extension
2. Renamed shader variable gl_BoundingBoxEXT[] to ANGLEBoundingBox[]

Bug: angleproject:3576
Test: dEQP-GLES31.functional.primitive_bounding_box.*
Change-Id: I15fa9af50c6fd8e86d225670ddd8eb39f6e65d35
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3053618
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2021-08-04 12:35:16 +00:00
Shahbaz Youssefi d0c03ff49e Vulkan: SPIR-V Gen: Fix lvalues passed to in/inout parameters
In GLSL, these values are semantically copied when passed to a function
as an in or inout parameter.  For example in:

    bool f(inout vec4 a, inout vec4 b)
    {
        a = vec4(0);
        return all(equal(a, b));
    }

    var = vec4(1);
    bool result = f(var, var);

result is expected to be false.  In SPIR-V, every parameter is
semantically passed by "reference".

glslang conservatively uses temporaries to pass to functions.  An
optimization in ANGLE didn't create temporaries for unindexed lvalues,
which did not take into account the above fact.  This optimization is
limited to out parameters now.

Bug: angleproject:4889
Change-Id: Ie1b4b1cecba847ba63d5810d01d0856823b89ddc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3046103
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-07-24 00:40:43 +00:00
Jamie Madill 2b86e2d60f GN: Update dcheck/assert conditions.
In preparation for a Chromium change that makes dchecks enabled
by default in Release builds, we'll keep ASSERT disabled in
Release by default. We add a new flag 'angle_assert_always_on'
for controlling ANGLE ASSERT behaviour.

Also slightly refactors the direct SPIR-V generation GN.

Chromium CL: https://crrev.com/c/2893204

Bug: chromium:1225701
Change-Id: I01a6def28d7c21e771e9800889a6b9c274972de2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035447
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-07-19 19:05:44 +00:00
Shahbaz Youssefi 153240b223 Vulkan: SPIR-V Gen: Support loops
Loops are similar to if-else in that they generate a number of blocks
where the first block specifies divergence (OpLoopMerge) and the merge
block.  Differently from if-else, there is a block where the condition
is evaluated and a block which `continue;` leads to (this last block is
the only one allowed to back-jump to the beginning of the loop).

Bug: angleproject:4889
Change-Id: Ic59f4bf3e05fbf93cb5af85acd3bc4b0da8412af
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2957809
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2021-06-28 15:02:46 +00:00
Brandon Schade 69f2fb0066 Vulkan: Expose OES_geometry_shader extension
Modify the symbol table generation script to accept a list
of supported extensions. This allows for the EXT and
OES versions of the geometry shader extension to be exposed.

Test: angle_deqp_khr_gles31_tests --deqp-case=*geometry_shader*
Bug: angleproject:3571
Change-Id: Ia7127a03dbd3fce78957f0505d3ce0c9bab6cb15
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2765011
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2021-06-08 23:16:33 +00:00
Shahbaz Youssefi 1b680b7728 Reland "Make SH_CLAMP_INDIRECT_ARRAY_BOUNDS do proper AST transformation"
This is a reland of a474fd7de7

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>
2021-06-05 04:36:49 +00:00
Yuly Novikov 10f15011da Revert "Make SH_CLAMP_INDIRECT_ARRAY_BOUNDS do proper AST transformation"
This reverts commit a474fd7de7.

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>
2021-06-03 19:48:46 +00:00
Shahbaz Youssefi a474fd7de7 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>
2021-06-03 16:07:43 +00:00
Kyle Piddington d7aa013091 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>
2021-06-02 15:01:18 +00:00
Shahbaz Youssefi 9bc837f64b 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>
2021-05-19 19:03:10 +00:00
Shahbaz Youssefi 795d754369 Remove unused translator option bits
Usage of SH_DONT_REMOVE_INVARIANT_FOR_FRAGMENT_INPUT is removed from
ANGLE by [1], and from the validating command decoder by [2].  The flag
is only ever disabled in Firefox.

SH_REMOVE_POW_WITH_CONSTANT_EXPONENT is removed from the validating
command decoder by [3].  Not used in Firefox.

[1]: https://chromium-review.googlesource.com/c/angle/angle/+/1558678
[2]: https://chromium-review.googlesource.com/c/chromium/src/+/2810880
[3]: https://chromium-review.googlesource.com/c/chromium/src/+/2810879

Bug: angleproject:4889
Change-Id: If7d9c31c48510b1486a2285a88475b3c01a77527
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2810806
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-04-10 01:59:48 +00:00
Shahbaz Youssefi 2feb3db572 Remove unused translator option bit
SH_DONT_PRUNE_UNUSED_FUNCTIONS was only used by tests, and never used by
ANGLE or chromium.

Bug: angleproject:4889
Change-Id: I4926f86125e69b07e9d4d95134b7b70522e0d64f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2607491
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-04-09 15:16:47 +00:00
Shahbaz Youssefi 776c60150b Vulkan: Call glslang at compile time
With this change, the ANGLE translator immediately compiles the
generated GLSL into SPIR-V with glslang and discards the source.  This
is in preparation for generating SPIR-V directly, by making the frontend
and backend already able to digest it.

This change also allows the expensive glslang calls to be parallelized,
improving the following perf test by about 20%:

    LinkProgramBenchmark.Run/vulkan_compile_and_link_multi_thread

Previously, the test was run as such in the Vulkan backend:

    Main           Thread 1          Thread 2
    Compile1 --->
    Compile2 --------------------->
                  Translator        Translator
             <---
             <---------------------
    Link

    glslang
     for
      shader1

    glslang
     for
      shader2

    Done

With this change, it is run as such:

    Main           Thread 1          Thread 2
    Compile1 --->
    Compile2 --------------------->
                  Translator        Translator
                   glslang           glslang
             <---
             <---------------------
    Link
    Done

glslang_wrapper_utils no longer interacts with glslang! A rename will
follow.

Bug: angleproject:4889
Change-Id: If4303e8ba0ba43b1a2f47f8c0a9133d0bee1a19a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2721195
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-03-25 19:53:52 +00:00
Tim Van Patten 34e287786a Reorder ShaderVariable functions and members
ShaderVariable's functions and members are all mixed up. This CL
reorders things to move the functions before the members, to better
match ANGLE's coding style.

This also adds a note that any new members that are added need to be
added to gl::WriteShaderVar() and gl::LoadShaderVar(), which are
actually implemented in Program.cpp, since ShaderVars.h/cpp can't
include libANGLE/BinaryStream.h. There are currently several members
that are missing, leading to save/load errors, which are fixed in a
follow-on CL in this chain.

Bug: b/182409935
Change-Id: I1381a5efffb56c0989961bbcfd405b95d59d6396
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2770682
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2021-03-22 23:23:37 +00:00
Shahbaz Youssefi 2f737c2509 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>
2021-03-04 17:47:51 +00:00
Shahbaz Youssefi 77637f2dd2 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>
2021-02-25 22:37:09 +00:00
Mohan Maiya 550f2a3e83 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>
2021-02-24 21:44:25 +00:00