include toplevel shader-associated defs (#9343)

# Objective

shader defs associated with a shader via `load_internal_asset!` or
`Shader::from_xxx_with_defs` were being accidentally ignored for
top-level shaders.

## Solution

include the defs for top level shaders.
This commit is contained in:
robtfm 2023-08-03 10:12:31 +01:00 committed by GitHub
parent 731a6fbb92
commit db47ea2f27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -304,6 +304,7 @@ impl ShaderCache {
let shader_defs = shader_defs
.into_iter()
.chain(shader.shader_defs.iter().cloned())
.map(|def| match def {
ShaderDefVal::Bool(k, v) => {
(k, naga_oil::compose::ShaderDefValue::Bool(v))