mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
[hlsl-out] error on unimplemented non-struct push constants (#7545)
This commit is contained in:
parent
62d4e82149
commit
ffc920b9ae
@ -966,6 +966,15 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> {
|
||||
// Push constants need to be assigned a binding explicitly by the consumer
|
||||
// since naga has no way to know the binding from the shader alone
|
||||
if global.space == crate::AddressSpace::PushConstant {
|
||||
match module.types[global.ty].inner {
|
||||
TypeInner::Struct { .. } => {}
|
||||
_ => {
|
||||
return Err(Error::Unimplemented(format!(
|
||||
"push-constant '{name}' has non-struct type; tracked by: https://github.com/gfx-rs/wgpu/issues/5683"
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
||||
let target = self
|
||||
.options
|
||||
.push_constants_target
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user