Commit Graph

6798 Commits

Author SHA1 Message Date
Syed Idris Shah
22b01ab852 Add dawn to third_party from https://github.com/google/dawn
Current copy is cloned using hash: 51694fd33cdaaec5bdd7ab3dc4f488f5818fd870

.git and .gitignore have been cleanup. tests,docs,webgpu-cts folders have been deleted.

For more details look at third_party/dawn/tnt/README.md file, which will be
pushed in subsequent patch.
2025-03-03 22:55:05 -05:00
Doris Wu
d0910b3fb6 Add resource details display to fgviewer web view (#8469)
* Add resource detail

* Add to_string for texture format

* Fix the type of currentResourceId

* Update

* Refactoring

* More refactoring

* Rename some properties

* Rename a function

* Address the comment

* Update the comment and remove if statement

* Fix indent
2025-03-01 02:54:54 +00:00
Mathias Agopian
95978f6fdc add a feature flag to control handle tags for heap handles
heap allocated handle tags are kept forever and we suspect this is
causing problems. the new feature flag "backend.disable_heap_handle_tags"
is enabled by default and controls if we store these tags at all or not.

BUGS=[397766275]
2025-02-28 16:30:59 -08:00
Amin Ya
cd4571700a fix: conditional cstdio include in vk_mem_alloc (#8265)
Based on 05973d8aeb/include/vk_mem_alloc.h (L2842)

Co-authored-by: Powei Feng <powei@google.com>
2025-02-27 23:26:31 +00:00
Amin Ya
ad2fdb4663 fix: const cast pair.first access for mg_websocket_write (#8264)
Co-authored-by: Powei Feng <powei@google.com>
2025-02-27 22:28:04 +00:00
Powei Feng
1b2ab09719 android: prevent leak of cubemap for IndirectLight/Skybox (#8470)
We break existing  API by returning both the IndirectLight and the
texture. Same thing with Skybox.

Fix one bug where the float array in getSphericalHarmonics wasn't
getting written out.

Fixes #6412
2025-02-27 20:14:22 +00:00
dependabot[bot]
2a2a6b7291 build(deps): bump the npm_and_yarn group across 1 directory with 3 updates (#8445)
Bumps the npm_and_yarn group with 2 updates in the /build/common/upload-release-assets directory: [@octokit/plugin-paginate-rest](https://github.com/octokit/plugin-paginate-rest.js) and [@octokit/rest](https://github.com/octokit/rest.js).


Updates `@octokit/plugin-paginate-rest` from 5.0.1 to 11.4.2
- [Release notes](https://github.com/octokit/plugin-paginate-rest.js/releases)
- [Commits](https://github.com/octokit/plugin-paginate-rest.js/compare/v5.0.1...v11.4.2)

Updates `@octokit/rest` from 19.0.5 to 21.1.0
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v19.0.5...v21.1.0)

Updates `@octokit/request` from 6.2.2 to 9.2.1
- [Release notes](https://github.com/octokit/request.js/releases)
- [Commits](https://github.com/octokit/request.js/compare/v6.2.2...v9.2.1)

---
updated-dependencies:
- dependency-name: "@octokit/plugin-paginate-rest"
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: "@octokit/rest"
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: "@octokit/request"
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Powei Feng <powei@google.com>
2025-02-27 19:40:17 +00:00
bridgewaterrobbie
a19e8d357d Update glslang Dependencies to match Dawn requirements 2025-02-27 14:22:41 -05:00
bridgewaterrobbie
a937362ccc Update SPIR-V Dependencies to match Dawn requirements 2025-02-27 14:22:41 -05:00
bridgewaterrobbie
17091df8dc Update abseil version to match Dawn requirements 2025-02-27 14:22:41 -05:00
Powei Feng
ff1f2fcac6 vk: timer query refactor (#8459)
- Put QueryManager into its own .h/.cpp
 - Do not assert when endTime <= beginTime.  This could happen if
   they were set on different command buffers.  To be resolved
   later.
 - Better logic for iterating through a bitset.
2025-02-27 19:08:17 +00:00
Powei Feng
db30a9a50c viewer: add option to export TIFF in automation (#8472)
PPM does not store alpha channel, but TIFF does.  We add a method
to export RGBA to a TIFF file without compression.

We add the corresponding options to gltf_viewer and
AutomationEngine.

The default export format for both gltf_viewer and AutomationEngine
is now TIFF.
2025-02-27 18:54:37 +00:00
Powei Feng
6f41853e06 vk: clean-up VulkanPipelineCache (#8466)
- remove unused code and fields
- reformatted
2025-02-27 18:27:14 +00:00
Benjamin Doherty
d35d466367 Release Filament 1.57.1 2025-02-27 10:08:55 -08:00
Powei Feng
db29b87647 gltfio: allow for multiple color attributes (#8462)
We are not correctly handling gltf models with multiple color
attributes. Filament doesn't allow for more than one color
attribute.  So we just set the additional attributes as
VertexAttribute::CUSOM(N).

Fixes #8396
2025-02-27 06:50:21 +00:00
Mathias Agopian
02fcec587a Initialize mShadowCulling properly (#8476)
Just like mCulling, mShadowCulling needs to be inherited from the 
material.


Fix breakage introduced in #8422 with attempted fix in #8475 and
caused by an uninitialized variable (mShadowCulling).

BUGS=[391679058]
2025-02-26 22:36:36 -08:00
Powei Feng
dc7eee0896 filamat: fix ubsan failure (#8461)
Enabling UBSan shows the following error:

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior filamat/src/eiff/Flattener.h:102:17 in
filamat/src/eiff/Flattener.h:102:17: runtime error: applying non-zero offset 8 to null pointer

We reference a placeholder byte on the heap when in DryRunner mode
to workaround this issue.
2025-02-27 03:55:30 +00:00
hyde zhou
e414b99c09 fix vmax(const vec4 v) (#8474)
* fix vmax(const vec4 v)

* fix vmin
2025-02-26 17:04:26 -08:00
Ben Doherty
5fccbce7bd Make setCullingMode also set shadow culling (#8475) 2025-02-26 15:13:35 -08:00
Powei Feng
defba23030 build: remove ios build dependency on filamat (#8465)
We are in the process of updating glslang, which requires

set(IOS_MIN_TARGET "13.0")

This is a problem since we are targeting iOS 11 in general.
glslang is a filamat depedency, and we're building filamat for
iOS for the iOS version of the backend test.

So one solution is to set set(IOS_MIN_TARGET "13.0") for the
backend test. And we might revisit this solution later.

But for now, we simply disable backend tests (and filamat tests)
for iOS.
2025-02-26 21:42:51 +00:00
Powei Feng
68ccee313a Add workaround for handle tag issue (#8467)
BUGS=397766275
2025-02-21 13:56:17 -08:00
Konstantin Sakhin
3bd5bf82ed Fix misprint in Texture.java binding (#8456)
Pass enums as int instead of long.
2025-02-21 21:39:13 +00:00
Powei Feng
3fae07f23c gltfio: undo clearing when resource is loaded (#8458)
Fixes #8367
2025-02-20 01:03:03 +00:00
Powei Feng
d60e44d989 vk: reformat, cleanup VulkanPlatform.cpp (#8457) 2025-02-19 16:50:37 -08:00
Konstantin Sakhin
62b8a60527 Implement a query to check if combination of texture format, pixel data format and type is valid. (#8452)
This will help Filament users to perform this check beforehand.
2025-02-18 16:05:03 -08:00
Doris Wu
1b59e24e99 fgviewer improvement (#8450)
* Introduce FrameGraphInfo class

* Move the assignment into pimpl

* Make ctors explicit

* Add ctors to fg info structs

* Revert the macro change to align with existing

* Address the comments

* Remove pimpl and move func def to .cc

* Fix

* Convert the FrameGraph to FrameGraphInfo

* Initialize and update debug server on engine side

* Fix compile error

* Address the comments

* Update

* Use camelCase

* Use camelCase

* Update

* Add JsonWriter to convert fginfo to json

* Add getStatus api and implement it

* Add increment

* Implement GET apis

* Fix compile error

* Update

* Use c_str_safe

* Add operator== for FrameGraphInfo

* Call updateFrameGraph in appropriate locations

* Address the comments

* Add webview for fgviewer

* Remove head and tail bracket

* Fix the table element

* Force web to re-render when fg info gets updated

* Skip culled resources

* Mark subresources as gray

* Add parent info for subresources

* Collapse subresources into their parent resource

* Make the leftmost column fixed

* Remove unused stuff in html

* Fix the comment

* Refactor the code

* Cull unused resources

* Update

* Fix the naming

* Format the file

* Merge multiple resource node in to single resource

* Improve the logic and naming

* Refine the code
2025-02-18 14:46:30 +08:00
Doris Wu
d92372c98f [Depends on #8379] Add webview for fgviewer (#8428)
* Introduce FrameGraphInfo class

* Move the assignment into pimpl

* Make ctors explicit

* Add ctors to fg info structs

* Revert the macro change to align with existing

* Address the comments

* Remove pimpl and move func def to .cc

* Fix

* Convert the FrameGraph to FrameGraphInfo

* Initialize and update debug server on engine side

* Fix compile error

* Address the comments

* Update

* Use camelCase

* Use camelCase

* Update

* Add JsonWriter to convert fginfo to json

* Add getStatus api and implement it

* Add increment

* Implement GET apis

* Fix compile error

* Update

* Use c_str_safe

* Add operator== for FrameGraphInfo

* Call updateFrameGraph in appropriate locations

* Address the comments

* Add webview for fgviewer

* Remove head and tail bracket

* Fix the table element

* Force web to re-render when fg info gets updated

* Skip culled resources

* Mark subresources as gray

* Add parent info for subresources

* Collapse subresources into their parent resource

* Make the leftmost column fixed

* Remove unused stuff in html

* Fix the comment

* Refactor the code

* Cull unused resources

* Update

* Fix the naming

* Format the file

* Fix naming

* Address the comments

* Address the comment
2025-02-15 06:41:43 +00:00
Doris Wu
9ca0594d7c [Depends on #8344] Implement ApiHandler functions and add JsonWriter (#8379)
* Introduce FrameGraphInfo class

* Move the assignment into pimpl

* Make ctors explicit

* Add ctors to fg info structs

* Revert the macro change to align with existing

* Address the comments

* Remove pimpl and move func def to .cc

* Fix

* Convert the FrameGraph to FrameGraphInfo

* Initialize and update debug server on engine side

* Fix compile error

* Address the comments

* Update

* Use camelCase

* Use camelCase

* Update

* Add JsonWriter to convert fginfo to json

* Add getStatus api and implement it

* Add increment

* Implement GET apis

* Fix compile error

* Update

* Use c_str_safe

* Add operator== for FrameGraphInfo

* Call updateFrameGraph in appropriate locations

* Address the comments
2025-02-15 02:27:42 +00:00
Ben Doherty
05906a5da0 Metal: avoid TSAN warnings inside MetalHandles (#8440) 2025-02-14 10:05:42 -08:00
Powei Feng
b68e9fef03 froxel: make froxel buffer size consistent (#8437)
The definition of the froxel buffer sizes were spread across
multiple places and for different use cases (including
allocating the buffer, setting to a descriptor set, and adjusting
the relevant spec constant). In this commit, we try to unify
the size definitions into Froxelizer::getFroxelBufferByteCount().

We also remove the vulkan-only special case for froxel buffer
UBO. This case was introduced because spec constant couldn't be
used to size arrays for some drivers in the past, but we introduced a
workaround that replaced spec constants with constants.
2025-02-13 15:32:05 -08:00
Ben Doherty
18529facef Fix TSAN violation in HandleAllocator (#8438) 2025-02-13 15:31:00 -08:00
Ben Doherty
95e2c44c85 Metal: Assert in release builds if Metal fails to initialize (#8443) 2025-02-13 15:30:42 -08:00
Konstantin Sakhin
2b54e7dd97 Implement query to check if texture format is mipmappable (#8442)
* Implement query to check if texture format is mipmappable

This will allow Filament's users to perform check beforehand.

* add java bindings

* add javascript binding
2025-02-13 15:30:09 -08:00
Powei Feng
0dd5dc6d75 gl: fix missing external texture target 2025-02-12 11:46:53 -08:00
Powei Feng
117978f092 descset: fix lights UBO size on setBuffer (#8435)
Fixes #8296
2025-02-12 18:20:51 +00:00
Grant Commodore
a22873bb2e vk: extension support in shared context (#8415) 2025-02-11 14:04:24 -08:00
Ben Doherty
b2801d0a5c Support including PlatformMetal.h in C++ headers (#8431) 2025-02-11 10:11:11 -08:00
Powei Feng
1a5f1cc6ab matdbg: fix three bugs (#8430)
1. changes weren't refreshed for windows/linux-mesa vulkan. This
   is due to a reordering of the shaders when the shader source
   is replaced. We fix this by ensuring the ordering before
   writing out the edit.
   Fixes #7286

2. A condition was flipped in the SourceFormatter causing the
   format feature to not work on linux

3. The material update status wasn't really propagated to the
   front-end due to not updating the status counter.
2025-02-11 07:50:45 +00:00
Powei Feng
9f5001d347 vk: fix debug code (#8429)
Some debug code that are only enabled for debug purposes have
not been properly refactored after the fvkutils commit.
2025-02-11 07:37:04 +00:00
Grant Commodore
9042f628d4 vk: Adds the layercount to the VulkanTexture and SwapChainBundle (#8392) 2025-02-10 17:50:45 -08:00
Sungun Park
83d71d0f57 Release Filament 1.57.0 2025-02-10 23:33:15 +00:00
Benjamin Doherty
cb8b1bfefa Bump MATERIAL_VERSION to 57 2025-02-10 15:23:37 -08:00
Sungun Park
8824f59051 Move OpenGLDriverBase.h under src/opengl/ (#8433) 2025-02-10 15:21:02 -08:00
Benjamin Doherty
d8af04f08f Add missing setDithering to jsbindings 2025-02-10 09:37:13 -08:00
Mathias Agopian
559bc4eb96 fix some missing includes and trivial warnings (#8414) 2025-02-07 14:48:37 -08:00
GavinKG
c16cab239d Use CAMetalLayer to create MVK surfaces to avoid potential deadlocks. 2025-02-07 12:39:24 -08:00
wangjinhan
68719f913a Rename clearEntities to removeAllEntities and add noexcept. 2025-02-07 11:37:14 -08:00
wangjinhan
038ed69a92 Add clearEntities API in Scene.
The API works for Scene to clear all entities.
2025-02-07 11:37:14 -08:00
Mathias Agopian
69822a91cf the shadow passes get their own face culling mode
the new MaterialInstance::setCullingMode(color, shadow) API allows to
set a separate face culling mode for the color pass and the shadow 
passes.

FIXES[391679058]
2025-02-07 11:36:48 -08:00
Powei Feng
24ff10b5db vk: fix rendering to 2D view of 3D image (#8421)
FIXES=389760706
2025-02-07 16:32:25 +00:00