Commit Graph

3324 Commits

Author SHA1 Message Date
Benjamin Doherty
dc1c5529c0 Update RELEASE_NOTES for 1.9.7 2020-11-02 11:00:55 -07:00
Benjamin Doherty
8b8d563b0f Bump version to 1.9.7 2020-11-02 11:00:09 -07:00
Ben Doherty
dcca236f60 Fix bug with Fence timeouts (#3243) 2020-11-02 10:47:28 -07:00
Philip Rideout
70dba2398e gltfio: add createInstance() to AssetLoader.
Note that this API is on the loader rather than the asset. This is
because the loader knows how to create Filament entities by traversing
a cgltf node hierarchy.

Animation on dynamically added instances is not yet supported.

We did not add destroyInstance() because gltfio favors flat arrays for
long term storage of entity lists and instance lists, which would be
slow to shift. We also wish to discourage create/destroy churn since it
is more efficient to pre-allocate instances and selectively add them
into the scene.

Fixes #3137.
2020-11-02 09:47:14 -08:00
Philip Rideout
47521d70a1 gltfio: fix ASAN issue when consuming invalid animation.
Release builds do not call cgltf_validate() so it was possible to
read out-of-bounds animation data when encountering a badly formed glTF
file with mismatched counts between sampler inputs and outputs.
2020-10-31 15:17:15 -07:00
Philip Rideout
468992f4cd gltfio: do not segfault on invalid primitives. 2020-10-31 13:28:13 -07:00
Philip Rideout
0db7057983 Vulkan: disable unreliable blit diagnostics. 2020-10-31 12:37:42 -07:00
Philip Rideout
8a63834607 Vulkan: fix layout mismatch after blitting to swap chain. 2020-10-31 12:37:42 -07:00
Philip Rideout
4e4d4f9ee3 Vulkan: add blit support for depth and MRT. 2020-10-31 10:29:25 -07:00
Philip Rideout
6abef94d95 mathio: add ostream operator for quaternions. 2020-10-29 17:04:03 -07:00
Philip Rideout
4b1c557bb1 Vulkan: fix color attachment list in first subpass.
This fixes a slew of validation warnings and errors seen when multiple
subpasses are enabled, starting with:

    Attachment 1 not written by fragment shader; undefined values will
    be written to attachment

The Vulkan driver was using the same color attachment list for both
subpasses, so the first subpass had unused attachments.

Note that Vulkan makes a distinction between color attachments and input
attachments and requires separate lists to be supplied for each subpass,
but our Driver API consolidates everything into a single list. This
should perhaps be refactored at a later date.
2020-10-29 15:03:34 -07:00
Philip Rideout
94a1eb27b4 Do not declare unused fragColor in GLSL.
This fixes a Vulkan validation warning when building a pipeline that
does not have a color attachment.
2020-10-29 11:08:13 -07:00
Philip Rideout
a9754273b0 Vulkan: minor fix for diagnostic output. 2020-10-28 15:41:07 -07:00
Philip Rideout
2fe4f6cbe7 AutomationEngine: fix regression with screenshots. 2020-10-28 12:58:54 -07:00
Philip Rideout
1159435d47 gltfio: add safety checks to getAnimator. 2020-10-28 11:51:06 -07:00
Philip Rideout
a6f364e0f3 gltfio: fix segfault when consuming invalid file. 2020-10-28 11:50:54 -07:00
Philip Rideout
c6942a52e6 gltfio: refactor the instancing cache.
This prepares for #3137 by moving the mesh cache and material instance
cache out of the loader (where they were transient anyway) and into the
actual asset. This paves the way for a `createInstance()` API.
2020-10-27 10:30:18 -07:00
Philip Rideout
c65dc99771 Fix colorGradingAsSubpass when dithering is off.
This fixes the blank screen seen with Vulkan when all view options are
disabled.
2020-10-26 15:33:42 -07:00
Benjamin Doherty
6971b3b6b0 Update RELEASE_NOTES for 1.9.6 2020-10-26 11:28:06 -06:00
Benjamin Doherty
4270384661 Bump version to 1.9.6 2020-10-26 11:27:08 -06:00
Philip Rideout
82cb13936c Vulkan: warn instead of panic for sampler overflow.
This makes behavior in release builds similar to the OpenGL backend.

In debug builds, we will still assert.
2020-10-23 11:11:35 -07:00
Philip Rideout
212b64ea5f Vulkan: make ReadPixels synchronous.
This makes it so that the PixelBufferDescriptor callback triggers at a
time consistent with other backends.

ReadPixels is still asynchronous in the sense that the callback is
triggered on the main thread. However, it is now guaranteed to trigger
during (or before) flushAndWait(), which is less surprising behavior.
2020-10-22 17:42:07 -07:00
Philip Rideout
2849dc6a2a Fix iOS build break. 2020-10-22 17:03:06 -07:00
Philip Rideout
d84bb82e44 Merge duplicated implementations of toLinear(). 2020-10-22 17:03:06 -07:00
Philip Rideout
5746532b7c Add PNG output to test_ReadPixels. 2020-10-22 17:03:06 -07: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
f55c9ee437 Fix Windows build. 2020-10-22 13:08:09 -07:00
Philip Rideout
06e639ae91 Vulkan: fix destroy-while-used for UBOs. 2020-10-22 11:43:16 -07:00
Philip Rideout
8de19cb582 Vulkan: fix leak with headless swap chain. 2020-10-22 11:43:16 -07:00
Philip Rideout
47b1ece804 Vulkan: Improve refcounting for vertex buffers.
This avoids the following validation error when clients create then
immediately destroy vertex buffers, index buffers, and uniform buffers.

        VUID-vkDestroyBuffer-buffer-00922

        Cannot free VkBuffer that is in use by a command buffer.

Buffers that are used across multiple frames were fine, but
create-and-destroy scenarios were problematic.
2020-10-22 11:39:57 -07:00
Philip Rideout
d47189536f Vulkan: fix thread safety regression in Disposer.
This fixes a regression introduced by 548b28c6e manifesting as
intermittent assertions. The VulkanDisposer gc() should only be called
from the driver thread.
2020-10-22 11:39:46 -07:00
dsternfeld7
4533a42a6f Makes it possible to have multiple instances of ImGuiHelper at the same time
This change fixes an issue where ImGuiHelper would crash on destruction if you created more than one instance at the same time.

This crash occurred when ImGui::DestroyContext() was called, because when the second instance was destroyed there was no current context causing it to crash.

This fixes it by making ImGuiHelper store and manage it's own context.

Having two instances of ImGuiHelper is useful in cases where you want to use imgui with multiple views.
2020-10-22 11:39:33 -07:00
Philip Rideout
853247f32f Vulkan: ReadPixels y-flip workaround. 2020-10-21 17:42:46 -07:00
Philip Rideout
5f6cbc779a Allow test_ReadPixels with SwiftShader. 2020-10-21 16:24:27 -07:00
Philip Rideout
548b28c6e2 Vulkan: improve the ReadPixels implementation.
This adds support for more format conversions and removes a bogus
assert that prevented ReadPixels within beginFrame / endFrame.
This was tested with:

    backend_test_mac --api vulkan --gtest_filter=BackendTest.ReadPixels
2020-10-21 16:04:31 -07:00
Ben Doherty
239246e221 Add ability to specify post-process material output location (#3205) 2020-10-21 12:19:46 -06:00
Philip Rideout
75c4f36f96 Add Dockerfile and test script for SwiftShader.
This adds a Dockerfile and a new bash script that makes it
east to invoke the appopriate Docker commands.

This does not yet enable a GitHub Action because of intermittent
issues that we have not yet ironed out.
2020-10-21 10:50:25 -07:00
Philip Rideout
7260bab7b3 Fix TypeScript binding for TextureUsage. 2020-10-20 14:09:05 -07:00
Ben Doherty
e7250571e7 Add subpass parameter type to materials (#3193) 2020-10-19 16:28:26 -06:00
Philip Rideout
c68d0a4e46 Vulkan: add missing field to VmaVulkanFunctions. 2020-10-19 11:57:37 -07:00
Benjamin Doherty
37d080dfd1 Update RELEASE_NOTES for 1.9.5 2020-10-19 11:50:54 -06:00
Benjamin Doherty
de75b9d125 Bump version to 1.9.5 2020-10-19 11:49:57 -06:00
Philip Rideout
07fd883f9a Vulkan + Android: fix build break.
Fixes #3200.
2020-10-19 09:36:12 -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
Ben Doherty
d14ba856a7 matc: fix some compilation failures still exit with code 0 (#3192) 2020-10-15 14:11:46 -06:00
Ben Doherty
7eec70276e Add release scripts and RELEASE_GUIDE (#3191) 2020-10-15 12:57:38 -06:00
Ben Doherty
4f58a7e5fb Fix Vulkan black screen on Windows with NVIDIA hardware (#3190) 2020-10-15 12:00:42 -06:00
Ben Doherty
30565a5afc Add capture frame button to gltf_viewer (#3189) 2020-10-14 12:43:05 -06:00
Ben Doherty
62d06592d3 VSM: add support for mipmaps and anisotropic sampling (#3185) 2020-10-14 11:48:23 -06:00
Benjamin Doherty
e74e583b97 Fix CocoaPod version 2020-10-13 15:16:25 -06:00