matdbg: take desktop/mobile into account for SPIR-V to GLSL translation (#6488)
This commit is contained in:
@@ -82,8 +82,9 @@ static void spirvToAsm(struct mg_connection *conn, const uint32_t* spirv, size_t
|
||||
spvContextDestroy(context);
|
||||
}
|
||||
|
||||
static void spirvToGlsl(struct mg_connection *conn, const uint32_t* spirv, size_t size) {
|
||||
auto glsl = ShaderExtractor::spirvToGLSL(spirv, size / 4);
|
||||
static void spirvToGlsl(ShaderModel shaderModel, struct mg_connection *conn, const uint32_t* spirv,
|
||||
size_t size) {
|
||||
auto glsl = ShaderExtractor::spirvToGLSL(shaderModel, spirv, size / 4);
|
||||
mg_printf(conn, kSuccessHeader.data(), "application/txt");
|
||||
mg_printf(conn, glsl.c_str(), glsl.size());
|
||||
}
|
||||
@@ -335,7 +336,7 @@ public:
|
||||
}
|
||||
|
||||
if (language == glsl) {
|
||||
spirvToGlsl(conn, (const uint32_t*) content.data(), content.size());
|
||||
spirvToGlsl(item.shaderModel, conn, (const uint32_t*) content.data(), content.size());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user