Commit Graph

6379 Commits

Author SHA1 Message Date
Benjamin Doherty
180c326bb7 Include sstream.h in distribution headers 2024-05-21 10:11:44 -07:00
Mathias Agopian
7d80975c3c add getReasonLiteral() on TPanic
currently it only returns the format string.
2024-05-17 16:53:31 -07:00
Sungun Park
813e6f805b Update combine_multiview_images flag (#7867)
Set combine_multiview_images to false by default as it's the desirable
setting for most Android devices.

Set the flag to true for GUI by default.

Put the `Combine Multiview Images` checkbox under the `Stereo mode` box
for an easier access.
2024-05-17 19:42:23 +00:00
Powei Feng
450644ccd5 Add vk/gl conditions for enabling clip distance (#7861) 2024-05-17 17:39:32 +00:00
Mathias Agopian
979421c019 fix/remove wrong asserts 2024-05-17 10:01:50 -07:00
Mathias Agopian
18ccf0cd8d change the morphing API so it uses only one buffer per renderable
The current API allowed to have a buffer for each primitive in a
renderable. We instead restrict the API so that there is a single 
MorphTargetBuffer for the whole renderable, shared by all primitives.
The buffer can be shared thanks to the "offset" parameter on
setMorphTargetBufferAt().

Also
- fix FMorphTargetBuffer::updateDataAt()
- add support for the "offset" parameter of setMorphTargetBufferAt()
2024-05-16 14:11:07 -07:00
Ben Doherty
5b80407f6c Implement push constants for Metal (#7858) 2024-05-16 13:20:12 -07:00
Powei Feng
a9f3971989 Refactor stereo build flags and configs (#7857)
- Add option to build.sh to build for paritcular stereo
   techniques (default to NONE). Only applies to samples.
 - Consoldiate viewer checkbox for debugging stereo rendering
 - Add DriverConfig flag for stereoscopic type so that it can
   be used to determine availability of the feature and
   (to be completed) enable corresponding GPU features.

Co-authored-by: Mathias Agopian <mathias@google.com>
2024-05-16 17:37:27 +00:00
Powei Feng
ab12984912 Add Mesa software rasterizer BUILD.md instructions (#7860) 2024-05-16 10:03:50 -07:00
Ben Doherty
1d4f1fe71f Metal, fix callbacks being called only once (#7856) 2024-05-15 10:50:10 -07:00
Mathias Agopian
c93aa4c90d minor libutils improvements 2024-05-14 13:22:38 -07:00
Mathias Agopian
499939ed3c backend: bindPipeline now takes const& 2024-05-14 13:21:38 -07:00
Mathias Agopian
6be97ee01d backend: zero-cost ES2 draw()
we use a different hook for the draw() call when on an ES2 context,
this eliminates completely the overhead of supporting ES2 for the draw
call. draw calls are expected to be the most common calls.
2024-05-14 13:21:24 -07:00
Powei Feng
7267696cbf vk: fix dynamic scissor validation error (#7853) 2024-05-14 19:08:50 +00:00
Powei Feng
85eb724a90 Reduce explicit swiftshader paths (#7848)
- Use custom ICD path to enable Swiftshader instead of
   specifying direct path to the lib.
   - Remove unused `swiftshader` directory in `build`
   - Remove swiftshader options in `build.sh` and cmakefiles
   - Change BUILD.md
 - Correctly handle XCB-only swapchain surface in VulkanPlatform
   for swiftshader.
 - Refactor `VulkanPlatform::ExtensionSet` so that `utils::CString`
   is used instead of string_view, so that we don't get into
   tricky lifetime issues with `const char*`
2024-05-14 17:40:54 +00:00
Mathias Agopian
6dd6db89d5 align android libraries to 16 KiB 2024-05-13 23:14:32 -07:00
Mathias Agopian
c76f67c139 fix typo checking FILAMENT_ENABLE_MATDBG
this macro must be checked with #if not #ifdef
2024-05-13 23:14:13 -07:00
Sungun Park
6fc16bdcda Release Filament 1.51.8 2024-05-13 20:53:36 +00:00
Mathias Agopian
4f021583f1 backend tests were broken by a change in TargetBufferInfo
- a field was added, which broke the layout of the structure. We fix it
by adding constructors which will handle the old and new way of
initializing this structure.

- one of the test needed a hash update

- OpenGLContext wrongly asserted when trying to unbind texture 0
2024-05-10 14:39:22 -07:00
Powei Feng
ef15a29c0c vk: fix missing lib for backend test 2024-05-10 13:00:00 -07:00
Benjamin Doherty
a0472d3c9f Rename Metal log message 2024-05-10 11:25:34 -07:00
Ben Doherty
54a800a25d Metal: implement more accurate buffer tracking (#7839) 2024-05-10 11:14:41 -07:00
Powei Feng
7f8fbe586c gl: push constant small clean-up (#7841) 2024-05-10 10:23:32 -07:00
Powei Feng
6f2c45c76d Add push constants (#7817)
- Push constants is a small set of bytes that can be recorded
   directly on the command buffer.
 - Implemented it for the vulkan/gl backend.
2024-05-09 16:14:03 -07:00
Ryan
ad60008b6a ryanmyers: Improve logging for Metallib function lookup failures (#7836)
If a .metallib was compiled with a target iOS version that's newer than
the current device, loading the .metallib may succeed, but finding main0
(or any other function in it) will fail. Currently, this causes a crash
due to an assert. Logging the error and returning
MetalFunctionBundle::error() makes the crash slightly easier to
diagnose.

(Note that in practice, this will probably be a useless "Compiler
encountered an internal error" message -- the GPU backend is crashing,
and the Metal stub library sees XPC_ERROR_CONNECTION_INTERRUPTED. It
retries up to 3 times (crashing each time) and then gives up.)
2024-05-09 10:49:41 -07:00
Mathias Agopian
d87f9b621b add a simple tranformmanager unit test
this was to test issue #7827
2024-05-09 09:00:41 -07:00
Ben Doherty
1b38cda0d5 Add preferredShaderLanguage Java bindings (#7835) 2024-05-08 14:42:40 -07:00
Ben Doherty
a1dea7b1fa Metal: log slow buffer allocation times (#7834) 2024-05-08 14:39:53 -07:00
Mathias Agopian
744708b5ca remove the single <sstream> usage we have
the STL's stream headers can bring in a lot of code, we don't use them.
2024-05-07 16:23:31 -07:00
Benjamin Doherty
e901837317 Log excess buffer allocations for Metal 2024-05-07 15:39:48 -07:00
Powei Feng
17f71c9b81 Release Filament 1.51.7 2024-05-07 14:35:42 -07:00
Mathias Agopian
b056c126fe Add an Engine debug setting to force GLES 2.0 (#7829)
* Add an Engine debug setting to force GLES 2.0

This setting is only meaningful on GLES backends, it's otherwise
ignored. When set to true, the backend will try to force a ES2 context
if supported. If not supported by the platform,
the backend will pretend it's a ES2 context.

This setting is currently only taken into account by the EGL platform.

* Update filament/backend/include/backend/Platform.h

Co-authored-by: Powei Feng <powei@google.com>

---------

Co-authored-by: Powei Feng <powei@google.com>
2024-05-07 09:53:31 -07:00
Sungun Park
6ac36d1aab Fix a shader error (#7828)
gl_ViewID_OVR is of uint type. Explicitly convert it to int to fix the
error.
2024-05-06 21:03:04 +00:00
Ben Doherty
a1752b363c Add preferredShaderLanguage option to Engine::Config (#7816) 2024-05-06 12:12:38 -07:00
Levente Koncz
e855f4aafb Fix mixed up FBO targets in status check code inside OpenGLDriver::blit() 2024-05-06 09:17:15 -07:00
Ben Doherty
1c693e24cf Metal: track types of buffers (#7796) 2024-05-03 14:32:01 -07:00
Ben Doherty
af92a1f21b Add getEyeIndex vertex API (#7822) 2024-05-03 14:22:24 -07:00
Powei Feng
10ff1ee3e4 Update filament to 1.51.6 for public pages (#7821)
Updated both /viewer and /remote
2024-05-03 20:49:53 +00:00
Vladyslav Popovych
5449f46350 Remove bitcode from iOS builds (#7802)
Co-authored-by: Vladyslav <vlad@arthouse.ar>
2024-05-03 12:25:00 -07:00
Mathias Agopian
2967888d26 repair instanced stereo in debug builds (#7819)
- it was broken by a wrong assertion
- also auto instancing + stereo instancing was
  always broken, but this makes it work
2024-05-03 09:36:09 -07:00
Powei Feng
afe81d6889 vk: Use offset when uploading buffer data (#7818) 2024-05-02 11:17:32 -07:00
Mathias Agopian
95134883d6 add the -a option to skinning and morphing samples (#7815)
* add the `-a` option to skinning and morphing samples

* Update samples/skinningtest.cpp

Co-authored-by: Ben Doherty <bendoherty@google.com>

* Update samples/helloskinningbuffer_morebones.cpp

Co-authored-by: Ben Doherty <bendoherty@google.com>

* Update samples/hellomorphing.cpp

Co-authored-by: Ben Doherty <bendoherty@google.com>

* Update samples/helloskinningbuffer.cpp

Co-authored-by: Ben Doherty <bendoherty@google.com>

---------

Co-authored-by: Ben Doherty <bendoherty@google.com>
2024-05-01 15:24:01 -07:00
Mathias Agopian
600c122761 fix ES2 support
- make sure we can build with ES2 headers only
- make sure to not use ES3 features when in ES2 mode
  (post processing was accidentally creating an R8 texture, 
  which is not supported)
2024-05-01 13:29:58 -07:00
Mathias Agopian
1cf5335964 Skybox doesn't need a commit() method
The material parameter changes are committed automatically in
Engine::prepare(), no need to do it explicitly for SkyBox.
2024-05-01 10:11:39 -07:00
Eliza Velasquez
4ac4ffd8d6 filagui: Split uiBlit material into two
Unfortunately, the external uniform was not optimized out as expected. The only
option is to split it into its own independent material.
2024-04-30 14:14:23 -07:00
Eliza Velasquez
6c40721695 Fix broken ImGui on web
I was unfortunately naive about the way that Filament handled external textures
on non-GLES platforms. This fix restricts the changes to Android (which is the
only place this change is required in the first place). Long story short, the
change broke WebGL. Desktop seems to be unaffected.
2024-04-30 14:14:23 -07:00
Benjamin Doherty
56fa078376 Release Filament 1.51.6 2024-04-29 16:49:28 -07:00
Ben Doherty
883507a26f Remove spirv-opt size optimizations for MSL (#7495) 2024-04-29 16:47:05 -07:00
Powei Feng
d697d42c4a vk: finer-grain barrier at renderpass end (#7808)
- At the end of a renderpass we use a more fine-grained barrier
   for each of the attachments in the render target
 - Make sure that buffer update are barrier'd from previous reads
 - Remove previous Mali workaround barriers.  Seems to be fine
   without them on pixels + Mali.
2024-04-29 11:32:04 -07:00
Ben Doherty
e7feee7d5b Switch setFrameScheduledCallback to use utils::Invocable (#7792) 2024-04-29 10:18:28 -07:00