Commit Graph
13372 Commits
Author SHA1 Message Date
Kenneth Russell e74638fed7 Disable Metal shader cache again in angle_end2end_tests.
This hooking was removed in
https://chromium-review.googlesource.com/3010486 and sped up local
test runs, but seems to have reintroduced flakiness on the Mac AMD
Retina bots.

Bug: chromium:1233864
Bug: angleproject:5505
Change-Id: I46d95545fbbedc0e881e3a2832a5ac5d5384f405
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3057823
Commit-Queue: ccameron <[email protected]>
Reviewed-by: ccameron <[email protected]>
2021-07-29 08:25:28 +00:00
Aditya Kushwah ae24c9d387 Remove space from internal debug name strings.
This changes will reduce the amount of memory used by labels by
removing the in between spaces from internal debug name strings.

Bug: chromium:1164111
Change-Id: I0ec657789dade2c3c053966ffccfbd673186fdad
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3039119
Reviewed-by: Rafael Cintron <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Rafael Cintron <[email protected]>
2021-07-29 02:09:21 +00:00
Brian Sheedy b8e8c8229c Suppress Mac 11.4 failures
Suppresses several Mac 11.4 AMD failures that were found after we
started testing the configuration.

Bug: angleproject:6222, angleproject:6223
Change-Id: I4f0f5ac0ab14d2645bb76def3e4ec55d999940fa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3056839
Reviewed-by: Yuly Novikov <[email protected]>
Commit-Queue: Brian Sheedy <[email protected]>
2021-07-28 20:41:19 +00:00
Shahbaz Youssefi 8593e0a249 TestSuite tests: Don't validate stderr until fixed
Bug: chromium:1233361
Change-Id: Ibcd66520d7b842211eafb26f9188298c281cbe64
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3058503
Reviewed-by: Tim Van Patten <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2021-07-28 18:18:14 +00:00
Shahbaz Youssefi 7c6da49358 Translator: Make sure built-in variables are consistent
Some transformations left the tree in an inconsistent state, for example
if it used gl_SampleMask from ES3.1+OES_sample_variables and the
transformation added a usage of gl_SampleMask from ES3.2.  The offending
transformations are fixed and AST validation is improved to catch such
errors.

Bug: angleproject:4889
Change-Id: I9d9ea5bb43a9408dd4c6dc3e89ec20d60dfeff73
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3054613
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
2021-07-28 06:19:04 +00:00
Peter Kasting 0d06c3cf93 Fix some instances of -Wunused-but-set-variable.
Bug: chromium:1203071
Change-Id: I144165ae5ec47aba88658030a6ba3e371bf31ee7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3053616
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2021-07-28 01:54:03 +00:00
Shahbaz Youssefi c8c9e15b5c Translator: Fix sizing of tessellation shader arrays
If layout(vertices=N) is specified after implicitly sized array
declarations, the correct size was not being specified on them.

Bug: angleproject:4889
Change-Id: I86ccf45a7f264b493a137b87316eff744079ed6c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3054614
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
2021-07-28 01:13:23 +00:00
Yuly Novikov bd19620fcd Revert "VulkanExternalHelper: Use VK_KHR_image_format_list extension."
This reverts commit 4222d5e5a0.

Reason for revert: errors on multiple builders when rolling into Chromium
https://chromium-review.googlesource.com/c/chromium/src/+/3057227
e.g.
https://ci.chromium.org/ui/p/chromium/builders/try/linux_chromium_asan_rel_ng/924126/overview

Original change's description:
> VulkanExternalHelper: Use VK_KHR_image_format_list extension.
>
> To retrieve correct size requirements when the VK_KHR_image_format_list
> extension is enabled, it must be used to match VkImages created in
> vk_helpers.
>
> RendererVk: Fully enable VK_KHR_image_format_list.
> Enable the extension on non-AMD and non-ARM platforms.
>
> Bug: angleproject:5281
> Change-Id: I3ca60bf6efcf9d9c10d4d96a3fe91b999eb044f7
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035047
> Commit-Queue: Lubosz Sarnecki <[email protected]>
> Reviewed-by: Jamie Madill <[email protected]>
> Reviewed-by: Cody Northrop <[email protected]>
> Reviewed-by: Mohan Maiya <[email protected]>

Bug: angleproject:5281, chromium:1233561
Change-Id: I3b15bb2fc2fb779adac8bbf5d805727a25b5795c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3057071
Bot-Commit: Rubber Stamper <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2021-07-27 23:47:45 +00:00
Peter Kasting 5bda5f91e6 Fix some instances of -Wunreachable-code-aggressive.
Bug: chromium:1066980
Change-Id: I1e769b78c51d939067e8855beab32ec7c006c00e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3055794
Reviewed-by: Nico Weber <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Nico Weber <[email protected]>
2021-07-27 16:40:05 +00:00
Lubosz Sarnecki 4222d5e5a0 VulkanExternalHelper: Use VK_KHR_image_format_list extension.
To retrieve correct size requirements when the VK_KHR_image_format_list
extension is enabled, it must be used to match VkImages created in
vk_helpers.

RendererVk: Fully enable VK_KHR_image_format_list.
Enable the extension on non-AMD and non-ARM platforms.

Bug: angleproject:5281
Change-Id: I3ca60bf6efcf9d9c10d4d96a3fe91b999eb044f7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035047
Commit-Queue: Lubosz Sarnecki <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
Reviewed-by: Mohan Maiya <[email protected]>
2021-07-27 10:57:36 +00:00
Lubosz Sarnecki ef406f1b43 FrameCapture: Capture GLES1 matrix stack.
Capture the modelview and projection matrix stack. This is required for
GLES1 applications that do not reset the stack every frame.

Bug: angleproject:6181
Change-Id: I71befc15ca287cf91fcebf9d972c7badaeb23605
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035050
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
Commit-Queue: Lubosz Sarnecki <[email protected]>
2021-07-27 10:22:45 +00:00
Lubosz Sarnecki edb4a7a8da GLES1State: Add getMatrixStack function.
FrameCapture requires access to the whole matrix stack. This function
also exposes stacks that are not currently set.

Bug: angleproject:6181
Change-Id: I595feaa0cbd3e5a62e398aa7a0578ecf6425ffe6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035049
Reviewed-by: Cody Northrop <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Lubosz Sarnecki <[email protected]>
2021-07-27 09:42:35 +00:00
Shahbaz Youssefi b8d6f8aa93 Translator: Facilitate integration in FireFox
Instead of relying on is_apple to build workarounds applied on apple
hardware, a new build argument is added for this purpose.  This allows
FireFox to more easily include these files in their build system (which
builds every workaround on every platform).

The workarounds are reorganized too and moved from tree_ops/gl/mac to
tree_ops/apple.  RewriteRowMajorMatrices is moved there too as it's now
used by both gl and metal.  This workaround is large, and removing it
from non-apple builds improves binary size (~40KB on Linux).

Bug: angleproject:6188
Change-Id: I8e1dab44d0235bb6b8341d53721bdd0d157d46c6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3047385
Reviewed-by: Jeff Gilbert <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2021-07-27 03:05:45 +00:00
Shahbaz Youssefi dbe986d710 Vulkan: SPIR-V Gen: Fixes to tessellation shader support
- TCS barrier() built-in is correctly looked up
- Patch decorations are fixed

Bug: angleproject:4889
Change-Id: I1befcaca85a965c9d46b1b41ec74597de44bf2b2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3052687
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
2021-07-27 02:04:51 +00:00
Shahbaz Youssefi acfd63a4cc Translator: Remove GLSL rules from the ESSL-only symbol table
Shaves ~36KB off of ANGLE's binary size on Android.

Bug: chromium:1084580
Change-Id: I4711c6bd28437a43b7dc63be4cfcdaed7ae11ba2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3052686
Reviewed-by: Yuly Novikov <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2021-07-27 02:01:41 +00:00
Shahbaz Youssefi 63fa70809c Vulkan: SPIR-V Gen: Fix bugs with ES3.1 texture* builtins
- Add missing ImageCubeArray capability for image cube arrays
- Remove extra Lod image operand for sampler/image buffers

Bug: angleproject:4889
Change-Id: I96545092528b7dcecf902561e194b17636217ef4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3052683
Reviewed-by: Tim Van Patten <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2021-07-27 01:58:51 +00:00
Shahbaz Youssefi 715bab1f17 Vulkan: SPIR-V Gen: Fixes to geometry shader support
- max_vertices=0 is invalid in SPIR-V and is fixed (similarly to
  anglebug.com/5411)
- gl_PrimitiveID used in fragment shaders requires the Geometry
  capability.

Bug: angleproject:4889
Change-Id: If8c6a9d455d0582d61c3c52b5f773bcb5ca64b53
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3052684
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
2021-07-27 01:20:21 +00:00
Shahbaz Youssefi ff7eafb56c Vulkan: SPIR-V Gen: Fix .length() vs ssbo arrays
Bug: angleproject:4889
Change-Id: Ib490a46fabf058064fc1b18d2c084a4bc5f9277d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3052682
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
2021-07-27 01:06:30 +00:00
Shahbaz Youssefi b19fbbdabe Vulkan: SPIR-V Gen: Support multiview
Bug: angleproject:4889
Change-Id: Ibe66f53357473dbb4435af58775b524d83ed250b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3052675
Reviewed-by: Tim Van Patten <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2021-07-27 01:01:27 +00:00
Jamie Madill 3bd2273b4f Capture/Replay: Only perform call updates on valid calls.
Bug: angleproject:5133
Change-Id: Ib1a6ae1ca9ff9717c4e51f8908f5a4ee132d72ab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035443
Reviewed-by: Tim Van Patten <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
Reviewed-by: Gert Wollny <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2021-07-26 12:24:43 +00:00
Gert Wollny d67cab2288 Capture/Replay: Handle missing context serialization
Some ContextLost* tests do weird things with the context
serialization which results in a mis-match of available context
serializations.

In this case check whether both serializations are missing, if so
consider this to be an equal contexts states, otherwise, if only
one serialization is available, report failure.

While touching this code, also remove an unused parameter from
the context serialization compare function.

Disable tests that still fail with this change.

Bug: angleproject:6157
Change-Id: Iee6cc7d65437112e38919cff59804e2b7f9467da
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3021061
Commit-Queue: Gert Wollny <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
2021-07-26 07:18:24 +00:00
Shahbaz Youssefi a5b7655cb2 Vulkan: Unsupress fixed test
Fix landed in glslang.

Bug: angleproject:6178
Change-Id: Ie3d2a9535b4ed0d484c97e08be069ff9e27cdde1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3051313
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2021-07-24 14:03:39 +00:00
Shahbaz Youssefi 939ea5f41e Vulkan: SPIR-V Gen: Fixes to tessellation builtins
On TCS, TES and FS, gl_PrimitiveID is actually an input.  Additionally,
`patch` variables (including gl_TessLevel* built-ins) need to be
decorated with Patch.

Bug: angleproject:4889
Change-Id: I326ec4b0c011fe8eaafbad4f8bcb0f537005f96f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3048320
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
2021-07-24 05:26:35 +00:00
Shahbaz Youssefi 9416e84e17 Vulkan: SPIR-V Gen: Add missing DepthReplacing execution mode
Shaders writing to gl_FragDepth need this execution mode specified.

Bug: angleproject:4889
Change-Id: I315c90f9161f4d3d51b1c856f1364fb26a4bd404
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3048317
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2021-07-24 05:26:15 +00:00
Shahbaz Youssefi de8dc2c931 Vulkan: SPIR-V Gen: Support OES_sample_variables
Built-ins from this extension are now decorated.

Bug: angleproject:4889
Change-Id: I12f80d67e3595f94fc64bdc8cb3031d36b98c279
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3048319
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
2021-07-24 04:34:45 +00:00
Shahbaz Youssefi 8bf2e5ec10 Vulkan: SPIR-V Gen: Fix switch with default at the end
A minor bug was making a switch with default at the end to jump to the
merge block instead of the default block.

Bug: angleproject:4889
Change-Id: Ied434fab949b10d45a0db1242c1b8535a5f4f773
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3048321
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
2021-07-24 04:29:55 +00:00
Shahbaz Youssefi 82d7d888f5 Vulkan: SPIR-V Gen: Fix bugs with texture* builtins
With this change, deqp ES3 tests pass.

Bug: angleproject:4889
Change-Id: Ica158d4e9012c7bb3e458da62b4a7f92aee5c6de
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3047380
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2021-07-24 04:29:05 +00:00
Shahbaz Youssefi 31bc922649 Vulkan: SPIR-V Gen: Fix unpack* built-ins
The parameter to these built-ins was getting extended to a vector.

Bug: angleproject:4889
Change-Id: Idddce008c9b4f6bf9205b1e20f6e89ef657ea3a1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3048318
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
2021-07-24 03:41:55 +00:00
Shahbaz Youssefi 24610ba60c Suppress failing SPIR-V gen tests
Bug: angleproject:4889
Change-Id: Ie5a5cb5c8f947e2d90861371893367b9ec341f19
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3051312
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2021-07-24 03:27:55 +00:00
Shahbaz Youssefi 6b5cec154a Vulkan: SPIR-V Gen: Fixes to scalar->vector promotion
With the ternary operator, the condition may be a bool-in-interface
block that needs to be cast.  This cast is now part of
createConstructorVectorFromScalar so it can't be missed.

Bug: angleproject:4889
Change-Id: I0e24cd4127301d33a3ac677ccaf560c4468e0799
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3047379
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2021-07-24 02:37:03 +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 <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2021-07-24 00:40:43 +00:00
Shahbaz Youssefi cc69d861ab Vulkan: SPIR-V Gen: Fix textureProj's coordinate adjustment
The OpCompositeInsert's parameters were given in the wrong order.
Additionally, some instructions were not having RelaxedPrecision applied
correctly; this is fixed by deriving the decorations from the type of
the argument that's passed in a function instead of the type of the
parameter itself.

Bug: angleproject:4889
Change-Id: I34a54fcc0ef1699e554f9e1abb94c93a5b34b6d3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3046102
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2021-07-23 23:00:13 +00:00
Shahbaz Youssefi 9d23ae62c8 Vulkan: SPIR-V Gen: Fix conditionals with pruned blocks
Rewored the visitIfElse function to simplify the logic and correctly
handle if-else constructs where the true block is pruned.

Bug: angleproject:4889
Change-Id: Ib968a2fe65f4b6463158fd76e7d67757115ee832
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3046101
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
2021-07-23 22:03:02 +00:00
Shahbaz Youssefi ad8c32578d Vulkan: Fix bresenham line emulation in shaders with return
RunAtTheEndOfShader should have been used to ensure that the appended
code runs at the end of the shader no matter if the shader includes
return statements.

Bug: angleproject:4889
Bug: angleproject:6206
Change-Id: I848eafdf3c7bc63206a7f82cdf0badad335fa3bc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3046100
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2021-07-23 19:54:32 +00:00
Shahbaz Youssefi 02c5cdbdbd infra: Enable gles2 deqp tests with direct SPIR-V generation
Enabled on Linux/Nvidia, Windows/Nvidia and Pixel4.

Bug: angleproject:4889
Change-Id: I50c5e31097bd7e1539caf7b229a249cbfa62b93d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3042557
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2021-07-23 19:01:02 +00:00
Jamie Madill fbffcf7bb3 dEQP: Suppress two tests with undefined behaviour.
dEQP-GLES3.functional.shaders.operator.unary_operator.minus.lowp_uvec4_vertex
dEQP-GLES3.functional.shaders.operator.unary_operator.minus.mediump_uvec4_vertex

See bug for more details.

Bug: angleproject:6214
Change-Id: Ibc69dbcd1524470da620c31d41da20f69dfbaae2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3049254
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2021-07-23 18:45:22 +00:00
Shahbaz Youssefi 8f6f52b563 GL: Temporarily disable sync control on all GPUs on Linux
This workaround is supposed to be limited to Intel GPUs with a recent
mesa version, but due to anglebug.com/6174 is not actually enabled on
dual-GPU systems.

The workaround is temporarily disabled on all GPUs until said issue is
fixed.

Bug: chromium:1187475
Bug: angleproject:6174
Change-Id: Ieee430b1e2a04e36d6f8d60cabc9e391f0e49988
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3048237
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2021-07-23 18:23:06 +00:00
Shahbaz Youssefi 6262879919 Vulkan: SPIR-V Gen: Support dEQP
A temporary condition for direct SPIR-V generation is added to test
expectations while this work is in progress, so test suites can be
partially enabled.  32 tests are currently failing.

Bug: angleproject:4889
Change-Id: Icf0f6ef80d30fdb7564d8ecf928e67ca58ace86f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3042556
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2021-07-23 17:21:26 +00:00
Alexis Hetu 729cbcf172 Make Display and X11 available in the same build
Chromium can use the 'use_ozone' and 'use_x11' build flags
simultaneously, so we need the Vulkan display to still be
selectable, even when the 'use_x11' flag is used.

This is required to make SwANGLE work with Ozone/Wayland, which
is going to use EGL_PLATFORM_VULKAN_DISPLAY_MODE_HEADLESS_ANGLE
when SwANGLE is requested.

Bug: chromium:1231934
Change-Id: I2ac1d3d9bc231608d7f77e9a2540f4c538840076
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3049351
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Alexis Hétu <[email protected]>
2021-07-23 17:12:58 +00:00
Shahbaz Youssefi 9f7a86a808 Vulkan: SPIR-V Gen: Fix bugs with matrix ops
A number of matrix operations are fixed in this change, such as
matrix/scalar, ++matrix etc.

This change fixes most of the failing dEQP-GLES2.* tests.  The test
suite will be enabled once the remaining 32 failures are fixed.

Bug: angleproject:4889
Change-Id: I0905dfaeabe50716432ce354b890be35f2a16e59
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3042555
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2021-07-23 02:47:16 +00:00
Shahbaz Youssefi 951b04bb31 Vulkan: SPIR-V Gen: Support scalar constructors
In GLSL, the scalar constructor can be given a vector and matrix, in
which case the first element is selected.  This case was not previously
handled.

Bug: angleproject:4889
Change-Id: Ibf276883fc7396b750981a4e469ff9b152c6e700
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3042554
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2021-07-23 02:34:07 +00:00
Shahbaz Youssefi 45d4641a4c Vulkan: SPIR-V Gen: Support tessellation shaders
Bug: angleproject:4889
Change-Id: I7370e037a82689260e27bfd5e72c5c8c982efa58
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3041624
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2021-07-23 02:22:56 +00:00
Shahbaz Youssefi 7f199d7514 Vulkan: SPIR-V Gen: Support geometry shaders
Geometry shader built-ins are implemented.  A bug in
DeclarePerVertexBlocks is fixed w.r.t to gl_PerVertex arrays and a new
AST validation option is added to catch that sort of error.

Bug: angleproject:4889
Change-Id: I40b2929e450eac8ae840bbf1a1583e6c4c047c88
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3041623
Reviewed-by: Tim Van Patten <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2021-07-23 01:31:54 +00:00
Cody Northrop b5630d5c60 Capture/Replay: Add textures to resource tracking
This CL:
- Shifts resource reset tracking to be stored in an array of structs
indexed by type. This helps curb the complexity of adding more
resource types.
- Moves buffer and program tracking to the new layout.
- Adds textures to the resource tracker, using new layout.

Note that only aspects common to all ResourceIDTypes have been moved
to the new layout. Unique pieces of data, like buffer mapping state
and GLSync handling, remain in resource tracker alone.

Since texture setup is quite involved, this CL takes the approach of
having each call applied to two call chains at the same time;
SetupReplay calls and ResetReplay calls.

ResetReplay ends up with a sequence similar to buffers:

    ...
    const GLuint deleteTextures[] = {
        gTextureMap[1], gTextureMap[2], ...  gTextureMap[n]};
    glDeleteTextures(<count>, deleteTextures);
    ...
    glGenTextures(1, reinterpret_cast<GLuint *>(gReadBuffer));
    UpdateTextureID(1, 0);
    glGenTextures(1, reinterpret_cast<GLuint *>(gReadBuffer));
    UpdateTextureID(2, 0);
    glGenTextures(1, reinterpret_cast<GLuint *>(gReadBuffer));
    UpdateTextureID(3, 0);
    ...
    glBindTexture(GL_TEXTURE_2D, gTextureMap[1]);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, 9729);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, 33071);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, 33071);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, 33071);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, 519);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
    glTexImage2D(GL_TEXTURE_2D, 0, 6406, 512, 512, 0, GL_ALPHA, GL_UNSIGNED_BYTE,
        reinterpret_cast<const GLubyte *>(&gBinaryData[183263280]));
    glBindTexture(GL_TEXTURE_2D, gTextureMap[2]);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, 9987);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, 519);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 6);
    glTexStorage2D(GL_TEXTURE_2D, 7, GL_COMPRESSED_SRGB8_ETC2, 64, 64);
    ...

Test: PUBG Mobile MEC
Bug: b/180418573
Bug: angleproject:6087
Change-Id: I9f8e151c12aec5b2b7af376b8e0ff644ff9c61c4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3016114
Commit-Queue: Cody Northrop <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2021-07-22 16:42:25 +00:00
Jamie Madill c408926fc8 Revert "EGL: GLES: Implement GL_EXT_protected_textures"
This reverts commit 6210a9b34a.

Reason for revert: Suspected for breaking ANGLE->Chrome roller.

Bug: angleproject:6204

Original change's description:
> EGL: GLES: Implement GL_EXT_protected_textures
>
> Implement EGL_EXT_protected_content Images
> Add protected member to Images and Textures
> Add error when creating objects if not supported or
> does't match native buffer
> When creating siblings pass protected state
> Add extension caps
> Add Validation
> Add GetTexParameter and SetTextparameter
> Add protected to Texture and state
> Expand tests for images and textures
>
> Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest
>
> Bug: angleproject:3965
> Change-Id: I35a89b4e80bba6d9b6831c68e71630eef304dacb
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2802852
> Commit-Queue: Mohan Maiya <[email protected]>
> Reviewed-by: Geoff Lang <[email protected]>
> Reviewed-by: Jamie Madill <[email protected]>
> Reviewed-by: Shahbaz Youssefi <[email protected]>

Bug: angleproject:3965
Change-Id: Ia3ef260a17097b474189ccad5b235a9db99ee00b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3043889
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
Bot-Commit: Rubber Stamper <[email protected]>
2021-07-22 13:55:05 +00:00
Jamie Madill c5f83c34f3 Revert "Vulkan: Suppress VVL errors triggered by external formats"
This reverts commit f46df3978a.

Reason for revert: VVL change rolled into ANGLE + Chrome.

Original change's description:
> Vulkan: Suppress VVL errors triggered by external formats
>
> Since several tests are hitting these and it may be a VVL bug,
> moving to ignore rather than skips.
>
> Bug: angleproject:6155
> Bug: angleproject:6168
> Change-Id: I38a5be8d792b8b13a490be895a68349bffe69c6e
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3028809
> Reviewed-by: Tim Van Patten <[email protected]>
> Reviewed-by: Jamie Madill <[email protected]>
> Reviewed-by: Mohan Maiya <[email protected]>
> Commit-Queue: Cody Northrop <[email protected]>

Bug: angleproject:6155
Bug: angleproject:6168
Change-Id: I11696095300c214ca0b68624b0eb6763ba9d31f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3043888
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2021-07-22 13:35:25 +00:00
Jamie Madill 03cf78880e Test Runner: Remove extra quotes from histograms.
We were double-quoting the test names.

Bug: angleproject:6090
Change-Id: I69ce089ef20068b408de7156bdbade922cdefe95
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3043890
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2021-07-22 13:12:04 +00:00
Shahbaz Youssefi 0e1c90cf4f Translator: Validate function parameter qualifiers
This change cleans up a confusion in EvqConst and EvqConstReadOnly,
where the former was frequently used instead of the latter for function
parameters.

The change makes the following renames to make the intent of the
relevant qualifiers clearer:

    EvqIn            -> EvqParamIn
    EvqOut           -> EvqParamOut
    EvqInOut         -> EvqParamInOut
    EvqConstReadOnly -> EvqParamConst

Bug: angleproject:4889
Change-Id: Idedd32c08a91de069b91b1657d6b783dddece04a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3041622
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2021-07-22 02:03:13 +00:00
Shahbaz Youssefi 6e26145335 Vulkan: SPIR-V Gen: Fix I/O block arrays
Since the qualifier on intermediate nodes are EvqTemporary, the code
that autodeduced the block storage of I/O blocks was incorrectly
assigning them std140 when an indexed I/O block array was encountered.
This resulted in duplicate types in the SPIR-V.  This is generally
benign (other than creating an unnecessary type) except for gl_PerVertex
as it adds BuiltIn decorations.  gl_PerVertex may be an array in
geometry and tessellation shaders.

Bug: angleproject:4889
Change-Id: Iaa8e414ae01a4be127dc52df0e9406546b23d24c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3041621
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2021-07-22 01:49:02 +00:00
Tim Van Patten 8a737c5d40 Capture/Replay: Update unpack state in Shared MEC
The shared context state MEC performed by
CaptureSharedContextMidExecutionSetup() needs to include updating the
pixel unpack state before capturing texture contents. Otherwise,
computeRowPitch() will compute the wrong value, leading to a crash in
memcpy() when capturing Pokemon GO.

Bug: angleproject:6203
Change-Id: Id1b2d0b4f3bc79e615778ba513f50aabaeb4a56e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3044356
Commit-Queue: Tim Van Patten <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2021-07-21 23:48:47 +00:00