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>
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>
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>
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>
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>
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>
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>
* 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This CL merges in the ANGLE changes between these two WebKit commits:
https://git.webkit.org/?p=WebKit.git;a=commit;h=8648b353ab1d7730438c2e08319e1a4d64982c31https://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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>