Commit Graph

7017 Commits

Author SHA1 Message Date
bridgewaterrobbie
705b3c39f4 WebGPU: Add Draw call, with temporary hack to achieve spinning triangle
Co-authored-by: Juan Caldas <juancaldas@google.com>
2025-05-06 12:24:42 -04:00
bridgewaterrobbie
56231db326 WebGPU: Set spec constants via string mapping
Co-authored-by: Andy Hovingh <6198728+AndyHovingh@users.noreply.github.com>
Co-authored-by: Juan Caldas <juancaldas@google.com>
2025-05-06 12:24:42 -04:00
bridgewaterrobbie
e97f7ef628 WebGPU: Render Target Implementation
Co-authored-by: Andy Hovingh <6198728+AndyHovingh@users.noreply.github.com>
Co-authored-by: Syed Idris Shah <idrisshah@google.com>
2025-05-06 12:24:42 -04:00
bridgewaterrobbie
4570c2e710 WebGPU: Sampler, Texture and Descriptor Set setup
Co-authored-by: Andy Hovingh <6198728+AndyHovingh@users.noreply.github.com>
2025-05-06 12:24:42 -04:00
bridgewaterrobbie
4759237e66 Separate out required and optional features for webgpu. Panic if any required features are not available 2025-05-06 12:24:42 -04:00
Matthew Hoffman
543b93939a Optional CMake flag for enabling ASAN for backend and its tests. (#8696) 2025-05-05 12:35:21 -05:00
Benjamin Doherty
9b356926b8 Release Filament 1.59.4 2025-05-01 17:33:19 -07:00
Matthew Hoffman
7179ab5b9d Prevent all backend vulkan tests from crashing. (#8682)
Many still fail that shouldn't though.
2025-05-01 21:50:56 +00:00
Sungun Park
0a6bbdb35c Add flag to disable depth precaching (#8686)
Depth precaching can cause initial startup stalls, particularly on
platforms such as WebGL on FireFox/Mac.

This option allows us to disable depth precaching, which can be useful
for eliminating the initial startup hiccups or stalls due to the upfront
precaching of depth variants.

BUG=[392917621]
2025-05-01 20:41:04 +00:00
Mathias Agopian
29919e64cd update remote ui, web samples and documentation 2025-05-01 10:21:27 -07:00
Andy Hovingh
a7660e40f8 webgpu: fix command buffer (+encoder) life-cycle (avoids breaks on multiple render passes) 2025-05-01 07:31:58 -05:00
Mathias Agopian
22e1f9b930 better comments regarding Variant::VSM 2025-04-30 11:59:37 -07:00
Juan Caldas
e205611128 BUGS=397448737
Add WebGPU Support to matdbg
2025-04-30 17:43:28 +00:00
Andy Hovingh
8a3bf04eef webgpu: initial render pipeline creation 2025-04-29 16:22:09 -05:00
Matthew Hoffman
44840a481e Working backend tests on MacOS for Metal as well as OpenGL (#8662)
BUGS=[409099263]
2025-04-29 12:21:36 -07:00
Powei Feng
8070643ba5 ci: refactor to centralize version definitions (#8663)
- move CI only prerequisites to github actions
 - Add linux, mac prereq actions
 - Add an action for indicating dependency versions
 - Move ninja installation into its own script
2025-04-29 10:02:51 -07:00
Doris Wu
0c33f9f2a3 [fgviewer] Add graphviz view mode to the web page (#8673)
* Export graphviz data to the webview

* Fix some errors

* Fix colors

* Only show toggle when view selected

* Update

* Merge graphviz data into json string

* Mark export_graphviz function as const

* Set SERVE_FROM_SOURCE_TREE to 0

* Remove unnecessary import

* Refactor

* Refactor

* New line when early return
2025-04-29 02:39:37 +00:00
Juan Caldas
db72bd024b wgpu: Update callback mode to WaitAnyOnly (#8677) 2025-04-28 20:29:38 -04:00
Powei Feng
7c6b470650 Improve code-correctness script (#8659)
- Sort failures alphabetically
- Add way to suppress error when necessary
- Add way to run test on a subset of files for testing
- Fix case where number of files is less than number of workers
2025-04-28 17:00:40 +00:00
Syed Idris Shah
68a99ef54c metal driver cleanup
Remove the unused functions and varibles from render primitve and target api's.
2025-04-25 23:49:12 -04:00
Powei Feng
39fabdbc3b vk: fix exception-escape failures (#8656)
And one drive-by fix to VulkanYcbcrConversionCache.h
2025-04-25 23:03:47 +00:00
KeremTAN
83967fdb1b std type trait specialization of is_arithmetic and is_floating_type removed 2025-04-25 12:14:26 -07:00
KeremTAN
b88c2d80a4 Fix Clang 20 compile error: invalid std type trait specializations 2025-04-25 12:14:26 -07:00
bridgewaterrobbie
4a36193f04 Uncomment updateDescriptorSetBuffer. What we have may actually suffice as-is, and no longer crashes 2025-04-25 14:28:39 -04:00
bridgewaterrobbie
8df19cb6b2 Indicate we do not support texture swizzling 2025-04-25 14:28:39 -04:00
bridgewaterrobbie
783c1c9c83 Upload wgpu cpp header to easily reference in discussions 2025-04-25 12:11:42 -04:00
Syed Idris Shah
a92771c5ef webgpu: create and bind render primitives 2025-04-25 10:15:27 -04:00
Syed Idris Shah
c98a76135b webgpu: Implement update buffer object methods in driver
Move queue instantion to the constructor. Its needed by the update buffer methods.
2025-04-25 10:15:27 -04:00
Syed Idris Shah
7f2836bb43 webgpu: Implement R functions for vertex and index buffers
Also create BufferObject and use it to update vertex buffers

Updating buffers will be in the next upcoming patch.
2025-04-25 10:15:27 -04:00
Syed Idris Shah
b60d02919b webgpu: Update VertexBufferInfo to populate VertexBufferLayout 2025-04-25 10:15:27 -04:00
bridgewaterrobbie
156dde6872 We can't cast handles that weren't actually constructed, so can't use the update descriptor funcs yet. 2025-04-24 14:47:16 -04:00
bridgewaterrobbie
dd2fbf01aa wgpu: Initial bindgroup and descriptorset setup.
Likely not handling textures correctly, need more understanding there to proceed.
2025-04-24 14:47:16 -04:00
Ajmal Kunnummal
beba1f63f1 Revert initializing the transform 2025-04-24 10:27:35 -07:00
Ajmal Kunnummal
e20dd9ec93 Fix bug where the transform parameter was mistakenly unused in setAcquiredImage
- Also initialized the transform field to identity
2025-04-24 10:27:35 -07:00
Ajmal Kunnummal
7f80d956b6 Fix bug where BufferInterfaceBlock::getTransformFieldOffset the offset should be reported in bytes instead of words 2025-04-24 10:26:59 -07:00
Rasmus Munk Larsen
3c941863dc Revert change to pow. 2025-04-23 16:25:46 -07:00
Rasmus Munk Larsen
57e2007aaf Fix typo again. 2025-04-23 16:25:46 -07:00
Rasmus Munk Larsen
f88f0607c7 Fix typo. 2025-04-23 16:25:46 -07:00
Rasmus Munk Larsen
91b98964cc Optimize pow and slerp for quaternions by using the identies
sin(acos(x)) = sqrt(1-x^2)
  cos(acos(x)) = x.
2025-04-23 16:25:46 -07:00
rafadevai
d92a90e22b VK: Small improvements in different places (#8651)
- Add markers to more VulkanDriver calls and other
functions related to VulkanDriver::collectGarbage
- Fix validation layer error calling vkWaitForFences
with a count of 0.
- In VulkanTextureState, call clearCachedImageViews
before destroying the vkImage.
- In VulkanStagePool, use a std::vector for keeping
track of used images and buffers. Also set the
TIME_BEFORE_EVICTION to 3 frames instead of the
FVK_MAX_COMMAND_BUFFERS.
2025-04-23 22:15:29 +00:00
Powei Feng
79a548ecae Fix broken ios build (#8658)
Missing include after #8654
2025-04-23 20:28:11 +00:00
Mathias Agopian
3c4c8940b2 clang-tidy cleanups 2025-04-23 09:42:02 -07:00
Mathias Agopian
75d2252d33 Add UTILS_VERY_[UN]LIKELY macros
clang optimizes code differently with very likely or unlikely 
conditions, so we add a `VERY` version of these macros, and we
make use of it for assertions.
2025-04-23 09:23:21 -07:00
Powei Feng
9d3a55291d Fix broken header check (#8655)
- PR #8641 introduced a requirement for including Systrace.h that
  wasn't covered by the header-check test.
- Make sure temp.cpp contains only one include
- Add a missing include for Package.h
2025-04-22 22:18:50 +00:00
Powei Feng
170dec0945 vk: external sampler work (#8608)
- Add a manager class for handling external image and sampling
 - The logic is to enable a slow path if the descriptor set
   layout has external samplers and an external image has been
   assigned to the corresponding descriptor set
 - The slow path will deduce the format of the external image to
   and create the corresponding YUV conversion if necessary.
 - Clean-up VulkanPlatform
2025-04-22 15:01:18 -07:00
Powei Feng
7967157fbb renderdiff: fix breakage (#8648)
- Re-enable renderdiff test.
- Cache the mesa directory so that we're not spending time pulling
  and compiling it.
- Move python prereqs into the script and use venv.
2025-04-22 18:23:05 +00:00
Andy Hovingh
597ced13e1 webgpu: initial shader compilation 2025-04-22 12:56:03 -05:00
Sungun Park
c3542b135e Fix crash for ShaderCompilerService (#8626)
This change fixes a crash that occurs in ShaderCompilerService under a
certain condition described below.

Functions are called in the order described below.
1. `ShaderCompilerService::initialize(...)` is called when a new gl
   program is created. There are cases whre the corresponding TickOp may
   be still alive at the end of this method.
2. `OpenGLProgram::~OpenGLProgram()` is called when the program is
   immediately destroyed without being used. This deletes gl.program.
3. `ShaderCompilerService::tick()` is called later, and it references
   the dangling gl object `gl.program` in the lambda function, and it
   crashes.

This change also includes refactoring the class `ShaderCompilerService`
to make code simpler and less error-prone.

TEST = Tested on Desktop, Android, and Web by running sample apps

BUGS = [394319326, 407090622]
2025-04-22 17:31:40 +00:00
Mathias Agopian
ca3ff7e08e Use the Perfetto SDK instead of ATRACE
Perfetto has significantly less overhead. The User facing API is
mostly unchanged:

Here are the differences:

- SYSTRACE_ENABLE() does nothing on ANDROID, initializes systraces on darwin.
- SYSTRACE_DISABLE() is removed.
- A new "gltfio" tag is added.
- SYSTRACE_TAG *must* be defined before including `utils/Systrace.h`
- `utils/Systrace.h` should not be used from a public header
- the new SYSTRACE_TAG_DISABLE disables systrace at compile time


For android a data source MUST be created in the perfetto config:

```
data_sources {
  config {
    name: "track_event"
    track_event_config {
      enabled_categories: ["filament", "jobsystem", "gltfio"]
      disabled_categories: "*"
    }
  }
}
```

This can for example be added to AGI's custom/advanced config.

FIXES=[407572663]
2025-04-22 09:31:29 -07:00
Mathias Agopian
42c760a92f add the Perfetto SDK to libutils
for android NDK projects we also need to add it to the dependent
libraries.
2025-04-22 09:31:29 -07:00