Commit Graph

28 Commits

Author SHA1 Message Date
Juan Caldas
e205611128 BUGS=397448737
Add WebGPU Support to matdbg
2025-04-30 17:43:28 +00:00
Juan David Caldas
9c69cb8484 Enable WebGPU option for matc and add WGSL options for shader generation 2025-03-11 17:40:21 -04:00
Powei Feng
e825f43935 matdbg: indicate shader model (#8504)
Shader model (desktop or mobile) wasn't really accounted for
in the UI. This means that we will get shaders that look like
duplicates (same variant). In this work, we pass the current
shader model from engine into the frontend and filter out
variants of a different shader model.

Moreover, for matinfo, we use a specific dbg shader model (matinfo)
to indicate it is in that mode. We add UI in matinfo to show the
shadermodel.

So UI updates as well.
2025-03-07 23:54:22 +00:00
Eliza Velasquez
40851f4b51 matdbg: add support for essl1 shader debugging
Fixes #8261
2025-01-31 11:44:51 -08:00
Eliza Velasquez
0887e388db matinfo: further refactor out redundant code 2023-10-11 16:17:48 -07:00
Eliza Velasquez
e4a57cedf9 matinfo: add support for viewing ESSL1 code 2023-10-11 16:17:48 -07:00
Mathias Agopian
3dcdb202d1 new API to return a Material's supported variants
FIXES=[297456590]
2023-09-19 15:48:39 -07:00
Mathias Agopian
3496f3a8ba rename ShaderType to ShaderStage 2022-09-12 15:54:07 -07:00
Mathias Agopian
b2ec57776d new feature level API for backends (#5784)
* new feature level API for backends

backend can now return a "feature level", each level corresponds to a
"bundle" of features.
Level1: ES3.0 capabilities
Level2: ES3.1 capabilities + 31 textures + cubemap arrays

Currently metal always returns level 1, GL and Vulkan return level 2
if 31 textures or more are supported.

* Add public APIs for feature levels

* Add infrastructure to check feature levels in materials

* validate material feature level on use

The validation is done when creating a renderable. If the engine doesn't
support the material's feature level, an exception is thrown (or assert
if exceptions are not enabled).

* material documentation

* activate ESSL 3.10 for feature level 2

also generate #defines to identify available feature levels

* support for cubemap arrays in the public API


if feature level 2 is supported, cubemap arrays can be used from the
public API.

* add release notes
2022-08-17 10:14:26 -07:00
Mathias Agopian
61e117beaa Added a new instanced material parameter
This boolean parameter is used with materials that need to access 
`getInstanceIndex()` (filament's equivalent to `gl_InstanceIndex`).
It is false by default, and getInstanceIndex() is not accessible.
This is intended to be used in concert with
`RenderableManager::Builder::instances()`.
2022-06-08 17:10:38 -07:00
Philip Rideout
8c46e6de9b matdbg: repair invalid JSON and display of active variants.
The JSON response to /api/active became malformed after #4465 because
raw hex strings need to be enclosed by quotes.

This commit changes the variant format in the /api/materials response
to be consistent with one used for /api/active. By using integers
instead of strings, we're avoiding the need to parse integers at run
time.

The JSON error did not appear in the Chrome console because it was being
silenced as a hack to appease "matinfo --web-server". I fix this by
removing the hack and simply emitting a valid response when there's
no live backend.

Also fixed the display of materials, which were always being marked
as active even when they had no active variants.
2022-03-02 15:01:25 -08:00
Mathias Agopian
c21d7c3f5e try to use the Variant type instead of uint8_t everywhere 2022-01-24 09:45:34 -08:00
Mathias Agopian
6d0e719e06 fix display of active shader in matdbg
the database of variant was stored in hex, but the list of active
variant was sent in decimal
2021-08-06 14:00:27 -07:00
Philip Rideout
32b3f16573 matdbg: fix active variant list, update README. 2021-07-14 16:37:53 -07:00
Philip Rideout
57662c52f2 matdbg / matinfo: fix post-process variant string
Also some minor HTML stuff:

- Hide "Required attributes" header when there are none.
- Remove legend for variants (takes too much space).
2020-12-09 14:44:27 -08:00
Ben Doherty
d14e29d4d3 Audit material variants (#2948) 2020-08-13 10:58:27 -07:00
Ben Doherty
4cb903a09e Fix variant-limiting bug in matdbg (#2903) 2020-08-03 11:16:33 -07:00
Philip Rideout
fee6a2f075 Miscellaneous matdbg improvements
matdbg
    - Materials are now sorted by name and the sha id is hidden.
    - PostProcess materials now separated from Surface materials.
    - PostProcess details now hide the non-existing properties.
    - Larger default pane size for the material list.
    - Use nicer font.

matinfo
    - Print out the Material Domain.

filament
    - get*Slow methods in FMaterial are now private.
2020-06-10 20:00:24 -07:00
Pixelflinger
00b522669c minor fixes for matdbg
- don't crash when a material doesn't have a name
- don't cache the program in PostProcessManager so we can do live
  editing. Not needed anyways, because Material has a cache.
2020-06-09 13:27:56 -07:00
Benjamin Doherty
9e6ea9454f Refactor depth variant 2020-02-26 15:58:16 -08:00
Ben Doherty
d849231caf Remove old post-process shader pipeline (#1631) 2019-09-13 09:29:28 -07:00
Philip Rideout
15b663ba0b matdbg client: show inactive variants in gray.
This makes it easier to find the variants that are actually being used.
2019-09-09 11:04:02 -07:00
Philip Rideout
23ee5e276c matdbg server: add query for active programs.
This uses the program cache to determine the set of variants that
are actually being used.
2019-09-09 11:04:02 -07:00
Philip Rideout
876534330a matdbg: add more info to the details panel. 2019-08-23 16:43:16 -07:00
Philip Rideout
2af8ef81b3 matdbg: add required attributes. 2019-08-23 16:43:16 -07:00
Philip Rideout
ad3d823fa3 matdbg: Use Variant enum. 2019-08-22 16:12:20 -07:00
Philip Rideout
8d7c00b0d9 matdbg: add DebugServer class.
matdbg is now linked into the Filament Engine in debug config (allowing
live inspection of GLSL / SPIRV) and into the matinfo tool (to support
the --web-server option).

In both cases, the library spins up a small web server that listens to
http://localhost:8080. You can run any Filament app and attach to it.

The web client caches all material information. This allows the user to
close an atttached Filament app, and the web app will continue to
function properly (useful for crash diagnosis). Moreover the user can
launch a second Filament app and the web client will add its materials
to the existing list (useful when comparing two Filament apps).

For now this only supports inspection, not editing. Some of the material
info such as required attributes is not yet displayed but this will be
easy to flesh out in a subsequent PR.
2019-08-22 16:12:20 -07:00
Philip Rideout
c4b0edbfe3 Introduce matdbg library, simplify matinfo.
This moves some of the matinfo functionality into a library which will
soon have an embedded web server.
2019-08-22 08:11:06 -07:00