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

847 Коммитов

Автор SHA1 Сообщение Дата
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
Amirali Abdolrashidi d02875522d Reland "Vulkan: Implement GL_EXT_multi_draw_indirect"
This is a reland of 79f9d163b4
* Added drawcount > 1 as a condition to fall back to
MultiDraw*IndirectGeneral().
* Expanded the tests to include cases with disabled support
for multiDrawIndirect.

Original change's description:
> Vulkan: Implement GL_EXT_multi_draw_indirect
>
> * Optimized the implementations of multiDrawArraysIndirect()
> and multiDrawElementsIndirect() for Vulkan
>   * Added helper functions to support drawArraysIndirect() and
> drawElementsIndirect() as special cases of multiDraw*Indirect
> functions.
>   * Added the flag to enable the multiDrawIndirect feature
> (drawCount > 1). The generic implementation is used if the
> flag is disabled.
>
> Bug: angleproject:6439
> Change-Id: Ibc653d93d355657f828de9c33da22428629e450f
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3276044
> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>

Bug: angleproject:6439
Change-Id: I96c015855fabc8abbb87320a5ca71a8d92d61954
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3313412
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
2021-12-04 00:58:08 +00:00
Ian Elliott 2424172492 Reland: Vulkan: Use vkResetQueryPoolEXT when available
This is a reland of 97aa5187ed

Original change's description:
> ANGLE currently uses vkCmdResetQueryPool to reset a query pool.  As
> reported by Arm, this can cause GPU bubbles.  It is better to use
> vkResetQueryPoolEXT() when available (either by Vulkan 1.2 or by the
> VK_EXT_host_query_reset extension).
>
> Bug: angleproject:6692
> Change-Id: I650d7d0f55bdf6587b75be43cc7bed2dc3eb935a
> Reviewed-on:
>     https://chromium-review.googlesource.com/c/angle/angle/+/3294061
> Commit-Queue: Ian Elliott <ianelliott@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Charlie Lao <cclao@google.com>

Bug: angleproject:6692
Change-Id: Idff87977bd39ccd1d05684e48929f4cd3fa733c7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3313382
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
2021-12-03 23:49:29 +00:00
Tim Van Patten 8e6f38e5d7 Revert "Vulkan: Implement GL_EXT_multi_draw_indirect"
This reverts commit 79f9d163b4.

Reason for revert:
Breaks dEQP-GLES31.functional.draw_indirect* on Pixel devices:
https://blackbox.googleplex.com/dashboard/cts-graphics/target/git_master/oriole-userdebug/3/cts-angle-host-test-arm64-v8a/4

Original change's description:
> Vulkan: Implement GL_EXT_multi_draw_indirect
>
> * Optimized the implementations of multiDrawArraysIndirect()
> and multiDrawElementsIndirect() for Vulkan
>   * Added helper functions to support drawArraysIndirect() and
> drawElementsIndirect() as special cases of multiDraw*Indirect
> functions.
>   * Added the flag to enable the multiDrawIndirect feature
> (drawCount > 1). The generic implementation is used if the
> flag is disabled.
>
> Bug: angleproject:6439
> Change-Id: Ibc653d93d355657f828de9c33da22428629e450f
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3276044
> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>

Bug: angleproject:6439
Change-Id: Ia4d54ef3e7652febf4d77fdaf6809f57e8e29127
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3312829
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
2021-12-02 18:09:17 +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
Tim Van Patten ef65edf2f2 Add extension: ANGLE_rgbx_internal_format
Add the extension ANGLE_rgbx_internal_format, which exposes the ANGLE
internal format GL_RGBX8_ANGLE. The format GL_RGBX8_ANGLE enables
emulating RGB8 formats with RGBA8 within ANGLE.

This also renames the format GL_RGBX8_ANGLEX to GL_RGBX8_ANGLE, since
it's being exposed.

Bug: angleproject:6690
Test: Texture2DTestES3.TextureRGBXImplicitAlpha1
Change-Id: I5548a3578a14e2f2a4006bbf59983b01f694b7f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3296625
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-11-30 01:41:05 +00:00
Peng Huang a5e391d744 Add GL_ANGLE_vulkan_image extension
glAcquireTextures & glReleaseTextures are added for sharing
texture ownership with an external API.

Bug: chromium:1264439
Change-Id: If46d8d230b4f611768b5ff1187674509e42f01e0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3293921
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
2021-11-29 21:09:46 +00:00
Peng Huang e00ad44329 Add EGL_ANGLE_vulkan_image extension
This extension is for exporting VkImage from EGLImage.
The VkImage must be used with the same VkDevice used by ANGLE
Vulkan backend.

Bug: chromium:1264439
Change-Id: I222d900465cf2716d94fc64f06e240390ec518ac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3285025
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
2021-11-25 17:48:33 +00:00
Ian Elliott 2fa1adf000 Revert "Vulkan: Use vkResetQueryPoolEXT when available"
This reverts commit 97aa5187ed.

Reason for revert: This apparently caused crbug.com/1273344

Original change's description:
> Vulkan: Use vkResetQueryPoolEXT when available
>
> ANGLE currently uses vkCmdResetQueryPool to reset a query pool.  As
> reported by Arm, this can cause GPU bubbles.  It is better to use
> vkResetQueryPoolEXT() when available (either by Vulkan 1.2 or by the
> VK_EXT_host_query_reset extension).
>
> Bug: angleproject:6692
> Change-Id: I650d7d0f55bdf6587b75be43cc7bed2dc3eb935a
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3294061
> Commit-Queue: Ian Elliott <ianelliott@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Charlie Lao <cclao@google.com>

Bug: angleproject:6692
Change-Id: I70d5eeb0b98f016fd262935194f8f4abee2a72b9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3300309
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Lingfeng Yang <lfy@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
2021-11-24 19:51:52 +00:00
Amirali Abdolrashidi 79f9d163b4 Vulkan: Implement GL_EXT_multi_draw_indirect
* Optimized the implementations of multiDrawArraysIndirect()
and multiDrawElementsIndirect() for Vulkan
  * Added helper functions to support drawArraysIndirect() and
drawElementsIndirect() as special cases of multiDraw*Indirect
functions.
  * Added the flag to enable the multiDrawIndirect feature
(drawCount > 1). The generic implementation is used if the
flag is disabled.

Bug: angleproject:6439
Change-Id: Ibc653d93d355657f828de9c33da22428629e450f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3276044
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-11-24 06:06:21 +00:00
Jeff Vigil 8b60855ba9 EGL: implement EGL_KHR_mutable_render_buffer
Pass render buffer mode change to WindowSurfaceVk.
On mode change trigger OUT_OF_DATE. Then in CreateSwapchain,
if new mode, set the Presentation mode and the Image count.
OffscreenSurfaceVk ignores mode change.
Add MUTABLE_RENDER_BUFFER_BIT to GenerateDefaultConfig.

Test: dEQP-EGL.functional.mutable_render_buffer.*

Bug: angleproject:3966
Change-Id: I7b59708514bcda10f8d45ce5f9528aa840fcccfa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3171822
Commit-Queue: Brandon Schade <b.schade@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-11-23 19:44:29 +00:00
Ian Elliott 97aa5187ed Vulkan: Use vkResetQueryPoolEXT when available
ANGLE currently uses vkCmdResetQueryPool to reset a query pool.  As
reported by Arm, this can cause GPU bubbles.  It is better to use
vkResetQueryPoolEXT() when available (either by Vulkan 1.2 or by the
VK_EXT_host_query_reset extension).

Bug: angleproject:6692
Change-Id: I650d7d0f55bdf6587b75be43cc7bed2dc3eb935a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3294061
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
2021-11-23 16:44:59 +00:00
Peng Huang 3a84ef5e30 Add EGL_VULKAN_GET_INSTANCE_PROC_ADDR
Add EGL_VULKAN_GET_INSTANCE_PROC_ADDR for query Vulkan
vkGetInstanceProcAddr function pointer associate with the
Vulkan EGLDevice.

Bug: chromium:1264439
Change-Id: I4ff14e2aef7b8ca651e13b4d2867a540aed1b321
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3279100
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
2021-11-12 22:19:43 +00:00
Shahbaz Youssefi 6fe13477ba Vulkan: Add external's pNext to ANGLE_external_objects_flags
ANGLE was chaining VkImageFormatListCreateInfoKHR to
VkImageCreateInfo::pNext to support sRGB extensions.  For external
images, it was unknown whether that was valid because there was no way
to know if external used an identical chain of pNexts.  This was causing
a discrepancy between images created by Chrome and those created by
ANGLE as part of an import.

This change updates ANGLE_external_objects_flags to take in the pNext
chain external has used to create the image so ANGLE could create the
image identically.

Bug: chromium:1266094
Change-Id: I479b9e7ff39d437425dc91c79834880749766f99
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3274177
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-11-12 17:55:52 +00:00
Shahbaz Youssefi dbc0c646c4 Vulkan: Output the reason for RP closure in command buffer
To make it easier when viewing the command buffer in a graphics
debugger, this change inserts a marker just before closing the render
pass that specifies why the render pass was closed.

Bug: angleproject:2472
Change-Id: I862e500cd58332d6e199c853315c560fe6a73dc2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3265609
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-11-12 15:41:20 +00:00
Tim Van Patten 5d8a89e44f Vulkan: Always override surface format GL_RGB8 to GL_RGBA8
If an app requests to create a surface with GL_RGB8, override it to be
GL_RGBA8 for Android.

This is to workaround an issue with the Android Vulkan loader which
limits which formats can be used with swapchains.

This CL also adds GL_RGB8 back to DisplayVkAndroid::generateConfigs(),
effectively reverting the following CL:
https://chromium-review.googlesource.com/c/angle/angle/+/3235466
This is being done with this CL (rather than reverting) since these
changes are required to handle surfaces created with GL_RGB8.

Bug: angleproject:6277
Bug: angleproject:6651
Change-Id: Iad78ea0d7bdf12e1e309ed6a7181f08fac38b9de
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3258143
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
2021-11-06 02:33:20 +00:00
Peng Huang d7090f5d71 Add more attributes for EGL_ANGLE_device_vulkan
Bug: chromium:1264439
Change-Id: Ibc9676cef16411b17c833abe9559721811016eef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3264164
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
2021-11-05 19:17:29 +00:00
Jamie Madill 4a2446c6b4 Vulkan: Implement robust shader outputs.
In this CL we change ANGLE to pass the mask of missing shader
outputs down to pipeline creation. We then use the color mask
bits to block SwiftShader writing to unused outputs.
This fixes the undefined behaviour present in Genshin Impact.

Note that the other GLES implementations we tested don't seem
to modify outputs even if they're unused.

It was easier to mask out the color attachments in initialize
rather than set up the pipeline desc to mask out the attachments.
This was because we manipulate the color mask in a fairly complex
way before we initialize the pipeline desc.

Bug: angleproject:6566
Change-Id: Ie659fcd511cd286fa573fd25e3e6a0b9e123ebd6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3232435
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2021-10-29 20:40:07 +00:00
Peng Huang 81d964a1ae vulkan: implement EGLDevice for vulkan backend
It allows ANGLE clients to get and use VkDevice and VkQueue
used by vulkan backend.

Bug: chromium:1264439
Change-Id: I338ac08152cfec50bb34c5025730e5e6368efba9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3250964
Reviewed-by: Peng Huang <penghuang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
2021-10-29 14:34:12 +00:00
Geoff Lang d2c01d2ce5 GL: Allow selecting virtualization groups at context creation
Rewrite EGL_ANGLE_platform_angle_context_virtualization to
EGL_ANGLE_context_virtualization, changing the context virtualization
parameter to an identifier for what virtualization group the frontend
context should be added to.

This allows ANGLE's GL backend to be used by multiple threads if the
user creates contexts with different virtualization groups.

Bug: angleproject:6406
Change-Id: I7414d4705ce10bdf63a9b824043d5dd040dad875
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3169193
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2021-10-25 17:20:56 +00:00
Mohan Maiya 9a7b62ad40 Remove glext_angle.h, merge contents into gl2ext_angle.h
Currently glext_angle.h file, which is for GLES 1.x, has enums for
GL_ANGLE_yuv_internal_format which is an ES 3.0+ extension.
Merge contents of glext_angle.h into gl2ext_angle.h and remove
glext_angle.h

Bug: angleproject:6579
Change-Id: Iec5427af131888a2d9c473f4f497afb71dcafdac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3232822
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-10-20 12:45:54 +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
Lingfeng Yang 2615e6b2cf Remove the syncFramebufferBindingsOnTexImage workaround
It's unused

Bug: angleproject:6503
Change-Id: Ia9039432006ec6988e93db08b9a572c7a7f837ed
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212428
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-10-14 20:19:55 +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
Charlie Lao ea5804842b Vulkan: Add feature flag to prefer CPU copy instead of staged update
For ARM GPU, use GPU to do buffer to buffer copy has performance penalty
due to potential bubble in the vertex pipeline. This CL adds a feature
flag preferCPUForBufferDataSubData so that we can enable this behavior
for ARM GPUs.

This CL also tracks if GPU has referenced this BufferVk's storage since
it got new storage. Due to sub-allocation, we may get a new sub-range of
the same BufferHelper object when allocating new storage. But we
currently do not have a way to track GPU progress of the sub-range of a
buffer. So we will end up using BufferHelper's queueSerial to decide if
it is still GPU busy or not. This CL adds mHasBeenReferencedByGPU
boolean variable that will set to false when we got a new allocation and
set to true as soon as buffer is been referenced by any GPU command. We
use this to avoid checking queueSerial if it never been referenced by
GPU. This is a temporary workaround for the bug, the full fix is tracked
by https://issuetracker.google.com/201826021

Bug: b/200067929
Change-Id: I231fb0a678b0165a2ce1775d0aa4dbe7512fb4a8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3183398
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2021-10-13 19:43:36 +00:00
Jonah Ryan-Davis 7d1b12eb59 Clean up PlatformMethods enum allocation
EGL_PLATFORM_ANGLE_PLATFORM_METHODS_ANGLEX was allocated to 0x3482
without reserving an enum in the ANGLE drive. This value was later
used for EGL_POWER_PREFERENCE_ANGLE, causing a collision. This CL
re-allocates the enum.

Bug: angleproject:6105
Change-Id: I0da95dbd307954e2f7f5107d0179d580ec536f2b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3219591
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2021-10-13 18:23:37 +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
angle-autoroll 66c89b0fe4 Fix and disable MSVC warnings
Needed because some warnings are no longer disabled after
http://crrev.com/c/3189512.

Also includes https://github.com/KhronosGroup/OpenCL-Headers/pull/179,
needed after clang upgrade to llvmorg-14-init-5410-gd0473681

Bug: chromium:1257173
Change-Id: I4f844aa972362c488cb6d37244439e2126f2c1c3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3210629
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2021-10-07 06:08:03 +00:00
Jamie Madill 4f0e7e7f23 Vulkan: Remove extraCopyBufferRegion workaround.
Bug: angleproject:2838
Change-Id: I53ba3cf307f930ae9550d1bfee4650df6e826930
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3202475
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-10-05 11:27:18 +00:00
Geoff Lang ad8e4d99a9 Remove EGL_ANGLE_flexible_surface_compatibility
This extension has been superseded by EGL_KHR_no_config_context.

Bug: chromium:1253930
Change-Id: Ie299c34baa84e9f47c73ddb5a0636536bf510d72
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3190612
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2021-10-05 01:57:32 +00:00
Kyle Piddington 54d4bfe5f9 Update ANGLE Metal to Webkit at Sept 29 2021
This commit merges changes from Webkit into ANGLE upstream.
The following commits were used:
Current:
https://git.webkit.org/?p=WebKit.git;a=commit;h=e01d0bda8f4b7dc2fd834b92802d15d8c15735f

Previous:
https://git.webkit.org/?p=WebKit.git;a=commit;h=492f078198748e8ff248eea0bb979cf79e5f5adfj

The following commits were merged in from the Webkit Repository:
(Hashes from git://git.webkit.org/WebKit-https.git)

03ea44c78ce5665d4ec9add271260121cbc7bc6c
     Problems with drawElements in some conditions
     https://bugs.webkit.org/show_bug.cgi?id=230107
c8dc8e0c4d1109d39a62eb197b45e95132380290
     ANGLE Metal: single-component swizzles do not compile
     https://bugs.webkit.org/show_bug.cgi?id=230472
7285dbaaf5af15877d6c332b30ef7a4d67225460
     webgl-compressed-texture-s3tc-srgb.html fails on Intel+AMD Metal
     https://bugs.webkit.org/show_bug.cgi?id=229941
4c72f92967ecd2a095666fef431384c4f5f60fb4
     fragcolor-fragdata-invariant.html fails
     https://bugs.webkit.org/show_bug.cgi?id=223317
cd943145467f54e5928793c0dd3dfa2313c007dd
     ANGLE Metal index buffer restart range cache could be maintained..
     https://bugs.webkit.org/show_bug.cgi?id=227451
f075ff77e592eabd54dd659a8e13617cc5faedc8
     ANGLE Metal infinities and NaNs generated with incorrect syntax
     https://bugs.webkit.org/show_bug.cgi?id=229439
5862073269122f4b2d43d96d3922757557755e86
     [Metal ANGLE] Fix over-autorelease of
     rx::DisplayMtl::getMetalDeviceMatchingAttribute()...
     <https://webkit.org/b/229128>
85f797ad31db048cb82cbafd428ef77f0b839312 ANGLE Cocoa compiles....
     https://bugs.webkit.org/show_bug.cgi?id=228987
a67918ba279ad4842b6ae84a79c3f1c0cdc35ace Avoid infinite recursion...
     https://bugs.webkit.org/show_bug.cgi?id=228978
d341f67de0033adcf1ec6373ace6a54b06c4a031
     Cherry-pick ANGLE: Revise WebGL's shaderSource validation
     https://bugs.webkit.org/show_bug.cgi?id=228951
1e2714d981e97de8234ba055570dfdf56e8b6944
     3.5 MB system-wide footprint impact due to thread-locals...
     https://bugs.webkit.org/show_bug.cgi?id=228240
d32e5cca34081997d32504b0b56c18b9703ff3be
     Build Default Metal library offline
     https://bugs.webkit.org/show_bug.cgi?id=227333
33702279faccfd4c8d1c8a6d549925f9ca9a4e8f
     WebGL2 demo doesn't work due to failing compilation....
     https://bugs.webkit.org/show_bug.cgi?id=226865
0a075885d242db38c4e435a6597173dc3b082173
     rAF driven WebGL submits excessive amount of GPU work...
     https://bugs.webkit.org/show_bug.cgi?id=227059
f38a92b3e7c17efda269caa7066e7ffe2f828e72
     WebGL shader link error in iOS 15 beta: "Internal error..."
     https://bugs.webkit.org/show_bug.cgi?id=227723
98d48f011d561531470d97f26a022767b5452fb7
     REGRESSION (r279466):  [Big Sur] webgl/1.0.3/conformance &...
     https://bugs.webkit.org/show_bug.cgi?id=227596

Bug: angleproject:6471
Change-Id: I07166d0dc4b5c3579d98353485b3245b81c7b882
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3194322
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Kyle Piddington <kpiddington@apple.com>
2021-10-04 21:47:00 +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 9184973fc1 Add GetCompressedTexImageANGLE to ANGLE_get_image
Includes front-end support for reading back compressed texture images.
Back-end support is incomplete and will be implemented in a future CL.

CL authored by cnorthrop@google.com.

Bug: angleproject:6177
Change-Id: I1482b15e5ffec6120f09f51b2718cdbef07c93c8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3163359
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2021-09-20 22:12:38 +00:00
Shahbaz Youssefi 458389f249 Vulkan: Support Linux dma-bufs
This change adds support for EGL_EXT_image_dma_buf_import and
EGL_EXT_image_dma_buf_import_modifiers on top of Vulkan's
VK_EXT_external_memory_dma_buf and VK_EXT_image_drm_format_modifier.

Bug: angleproject:6248
Change-Id: I581987f88e9ddcf351dc721f499f63912dca05f9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3145610
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-09-17 20:04:40 +00:00
Shahbaz Youssefi 371542cd16 Vulkan: Use VK_EXT_load_store_op_none
With read-only depth/stencil attachments, ANGLE utilizes storeOp=NONE to
optimize memory bandwidth (by avoiding write back of tile memory at the
end of the render pass). Simultaneoulsy, this avoids a synchronization
hazard with the next write to that depth/stencil image.

If a framebuffer contains a depth/stencil attachment but it's unused,
ANGLE utilizes loadOp=NONE/storeOp=NONE to effectively remove any memory
bandwidth wasted on the attachment.

Bug: angleproject:5371
Change-Id: I76cbadbf1194041532ac4b690ffe087298f2de51
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3114232
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
2021-09-14 03:30:27 +00:00
Jamie Madill b6e99bb382 Rename and expand shader variable init feature.
This feature now forces both output and unitialized locals to be
initialized by the shader translator. This feature is needed by the
trace validator to ensure we get deterministic behaviour in traces
that exhibit some undefined results.

Bug: angleproject:5133
Change-Id: Id1242cd077a57e891eed217f7671976ce1631a58
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3140216
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2021-09-03 14:47:23 +00:00
Shahbaz Youssefi 58ec0fbfd6 Vulkan: Remove the forceCPUPathForCubeMapCopy workaround
This workaround has been disabled since
https://chromium-review.googlesource.com/c/angle/angle/+/2594707

Bug: angleproject:2822
Bug: angleproject:3055
Change-Id: Ie9cc12c7616cd9e1801dbd92e21822c63f4d0bef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3140214
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2021-09-02 16:32:11 +00:00
Cody Northrop ef96bde8b0 Vulkan: Fix VVL error regarding geometryStreams
Addresses new validation error:

    [ VUID-VkPipelineRasterizationStateStreamCreateInfoEXT-geometryStreams-02324 ] Validation Error: [ VUID-VkPipelineRasterizationStateStreamCreateInfoEXT-geometryStreams-02324 ] Object 0: handle = 0xb400007e8176af60, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xf1034461 | pCreateInfos[0].pRasterizationState pNext chain includes VkPipelineRasterizationStateStreamCreateInfoEXT, but geometryStreams feature is not enabled. The Vulkan spec states: VkPhysicalDeviceTransformFeedbackFeaturesEXT::geometryStreams must be enabled (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkPipelineRasterizationStateStreamCreateInfoEXT-geometryStreams-02324)

The validation was added in this commit:
bdaec8454a

Test: World of Kings MEC
Bug: b/198101940
Bug: angleproject:6339
Change-Id: I3cfacc20d231d246500e83451c9ec6b74d9372f2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3127942
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2021-08-30 18:50:39 +00:00
Cody Northrop 5f092f8b51 FrameCapture: Support glProgramBinary
This CL allows applications to use glProgramBinary. Normally this is
a problem because we need program source in order to recreate shaders
in use during mid-execution capture. Use of program binaries
means an app can start and render frames without having submitted
source for that run.

To support this, we will embed program source into ANGLE's binary
format. This will allow us to extract it when the app submits the
binary. We will only embed this when capture is enabled to prevent
increased binary size in the common case. Since this changes ANGLE's
binary format, apps will recreate binaries when capture is enabled.

Additionally, we can't allow captures to have glProgramBinary calls
in the middle of captured frame ranges, so intercept those calls and
replace with a full linking sequence.

Changes include:

- Add new frontend feauture enableProgramBinaryForCapture that allows
  OES_get_program_binary during capture.
- Update ANGLE's binary format to include program source when
  capture is enabled.
- Update maybeOverrideEntryPoint to handle multiple new calls
  instead of a single call.
- Override calls to glProgramBinary that occur mid-capture
  to instead emit a full GenerateLinkedProgram sequence.
- Add checks for created/attached shaders during FrameCapture since
  they won't be available for programs populated by the app using
  glProgramBinary.

Test: Fortnite MEC
Bug: b/180418810
Bug: angleproject:5658
Change-Id: Ib2a0e9e434d3ee0f384d128c48b2a7d4834f5b0f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3105390
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2021-08-27 04:15:32 +00:00
Jamie Madill 2f45d93d5b Capture/Replay: Init shader outputs during self-tests.
This forces all uninitialized variables to have default values.
For instance if the application doesn't initialize the output
color, or a varying that's use in the output, this will ensure we
don't use any undefined values in the computation.

Found when working on a re-trace of T-Rex, which doesn't write to
the alpha channel in the final rendering pass. Also fixes undefined
values in GLSLTest.InactiveVaryingInVertexActiveInFragment.

Bug: angleproject:5133
Change-Id: Ia291338e5adf23dab5263cb2ebe737dc05852d3e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3110225
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
2021-08-21 11:25:50 +00:00
Jamie Madill d2d1f41fdc Add EGL extension to create window with a swap interval set.
On Vulkan this allows creating a window once without needing to
recreate the swapChain after we specify the swap interval.

Also adds a simple regression test and EGL enum assertion
printing formatting.

Bug: angleproject:5133
Change-Id: I72af124cb0e8f7cddfa810988a9862c0f36a0e46
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3097806
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2021-08-20 20:31:34 +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
Alexey Knyazev eb458fbe59 GL: Add emulateImmutableCompressedTexture3D workaround
The workaround replaces glTexStorage3D with a series
of glCompressedTexImage3D calls.

Bug: chromium:1060012
Change-Id: I08e026e68dd697654cc4ab8feb190a35e56ea133
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3103070
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2021-08-18 21:57:38 +00:00
Kenneth Russell ff64d2c7e5 Choose direct-to-Metal translator through a feature.
Define directMetalGeneration in FeaturesMtl.h. If
ANGLE_ENABLE_METAL_SPIRV is defined to 1 (still the default),
directMetalGeneration defaults to false. It can be overridden via the
standard ANGLE mechanism:
  ANGLE_FEATURE_OVERRIDES_ENABLED=directMetalGeneration

It can also be overridden by instantiating angle_end2end_tests with
the directives:
  WithDirectMetalGeneration(ES2_METAL())
  WithDirectMetalGeneration(ES3_METAL())

These directives aren't working properly yet though. The
direct-to-Metal compiler is instantiated, but the _DirectMetalGen
versions of the tests fail. They pass when switching the Metal
backend's default behavior using the above environment variable. This
will be debugged in follow-on CLs.

Thanks to syoussefi@ for the prototype of this CL:
https://chromium-review.googlesource.com/3076129

Bug: angleproject:5505
Change-Id: I188ab89abc75bf89c5ed2d90102af311feaa1960
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3079083
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
2021-08-11 20:58:45 +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