Commit Graph

43 Commits

Author SHA1 Message Date
Powei Feng
480b0878d7 vk: fix validation warnings (#9207)
- Remove extensions that have been promoted to 1.1
- Use vkCreateMetalSurfaceEXT instead of the deprecated
   vkCreateMacOSSurfaceMVK
2025-09-11 23:59:25 +00:00
Ben Doherty
863b1346e1 Rename IOS define to FILAMENT_IOS (#8340) 2025-01-08 13:11:39 -08:00
Ben Doherty
cf91e42847 Switch ASSERT macros to new stream API (#7881) 2024-05-24 20:46:34 +00:00
Ben Doherty
d04b0a5c73 Update Vulkan headers to v1.3.232 (#6256) 2022-11-01 12:38:23 -04:00
Johnathon Selstad
1e3ddd612e Organize Subprojects into Folders in the IDE (#5934)
* Begin Sorting SubProjects into Folders

* Add more subprojects to folders

* Add even more subprojects to folders

* Add further subprojects to folders

* Move the last two projects

* Move Resources to a Resources subfolder

* Remove spaces to be stylistically coherent

* Revert Improper CMake Modifications

* Revert erroneous line removals

* Only specify sdl2's folder on WIN32

* Add the shader subprojects to a Generated folder

* Move shaders to Filament/Shaders
2022-08-17 12:42:21 -07:00
Philip Rideout
1ff57e66aa BlueVKDarwin: Simplify the build and loading process. (#5701)
* BlueVKDarwin: Simplify the build and loading process.

Some of our CMake logic was not necessary because we do not staticly
link against anything for Vulkan.  All entry points are dynamically
loaded.

Some of the load-time code was also needlessly complicated. In fact the
ICD environment variable that we were setting is now deprecated.

I tested this PR with:

- macOS + June LunarG SDK
- Android on a Pixel 6

* Fix up, further simplification.
2022-06-15 16:08:34 -07:00
Philip Rideout
378600dc79 Update BlueVK and use Python 3. (#5698)
This will allow us to fix the validation error related to
VK_KHR_portability_enumeration.

Also, macOS comes with Python 3 nowadays so we're upgrading the script
from Python 2.
2022-06-15 10:59:00 -07:00
Philip Rideout
5837adf45f Remove stale comment and update the debugging doc. 2022-06-01 15:02:55 -07:00
Romain Guy
ab9dbb22cc Remover prebuilt MoltenVK (#5623) 2022-06-01 14:49:50 -07:00
Philip Rideout
e1e7854d97 BlueVK: remove flaky operator<< for flags, update GitHub paths.
Two changes:

1) Khronos has moved from "master" to "main".

2) BlueVK was attempting to generate reasonable "operator<<" support for
bit flags but this was buggy due to type aliases. Since we weren't using
it anyway, I simply removed this functionality from BlueVK.
2022-03-08 16:58:21 -08:00
Philip Rideout
9d5220e28e Regenerate BlueVK for Vulkan 1.3. 2022-03-08 16:57:56 -08:00
Philip Rideout
69fb7170a7 Fix typo in BlueVK script that caused segfault.
Fixes #5026.
2022-01-25 10:23:07 -08:00
Philip Rideout
43948421d7 Re-generate BlueVK and update to latest Vk headers.
Fixes #5026.
2022-01-25 09:14:23 -08:00
Philip Rideout
328650df17 BlueVK: Do not double initialize vkGetInstanceProcAddr.
This fixes a double-initialization problem for one of the function
pointers, and also updates the BlueVK generator to fix issues with the
latest Khronos XML file.

The corollary C++ changes will be made in a subsequent PR since they
will be difficult to review.

See #5026.
2022-01-24 13:40:49 -08:00
Joel Winarske
687f4aff13 Flags to support embedded Linux (#4911)
- FILAMENT_SKIP_SDL2=ON is used to  skip dependencies of sdl2 and sdl2 CMake

- FILAMENT_LINUX_IS_MOBILE is used for Mobile build

Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
2021-12-01 08:31:06 -08:00
Joel Winarske
af9b670cfd Wayland 2021-11-30 11:18:57 -06:00
Mathias Agopian
5447baab00 rework Vulkan image layout transitions
The main issue that gets fixed here are:

- VK_IMAGE_LAYOUT_UNDEFINED cannot be used if the image content is to 
be preserved after the transition. Unfortunately, there is more than a 
few places in the VK backend where we use VK_IMAGE_LAYOUT_UNDEFINED on
images that are later used as sources.

- accessing an image memory from the host is only supported if the the 
layout is PREINITIALIZED or GENERAL. However, images in the staging
pool were transitioned to other layouts and put back into the pool,
later they would be mapped/memcpy'ed into. Instead we now always use
the GENERAL layout and never change it.

- images that where in the pool where transitioned using the miplevel
of the texture we were copying into, however this didn't make sense
because images from the pool don't have mip levels.


As part of these fixes, we also refactor imageLayoutTranstion(),
because there was two copies of this function, one specific to texture
and another one more generic. We now always use the more generic one,
with a new helper for textures.


Note: didn't fix "readPixels" which has at least problem (1), because
it's a tricky implementation, and it requires more toughts.
2021-10-01 13:20:21 -07:00
Ben Doherty
64c5dc63ab Audit usage of UTILS_PUBLIC and fix bluegl linking warning (#3988) 2021-07-12 17:09:13 -07:00
Philip Rideout
e7e19a88e6 Add missing files to BlueVK. 2021-05-07 09:22:23 -07:00
Romain Guy
c66915209e Update our build to the latest and greatest (#3902)
The new requirements are as follow:
- CMake 3.19
- Ninja 1.10
- Android Studio 4.2
- Android NDK 22.1
- Gradle 7.0
- Kotlin 1.5
2021-05-06 10:13:10 -07:00
Philip Rideout
cb4ffe39f4 Fix build break. 2021-05-05 15:00:59 -07:00
Philip Rideout
03fcbfea62 Regenerate BlueVK and update MoltenVK binaries. (#3897)
LunarG just released a new SDK so we're updating everything.
2021-05-05 14:15:52 -07:00
Philip Rideout
4d18c0d61c BlueVK: use slog for dlopen error message. 2021-02-11 12:51:40 -08:00
Philip Rideout
6fa8f48be5 BlueVK: optionally consult environment variable.
One of Filament's Linux clients at Google wishes to specify a special
path to the SwiftShader library that proffers Vulkan entry points, and
this path can only be determined at run time.

An environment variable seems like the easiest way to support this
functionality. To prevent a security hazard, the env var is checked only
if a special build-time flag is enabled.
2021-02-11 12:51:40 -08:00
Philip Rideout
7fbd00e59b Repair Windows build, maybe. 2020-11-09 08:35:43 -08:00
Philip Rideout
f814138f83 Regenerate BlueVK, use a C++ namespace.
This moves all Vulkan entry points into the bluevk namespace
to avoid conflicts with other Vulkan loaders.

This also updates the header files and loader code to version 1.2.159 of
the Vulkan spec, which is currently available at the following links.

https://khronos.org/registry/vulkan/specs/1.2/html/vkspec.html
87451c55aa
2020-11-09 08:35:43 -08:00
Philip Rideout
964a1bd7f2 BlueVK: improved error messaging. 2020-11-03 10:23:06 -08:00
Philip Rideout
2e10fe6680 PlatformVkLinux now supports all combos of XLIB and XCB.
You can now build Filament with support for both X11 APIs, or neither.
If both are supported, run-time selection is achieved using a SwapChain
flag.

Supporting only one API at build time (or neither) is useful because our
list of "required" VkInstance extensions can vary according to which
API's are supported. During VkInstance creation, we do not have a priori
knowledge about what kinds of swap chains will be created. (headless vs
non-headless, XCB vs XLIB, etc)

Note that some Vulkan implementation (e.g. some builds of SwiftShader)
only support XCB.
2020-10-22 16:55:25 -07:00
Philip Rideout
5ceb9fc5d5 Add optional XCB support to PlatformVkLinux.
This allows clients to build the Vulkan backend with either XLIB or XCB
support. I did a quick smoke test of the XCB option, but for now we are
continuing to default to XLIB. Note that the native window type used to
create the swap chain differs between these two API's.
2020-10-19 09:24:13 -07:00
Philip Rideout
7471237178 Linux fixes for headless SwiftShader. 2020-10-07 11:24:33 -07:00
Philip Rideout
29bb48be09 Regenerate BlueVK. 2020-08-22 11:57:58 -07:00
Philip Rideout
6d733091e0 Update our BlueVK generator and prep for new headers. 2020-08-21 16:46:05 -07:00
Philip Rideout
dc891f7299 CMake: specify -fPIC at root level.
Fixes #1881.
2020-07-13 16:07:07 -07:00
Philip Rideout
ad27d10503 Do not clobber VK_ICD_FILENAMES.
Fixes #2343
2020-04-07 16:28:01 -07:00
Romain Guy
a4a1bf07aa Use our own constants instead of M_PI, M_*, etc. (#1733)
These constants are not part of the standard. We instead use our own
constexpr definitions in the filament::math namespace, as part of
the scalar.h include.
2019-10-02 15:31:38 -07:00
Romain Guy
b1242163f7 Make CMake 3.10 the minimum version, add LTO option (#1316)
* Make CMake 3.10 the minimum version, add LTO option

* Install a newer CMake on Linux CI builds

* Update LLVM and Cmake on Windows CI

* Update build/windows/ci-common.bat

Co-Authored-By: Ben Doherty <benjdoherty15@gmail.com>

* Update formatting

* Apply suggestions from code review

* Update build/windows/ci-common.bat

* Update CMake

* Switch Android projects back to CMake 3.6
2019-06-19 12:53:03 -07:00
Romain Guy
4789e81ebc Require API level 21, not 24 (#599)
* Require API level 21, not 24

Fixes #594

* Update README.md
2018-12-07 16:17:57 -08:00
Ben Doherty
29119c7248 Add iOS support to Filament (#360) 2018-10-18 12:42:13 -07:00
Ben Doherty
804c974819 Fix, Vulkan samples not compiling on Windows (#306) 2018-09-25 13:28:32 -07:00
Philip Rideout
0ff40948dc Allow macOS developers to optionally use an SDK version of Vulkan.
This looks for VULKAN_SDK at build time, and if present it tells
Filament to use the `libvulkan.1.dylib` that's located there. Otherwise
it falls back to our old loading strategy, which uses a bundled version
of MoltenVK that allows us to avoid requiring installation of the
LunarG SDK.

I tried this out an it works for me...

Closes issue #238.
2018-09-13 08:07:55 -07:00
Romain Guy
33c44ee9ce Install BlueGL (#148)
* Add READMEs to install packages

* Don't install BlueVK headers, install BlueGL lib
2018-08-27 08:50:35 -07:00
Tact Yoshida
ad49986245 Remove execute permissions 2018-08-06 10:36:54 -07:00
Romain Guy
b3d758f3b3 Initial commit 2018-08-03 10:38:22 -07:00