mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-02-18 18:02:48 +00:00
[glsl-in] arguments of opaque types are constant
This commit is contained in:
parent
01036e8f42
commit
c152205c87
@ -345,6 +345,11 @@ impl<'function> Context<'function> {
|
||||
};
|
||||
parameters.push(ty);
|
||||
|
||||
let opaque = match program.module.types[ty].inner {
|
||||
TypeInner::Image { .. } | TypeInner::Sampler { .. } => true,
|
||||
_ => false,
|
||||
};
|
||||
|
||||
if qualifier.is_lhs() {
|
||||
arg.ty = program.module.types.fetch_or_append(Type {
|
||||
name: None,
|
||||
@ -359,7 +364,7 @@ impl<'function> Context<'function> {
|
||||
|
||||
if let Some(name) = name {
|
||||
let expr = self.add_expression(Expression::FunctionArgument(index as u32), body);
|
||||
let mutable = qualifier != ParameterQualifier::Const;
|
||||
let mutable = qualifier != ParameterQualifier::Const && !opaque;
|
||||
let load = qualifier.is_lhs();
|
||||
|
||||
if mutable && !load {
|
||||
|
Loading…
Reference in New Issue
Block a user