mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Permit interpolation qualifiers on both vertex outputs and fragment inputs.
This commit is contained in:
committed by
Dzmitry Malyshau
parent
7fda34c4fd
commit
576723960e
@@ -210,8 +210,11 @@ impl VaryingContext<'_> {
|
||||
if !self.location_mask.insert(location as usize) {
|
||||
return Err(VaryingError::BindingCollision { location });
|
||||
}
|
||||
let needs_interpolation =
|
||||
self.stage == crate::ShaderStage::Fragment && !self.output;
|
||||
let needs_interpolation = match self.stage {
|
||||
crate::ShaderStage::Vertex => self.output,
|
||||
crate::ShaderStage::Fragment => !self.output,
|
||||
_ => false,
|
||||
};
|
||||
if !needs_interpolation && interpolation.is_some() {
|
||||
return Err(VaryingError::InvalidInterpolation);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user