111 Commits

Author SHA1 Message Date
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
George Wright
726dfa2685 Refactor of Vulkan GPUSurface code (flutter/engine#16224)
Co-authored-by: David Worsham <arbreng@gmail.com>
2020-02-04 10:44:35 -08:00
Chinmay Garde
426c48aaac Remove all uses of the redundant flutter_root variable. (flutter/engine#16311)
This was only necessary when the Engine had to build in multiple buildroots
where the sources where checked out at different paths relative to the
buildroot. This is no longer the case and there are already cases GN rules
have been written that mix and match variable usage with the direct
specification of the path to the Flutter sources relative to the sole buildroot.
2020-01-31 21:49:48 -08:00
Dan Field
62a99c60c5 the the fix (flutter/engine#15973) 2020-01-24 12:43:32 -08:00
Kaushik Iska
d6b2b657eb [vulkan] Bundle vulkan validation layer so files (flutter/engine#13930)
Enable vulkan validation for Fuchsia in debug mode as well.
2019-11-25 16:09:56 -08:00
gaaclarke
43dce83fc1 Refactor to passing functions by const ref (flutter/engine#13975)
Moved our code to passing functions by const ref
2019-11-22 12:20:02 -08:00
Chinmay Garde
56e7bf84b1 Wire up Fuchsia SDK related updated for shell dependencies. #8869
This does not actually import the runners into the engine. It only sets up the targets so they need no modifications are necessary when the migration is done. The engine has been verified to build in both buildroots.
2019-05-06 18:01:59 -07:00
Craig Stout
1eb2e9231d Remove old Fuchsia external mem,sem extensions 2019-03-29 11:00:18 -07:00
Craig Stout
1ca8afa1bc [vulkan] Add FUCHSIA external sem/mem extensions
The KHR versions will be renamed once references are removed.

MA-510 #comment
2019-03-26 12:51:40 -07:00
Craig Stout
9be12e78ce [vulkan] Fix Fuchsia build
Stub out VulkanSwapchain.

Test:Fuchsia release *and* debug builds
2018-12-14 14:08:43 -08:00
Craig Stout
50efc8bc35 [vulkan] Define VK_USE_PLATFORM_FUCHSIA
VK_USE_PLATFORM_MAGMA_KHR is old and will be removed.
2018-12-10 10:09:53 -08:00