Commit Graph

6914 Commits

Author SHA1 Message Date
Serge Metral
ff2827b226 Merge branch 'google:main' into main 2025-03-28 14:40:50 +00:00
Powei Feng
e52c6d8e53 Metal: add max texture size (#8572)
Use highestSupportedGpuFamily to query

---------

Co-authored-by: Benjamin Doherty <bendoherty@google.com>
2025-03-27 21:06:49 +00:00
Powei Feng
fdcf82f17a vk: use real device limits (#8564) 2025-03-27 18:03:26 +00:00
Mathias Agopian
60f5c4d32c update remove ui (#8573) 2025-03-27 10:35:37 -07:00
Powei Feng
42ce76e285 Update MaterialVersion to 58 2025-03-26 10:56:33 -07:00
Doris Wu
f903683c92 Pass the fgviewer gradle option (#8565) 2025-03-26 14:12:59 +08:00
Powei Feng
546ba48043 Fix test breaking changes with workarounds (#8569)
- Some tests require textures larger than 2048. Change the minimum
  to 4096 for now, and file proper bugs for tests.
- The introduction of uint8_t to DescriptorSetLayoutBinding
  caused unintended padding with using this struct as a hash key.
  We comment out the relevent code for now.
2025-03-25 16:11:35 -07:00
Powei Feng
c81af315b2 engine: Add 1D LUT feature flag (#8568)
Note that the flag is default to false while we roll out this
feature.
2025-03-25 15:52:52 -07:00
rafadevai
ea64db4218 vk: Fix Vulkan protected memory checks (#8561)
Set the support for isProtectedTexturesSupported
depending if the context supports protected content.

Fix checking if the protected feature is supported
on the host after retrieving the results from querying
the Physical Device.
2025-03-25 20:04:42 +00:00
alizahlalani
0c8df766d0 make createExternalImage UTILS_PUBLIC across platforms for future proofing (#8547) 2025-03-24 11:18:38 -07:00
Mathias Agopian
8f58743405 support up to five custom varyings
Five custom variables (varyings) are now available on the condition that
the `color` attribute is not requested.

FIXES=[404930099]
2025-03-24 09:38:31 -07:00
Serge Metral
13e1d2a042 Merge branch 'google:main' into main 2025-03-21 23:32:55 +00:00
Syed Idris Shah
af079b42a6 Make decl/def of createDriver api consistent
Replace "void* const" with "void*" as const here serves no purpose because of following reasons:
  1. void* const in function parameter has a limited and local effect on the code.
  2. clang tidy would complain and report error if const is added to the function declaration.
  3. const is dropped later in the call stack making the code incosistent.
2025-03-21 13:44:10 -04:00
rafadevai
7f7bceb970 vk: New method to describe external image in Vulkan Android (#8551)
To match the GL platform add a new function to describe
an external image.

Also make `ExternalImageVulkanAndroid` and
`getExternalImageMetadata` protected, so only the
backend has access to it.
2025-03-21 17:09:29 +00:00
Powei Feng
625603d8d4 vk: split layout cache from descriptorSet cache (#8554)
This is just splitting the layout cache into its own class and
files.
2025-03-21 16:33:35 +00:00
Doris Wu
d2d5d62a20 Some cleanups (#8558)
* Clean up includes

* Fix the logic
2025-03-22 00:17:22 +08:00
Doris Wu
5e9be5dd2d Remove trailing whitespace (#8556) 2025-03-21 02:10:05 +00:00
Powei Feng
df897b3fb2 osmesa: Enable Mesa/OSMesa rendering for mac (#8530)
This commit enables local running of the renderdiff tests and also
for github workflows.
2025-03-20 22:37:23 +00:00
Powei Feng
8c396caba0 vk: removing caching/ directory (#8553)
Move the files out of that directory for consistency. (Should have
never created the directory in the first place).

Also did some small clean-ups of removing old comments and no
longer needed includes.
2025-03-20 22:03:08 +00:00
Mathias Agopian
6b91f30389 Materials can now specify a shadow attenuation factor (#8540)
* Materials can now specify a shadow strength factor

Materials have a new property: shadowStrength that can be used to
attenuate all shadows received by this material. e.g.:

```
void material(inout MaterialInputs material) {
  prepareMaterial(material);
  material. shadowStrength = 0.1;
}
```

FIXES=[391663042]

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

---------

Co-authored-by: Powei Feng <powei@google.com>
2025-03-20 14:03:52 -07:00
Powei Feng
de5d0e55af webgpu: enable webgpu build for test on linux (#8549) 2025-03-20 20:57:49 +00:00
Benjamin Doherty
6066e3a461 Release Filament 1.58.1 2025-03-19 16:17:13 -07:00
rafadevai
ea0bbad636 vk: Refactor Vulkan android into its own class (#8538) 2025-03-19 20:41:44 +00:00
Eliza Velasquez
65861b85cf 1dlut: fix psychadelic lookup tables 2025-03-19 12:15:35 -07:00
Eliza Velasquez
1f169d7e75 1dlut: fix iOS build 2025-03-19 12:15:35 -07:00
Eliza Velasquez
daa359717b 1dlut: mathias feedback 2025-03-19 12:15:35 -07:00
Eliza Velasquez
4fbfd1b8c1 Generate 1D LUTs for color grading when possible
This introduces two new methods to `ToneMapper`: `isOneDimensional()` and
`isLDR()`. `ColorGrading` references these values along with other parameters
passed to the builder to determine if we can get away with only generating a
one-dimensional LUT. Meanwhile, `PostProcessManager` takes care of setting the
new spec constants and uniforms for `colorGrading.mat` and
`colorGradingAsSubpass.mat`.
2025-03-19 12:15:35 -07:00
Syed Idris Shah
67f05c15d0 Fix WebGPU compilation error
WebGPU is broken because of 3abddc4584 change
2025-03-19 13:25:09 -04:00
Doris Wu
4db3cc521b Move includes outside fgviewer namespace (#8543) 2025-03-19 13:42:34 +08:00
alizahlalani
9e6cf3c876 Refactored external image handling in PlatformEGLAndroid (#8512) 2025-03-18 23:46:31 +00:00
Serge Metral
b09cbaf0db Merge branch 'google:main' into main 2025-03-18 19:47:10 +00:00
Powei Feng
b64548267e vk: disable transient texture for depth resolve (#8534)
Depth resolve is handled via a custom shader and therefore cannot
use the transient texture path.

This is fixes the black screen bug when MSAA is turned on and
when using the latest MoltenVK (1.2.11).
2025-03-18 17:51:59 +00:00
Randy Reyes
5c811844ff webgpu: fix spacing 2025-03-18 10:25:10 -07:00
Randy Reyes
e6b18b4560 webgpu: enable unpacking WGSL code in filamat 2025-03-18 10:25:10 -07:00
Powei Feng
1571ea846b vk: minor swizzle code clean-up (#8535) 2025-03-18 17:09:55 +00:00
Matthew Hoffman
78c6456fbe Update gtest to 1.16 (#8528) 2025-03-17 16:31:48 -05:00
bridgewaterrobbie
84cce8cfdf Run dead code elimination for WGSL even if all other optimizations are disabled 2025-03-17 15:16:19 -04:00
bridgewaterrobbie
49b7c7169f Avoid building point size demo and material if WebGPU is enabled. 2025-03-17 15:16:19 -04:00
Powei Feng
dbfe2dbc5e Disable renderdiff for breakage (#8500)
Disable renderdiff for breakage
2025-03-17 11:47:19 -07:00
Serge Metral
0ec60de287 vk: External sampler platform code (#8500)
Adds enums for enabling external sampler / immutable samplers. No actual implementation yet.
2025-03-17 09:51:34 -07:00
Serge Metral
b570d489e3 Merge branch 'google:main' into main 2025-03-17 16:09:21 +00:00
rafadevai
7eb756ca96 vk: Fix Vulkan Validation errors when importing an AHB (#8509)
- Make sure we setup a valid sample count of 1.
https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkImageCreateInfo-samples-parameter
- Select a proper memory type based on the list
provided by the `metadata.memoryTypeBits`
https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkMemoryAllocateInfo-memoryTypeIndex-02385
2025-03-16 01:56:42 +00:00
Mathias Agopian
3abddc4584 APIs to query the texture limit sizes.
Assert textures dimensions are in range when creating a Texture object.

FIXES=[398901038]
2025-03-15 16:32:29 -07:00
Serge Metral
7f7daddbfa Merge branch 'google:main' into main 2025-03-14 17:28:06 +00:00
bridgewaterrobbie
35661a1974 Add appropriate matc flags for WebGPU when enabled
Currently WebGPU does not support skinning nor stereo, so they also must be disabled if targeting WebGPU.
2025-03-14 13:17:23 -04:00
bridgewaterrobbie
606a1259f6 Avoid generating subpass code if using WebGPU
Subpasses should not be used anyways due to the result of WebGPUDriver::isFrameBufferFetchSupported. However, we need to make sure the GLSL is not generated for WebGPU, or Tint is unable to convert.
2025-03-14 13:17:23 -04:00
Powei Feng
6479a5bc12 github: change wgsl presubmit to use linux (#8525) 2025-03-14 16:59:11 +00:00
Andy Hovingh
c95f9ed7e0 WebGPU: backend components created and conditionally logged
Initial groundwork in creating WebGPU backend components, namely
the instance, adapter, device, and queue.
If configured to do so, the backend will print out details about
these components.
The samples/hellotriangle.cpp was slightly modified to include a
webgpu option which allows for exercising the above, but does not
yet draw anything to the screen/window.
NOTE: This has only been sanity tested with hello triangle
on Mac OS and the Android emulator at this time, NOT IOS,
Windows, or Linux yet.
2025-03-13 19:45:48 -05:00
Powei Feng
e3b7861aa2 webgpu: combine tint static libs into single lib (#8520) 2025-03-13 17:57:25 +00:00
Powei Feng
84980d89af Add .clang-format to project root (#8487) 2025-03-12 22:19:01 +00:00