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.
This commit is contained in:
Powei Feng
2025-03-07 15:54:22 -08:00
committed by GitHub
parent ee68872a47
commit e825f43935
10 changed files with 123 additions and 62 deletions

View File

@@ -122,8 +122,11 @@ private:
DebugServer* mServer;
};
DebugServer::DebugServer(Backend backend, ShaderLanguage shaderLanguage, int port)
: mBackend(backend), mShaderLanguage(shaderLanguage) {
DebugServer::DebugServer(Backend backend, ShaderLanguage shaderLanguage,
DbgShaderModel perferredShaderModel, int port)
: mBackend(backend),
mShaderLanguage(shaderLanguage),
mPreferredShaderModel(perferredShaderModel) {
#if !SERVE_FROM_SOURCE_TREE
ASSET_MAP["/index.html"] = {