mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
fix: allow non-filterable float on derived BGLs for texture binding usage w/ no sampler (#6531)
This commit is contained in:
parent
efc15ba03b
commit
a2044aefe7
@ -127,6 +127,7 @@ By @ErichDonGubler in [#6456](https://github.com/gfx-rs/wgpu/pull/6456), [#6148]
|
|||||||
- Ensure that `Features::TIMESTAMP_QUERY` is set when using timestamp writes in render and compute passes. By @ErichDonGubler in [#6497](https://github.com/gfx-rs/wgpu/pull/6497).
|
- Ensure that `Features::TIMESTAMP_QUERY` is set when using timestamp writes in render and compute passes. By @ErichDonGubler in [#6497](https://github.com/gfx-rs/wgpu/pull/6497).
|
||||||
- Check for device mismatches when beginning render and compute passes. By @ErichDonGubler in [#6497](https://github.com/gfx-rs/wgpu/pull/6497).
|
- Check for device mismatches when beginning render and compute passes. By @ErichDonGubler in [#6497](https://github.com/gfx-rs/wgpu/pull/6497).
|
||||||
- Lower `QUERY_SET_MAX_QUERIES` (and enforced limits) from 8192 to 4096 to match WebGPU spec. By @ErichDonGubler in [#6525](https://github.com/gfx-rs/wgpu/pull/6525).
|
- Lower `QUERY_SET_MAX_QUERIES` (and enforced limits) from 8192 to 4096 to match WebGPU spec. By @ErichDonGubler in [#6525](https://github.com/gfx-rs/wgpu/pull/6525).
|
||||||
|
- Allow non-filterable float on texture bindings never used with samplers when using a derived bind group layout. By @ErichDonGubler in [#6531](https://github.com/gfx-rs/wgpu/pull/6531/).
|
||||||
|
|
||||||
#### Naga
|
#### Naga
|
||||||
|
|
||||||
|
@ -497,7 +497,10 @@ impl Resource {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn derive_binding_type(&self) -> Result<BindingType, BindingError> {
|
fn derive_binding_type(
|
||||||
|
&self,
|
||||||
|
is_reffed_by_sampler_in_entrypoint: bool,
|
||||||
|
) -> Result<BindingType, BindingError> {
|
||||||
Ok(match self.ty {
|
Ok(match self.ty {
|
||||||
ResourceType::Buffer { size } => BindingType::Buffer {
|
ResourceType::Buffer { size } => BindingType::Buffer {
|
||||||
ty: match self.class {
|
ty: match self.class {
|
||||||
@ -531,9 +534,9 @@ impl Resource {
|
|||||||
match class {
|
match class {
|
||||||
naga::ImageClass::Sampled { multi, kind } => BindingType::Texture {
|
naga::ImageClass::Sampled { multi, kind } => BindingType::Texture {
|
||||||
sample_type: match kind {
|
sample_type: match kind {
|
||||||
naga::ScalarKind::Float => {
|
naga::ScalarKind::Float => wgt::TextureSampleType::Float {
|
||||||
wgt::TextureSampleType::Float { filterable: true }
|
filterable: is_reffed_by_sampler_in_entrypoint,
|
||||||
}
|
},
|
||||||
naga::ScalarKind::Sint => wgt::TextureSampleType::Sint,
|
naga::ScalarKind::Sint => wgt::TextureSampleType::Sint,
|
||||||
naga::ScalarKind::Uint => wgt::TextureSampleType::Uint,
|
naga::ScalarKind::Uint => wgt::TextureSampleType::Uint,
|
||||||
naga::ScalarKind::AbstractInt
|
naga::ScalarKind::AbstractInt
|
||||||
@ -1009,7 +1012,12 @@ impl Interface {
|
|||||||
break 'err Err(BindingError::Missing);
|
break 'err Err(BindingError::Missing);
|
||||||
};
|
};
|
||||||
|
|
||||||
let ty = match res.derive_binding_type() {
|
let ty = match res.derive_binding_type(
|
||||||
|
entry_point
|
||||||
|
.sampling_pairs
|
||||||
|
.iter()
|
||||||
|
.any(|&(im, _samp)| im == handle),
|
||||||
|
) {
|
||||||
Ok(ty) => ty,
|
Ok(ty) => ty,
|
||||||
Err(error) => break 'err Err(error),
|
Err(error) => break 'err Err(error),
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user