121 Commits

Author SHA1 Message Date
Chris Bracken
b928888b81 [macOS] Eliminate Vulkan hack for macOS < 10.14 (flutter/engine#37498)
Eliminates an undef of VK_USE_PLATFORM_METAL_EXT that works around some
unguarded `@available` checks for macOS 10.13. Our minimum macOS SDK is
now macOS 10.14 so we can safely assume Metal support since it's a
requirement for macOS 10.14.

Issue: https://github.com/flutter/flutter/issues/114445
2022-11-17 14:54:34 -08:00
gaaclarke
af036b8857 Turned on performance-unnecessary-value-param everywhere. (flutter/engine#37447)
* Turned on performance-unnecessary-value-param everywhere.

* linux host additions

* ios patch

* reverted bad fix

* revert bad fix

* another ios patch

* removed lint fix printer
2022-11-09 20:55:13 +00:00
Kaushik Iska
b85721b43d [Impeller] Implement GPU Surface Vulkan for Impeller (flutter/engine#37215) 2022-11-01 21:48:17 +00:00
Kaushik Iska
1941c2ca48 [Impeller] Wire Flutter's own VulkanMemoryAllocator implementation (flutter/engine#37018) 2022-10-27 20:57:54 +00:00
Dan Field
f7b80f7a02 Roll vulkan-deps (flutter/engine#36769) 2022-10-16 23:52:05 +00:00
gaaclarke
e41c775200 Removed instances of unnecessary values (flutter/engine#36221) 2022-09-26 21:28:04 +00:00
Dan Field
f7163f555c Roll SwiftShader, ANGLE, use SwANGLE in test harnesses (flutter/engine#33814)
Roll Swiftshader, ANGLE, and Vulkan deps.

Updates license bot for new locations of licenses and new files
in roll.

Converts unit test harnesses to use SwANGLE, which is the
supported way of using SwiftShader as a software backend for GLES.

Updates goldens due to swiftshader changes.

Fixes up include paths to avoid directly including third_party
code by that name, which is unlikely to work in other build
environments.

Includes upstream patches to ANGLE and SwiftShader to build in our
windows environments, as well as patches to Skia to support
defining the location of VulkanMemoryAllocator and a patch to ANGLE
to support opting into a newer version of VMA.
2022-06-23 16:43:39 -07:00
Chris Bracken
09285aac02 Use empty in place of size checks vs 0 (flutter/engine#33151) 2022-05-06 13:09:04 -07:00
eggfly
f3efac3388 [windows] Support win_debug_x86 compilation target in engine (flutter/engine#30417) 2022-03-15 20:10:10 -07:00
ColdPaleLight
aa63b8f801 Migrate the API of GrDirectContext about resource memory limit (flutter/engine#31977) 2022-03-14 16:50:10 -07:00
Brandon DeRosier
bae75ce21d Vulkan embedder GLFW example (flutter/engine#31213) 2022-02-03 14:21:11 -08:00
Brandon DeRosier
d683f9a0c7 Vulkan support in the Embedder API (flutter/engine#29391) 2022-02-02 00:55:21 -08:00
Brandon DeRosier
2d4f908b9d Add FML_ prefix to fml/build_config.h macros (flutter/engine#31141) 2022-01-31 11:53:51 -08:00
Brandon DeRosier
94feab302c Source the Vulkan headers from KhronosGroup/Vulkan-Headers (flutter/engine#31097)
Use Khronos Vulkan-Headers repository instead of Vulkan-Docs
2022-01-27 14:34:04 -08:00
Yilong Li
193d6b62d6 [fuchsia] Use upstream FUCHSIA_buffer_collection extension. (flutter/engine#30911)
This updates Flutter engine to use the upstream FUCHSIA
buffer extension collection. It removes the obsolete
vkSetBufferCollectionConstraints() and replaces it with
vkSetBufferCollectionImageConstraints().
2022-01-20 16:05:23 -08:00
Zachary Anderson
78d9e276e2 Fix some clang-tidy lints for Linux host_debug (flutter/engine#29734) 2021-11-18 13:08:01 -08:00
Brandon DeRosier
4136d0117f Enable Skia's Vulkan backend on all non-mobile platforms, and test SwiftShader Vulkan on all GL unittests platforms (flutter/engine#29520) 2021-11-16 15:27:25 -08:00
David Worsham
877ab26be3 fuchsia: Use buffer_collection_x extension (flutter/engine#28683) 2021-09-17 15:31:26 -07:00
David Worsham
657b63f499 fuchsia: Convert vulkanb headers to DEPS (flutter/engine#28676) 2021-09-16 22:39:06 -07:00
freiling
6ad8eb6ec7 [fuchsia] boot lockup debugging improvements (flutter/engine#27459) 2021-07-22 13:06:01 -07:00
Adlai Holler
3aaa10d762 Disable Skia reduceOpsTaskSplitting option (flutter/engine#26568)
This option will be the default in Skia soon. Per discussion in #26067, let’s be explicit about disabling it for the time being, and we can revisit the flag in the future if desirable.
2021-06-17 13:11:40 -07:00
Chris Bracken
13cf185e1c Correct setup-related typos (flutter/engine#24846)
Corrects uses of setup as a verb to 'set up', leaves noun/noun-phrase
forms of setup as 'setup'. Also settles on 'teardown' as opposed to
tear-down for consistency across the codebase.

A few other minor comment/wording corrections.
2021-03-08 17:31:10 -08:00
Yilong Li
2e1ab24820 vulkan: Fix build issue due to missing VK_RESULT_RANGE_SIZE (flutter/engine#24829) 2021-03-05 15:59:02 -08:00
David Reveman
4e916d1ff6 Fix vulkan surface leaks. (flutter/engine#24372)
This fixes 3 memory leaks:

1. Destroys local vulkan buffer collections.
2. Releases image2 resource in Scenic.
3. Deregister buffer collections from Scenic session.

Co-authored-by: David Reveman <reveman@google.com>
2021-02-12 17:15:29 -05:00
David Reveman
3d688d6424 Remove unnecessary buffer collection image constraints. (flutter/engine#24347) 2021-02-11 15:56:02 -08:00
Dragoș Tiselice
ef98b148e5 Switched engine to use buffer collection. (flutter/engine#23488)
The old way of allocating images meant that one would have to make
sure that Scenic and Flutter were using exactly the same pixel
formats. This patch removes the old image allocation and replaces
it with a sysmem API that uses buffer collections instead. This
permits a smooth negotiation of formats between the two systems.
2021-01-26 12:17:13 -05:00
xster
e618085f1c Share Android surface GrDirectContext (flutter/engine#23798) 2021-01-22 12:44:02 -08:00
Basit Ayantunde
2d809abbb3 removed variable-sized array (flutter/engine#23102)
This is undefined behavior. I've replaced it with std::vector instead

Co-authored-by: Zachary Anderson <zanderso@users.noreply.github.com>
2021-01-14 14:33:29 -08:00
Jason Simmons
b76d246acb Reformat some files that were not auto-formatted (flutter/engine#21940) 2020-10-23 18:57:03 -07:00
Chris Bracken
9482036304 Revert "Define SK_VULKAN for clang-tidy runs (#21927)" (flutter/engine#22012)
This breaks linting on other targets that include skia headers that do
ifdef checks on SK_VULKAN.

This reverts commit 939c3de58aa3ebeed23221b84883aa7bd7365f2e.
2020-10-20 15:17:05 -07:00
Chris Bracken
939c3de58a Define SK_VULKAN for clang-tidy runs (flutter/engine#21927)
When linting flutter/vulkan/vulkan_window.cc, the call to
GrDirectContext::MakeVulkan is undefined when SK_VULKAN is not defined,
triggering a lint error.

Bug: https://github.com/flutter/flutter/issues/68331
2020-10-19 16:31:07 -07:00
Chris Bracken
aa0ad5a83e Update FLUTTER_NOLINT uses to include issue link (flutter/engine#21921)
In an upcoming patch, we'll enable enforcement that all FLUTTER_NOLINT
comments include an issue link. This migrates the remaining uses to that
format.

Bug: https://github.com/flutter/flutter/issues/68273
2020-10-16 16:08:36 -07:00
Chris Bracken
ef868edd36 Eliminate FLUTTER_NOLINT where possible (flutter/engine#21904)
This removes most of the remaining FLUTTER_NOLINT comments and opts
these files back into linter enforcement.

I've filed https://github.com/flutter/flutter/issues/68273 to require
that all FLUTTER_NOLINT comments be followed by a GitHub issue URL
describing the problem to be fixed.
2020-10-16 12:44:49 -07:00
egdaniel
19f8afc6bc Update flutter to pass Skia the VkImageUsageFlags and Samples (flutter/engine#21842)
Previously Skia did not require the clients to pass in the usage flags and Skia would just assumed they contained specific ones depending on how the client wrapped the VkImage. Now Skia allows the client to pass in the specific usage flags used so that Skia knows exactly what type of operations are legal without having to guess/assume what the client did.

Also update to set the sample count as well while I'm in here.
2020-10-14 13:55:09 -07:00
bungeman
fd93916c27 Replace kLegacyFontHost_InitType with kUnknown_SkPixelGeometry. (flutter/engine#21474)
Skia is removing the deprecated legacy display setting globals and
associated kLegacyFontHost_InitType. This change replaces all such uses
with default surface properties with no special flags and an unknown
pixel geometry. Flutter never set the associated globals, leaving them
with their initial default values, which were no special flags and
horizontal RGB pixel geometry. The values used here are different but
this change should make no difference as Flutter never mentions
SkFont::kSubpixelAntiAlias to take advantage of the pixel geometry.
2020-09-29 12:46:08 -04:00
Chris Bracken
2586db3b22 Clean up C++ includes (flutter/engine#21127)
Cleans up header order/grouping for consistency: associated header, C/C++ system/standard library headers, library headers, platform-specific #includes.

Adds <cstring> where strlen, memcpy are being used: there are a bunch of places we use them transitively.

Applies linter-required cleanups. Disables linter on one file due to included RapidJson header. See https://github.com/flutter/flutter/issues/65676

This patch does not cover flutter/shell/platform/darwin. There's a separate, slightly more intensive cleanup for those in progress.
2020-09-11 21:18:35 -07:00
egdaniel
0ee7007d63 Remove use of ctors on Skia Vulkan struct (flutter/engine#20630)
Skia is removing the ctors on these structs so removing them.
2020-08-19 13:18:25 -04:00
David Worsham
4e60afdf2a Fix broken shell_unittests on Fuchsia (flutter/engine#20422)
Fixes https://github.com/flutter/flutter/issues/53399
2020-08-11 17:31:25 -07:00
Greg Spencer
3a0464eb42 Fix lint errors in vulkan directory. (flutter/engine#19991)
This fixes lint errors in the vulkan directory. This might be a little more controversial, but the reason that the lints were failing here was because of an include path problem that I think I solved.
2020-08-10 09:50:28 -07:00
Adlai Holler
e5614964f4 Use the GrDirectContext factories instead of deprecated GrContext ones (flutter/engine#19962)
This is part of a larger effort to expose the difference between GrDirectContext,
which runs on the GPU thread and can directly perform operations like uploading
textures, and GrRecordingContext, which can only queue up work to be delivered
to the GrDirectContext later.
2020-07-28 13:32:09 -07:00
gaaclarke
ee0e1788d9 Made the linter print out more information in its output and fixed bugs (flutter/engine#19895) 2020-07-22 15:38:09 -07:00
David Worsham
cbd3cd9c0d fuchsia: Enable most unittests (flutter/engine#19583)
Tweak the primary flutter build rule so that fuchsia is more similar to
other platforms in how tests and the shell are built.

Only embedder_unittests and GLFW tests are disabled on Fuchsia now.

TEST: Ran unittests on host/fuchsia; workstation on fuchsia
BUG: fxb/53847, fxb/54056
2020-07-13 17:36:19 -07:00
David Reveman
e14e4ad37f [fuchsia] Use memory_requirements_2 extension. (flutter/engine#19678)
This is required by some Vulkan 1.0 drivers. For example,
MoltenVK through goldfish ICD when running in the emulator.

Co-authored-by: David Reveman <reveman@google.com>
2020-07-13 17:37:20 -04:00
Guruji Panda
0ffadc0eaa Fix include paths to help building flutter runner for Fuchsia in Google3. (flutter/engine#18840)
Include header file without absolute path if the header file belongs to
the same directory as source file.
2020-06-06 16:05:04 -07:00
egdaniel
077e9639c5 Update flutter skia flush calls to new flush and submit api (flutter/engine#18421)
* Update flutter to use new skia flushing/submit api

This has no functional change, just moving to the new api calls.

* Update vulkan_swapchain.cc

* Update embedder_external_view_embedder.cc
2020-05-15 11:40:21 -04:00
George Wright
56bdcec5ae Enable Vulkan validation layers for shell_test (flutter/engine#17684) 2020-04-17 13:00:02 -07:00
George Wright
3e1e1b342d Use VK_LAYER_KHRONOS_validation only on Fuchsia (flutter/engine#17683) 2020-04-13 16:45:03 -07:00
Chinmay Garde
929fb3f825 Remove checks for the always true using_fuchsia_sdk flag in all GN files. (flutter/engine#17261) 2020-03-23 18:31:02 -07:00
Chinmay Garde
8f5f888826 Use the standard [[nodiscard]] attribute instead of an FML macro. (flutter/engine#17100) 2020-03-11 13:36:01 -07:00
George Wright
69e635c0fc Enable shell_unittests on Fuchsia with Vulkan dependencies. (flutter/engine#16376)
This also adds a dependency on SwiftShader's Vulkan frontend.
2020-02-06 15:07:01 -08:00