mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
[metal] Fix handling of stage visibility for binding arrays (#7479)
Fixes #7287
This commit is contained in:
parent
211d2ec0f3
commit
a843c880d2
@ -428,16 +428,6 @@ pub fn main() {
|
||||
crate::framework::run::<Example>("texture-arrays");
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
fn test_parameters() -> wgpu_test::TestParameters {
|
||||
wgpu_test::TestParameters::default()
|
||||
// https://github.com/gfx-rs/wgpu/issues/7287
|
||||
.expect_fail(wgpu_test::FailureCase::backend_adapter(
|
||||
wgpu::Backends::METAL,
|
||||
"Apple M",
|
||||
))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
@ -446,7 +436,7 @@ static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTest
|
||||
width: 1024,
|
||||
height: 768,
|
||||
optional_features: wgpu::Features::empty(),
|
||||
base_test_parameters: test_parameters(),
|
||||
base_test_parameters: wgpu_test::TestParameters::default(),
|
||||
comparisons: &[wgpu_test::ComparisonType::Mean(0.0)],
|
||||
_phantom: std::marker::PhantomData::<Example>,
|
||||
};
|
||||
@ -459,7 +449,7 @@ static TEST_UNIFORM: crate::framework::ExampleTestParams = crate::framework::Exa
|
||||
width: 1024,
|
||||
height: 768,
|
||||
optional_features: wgpu::Features::empty(),
|
||||
base_test_parameters: test_parameters(),
|
||||
base_test_parameters: wgpu_test::TestParameters::default(),
|
||||
comparisons: &[wgpu_test::ComparisonType::Mean(0.0)],
|
||||
_phantom: std::marker::PhantomData::<Example>,
|
||||
};
|
||||
@ -474,7 +464,7 @@ static TEST_NON_UNIFORM: crate::framework::ExampleTestParams =
|
||||
height: 768,
|
||||
optional_features:
|
||||
wgpu::Features::SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING,
|
||||
base_test_parameters: test_parameters(),
|
||||
base_test_parameters: wgpu_test::TestParameters::default(),
|
||||
comparisons: &[wgpu_test::ComparisonType::Mean(0.0)],
|
||||
_phantom: std::marker::PhantomData::<Example>,
|
||||
};
|
||||
|
||||
@ -831,6 +831,10 @@ impl crate::Device for super::Device {
|
||||
for (entry, layout) in layout_and_entry_iter {
|
||||
// Bindless path
|
||||
if layout.count.is_some() {
|
||||
if !layout.visibility.contains(stage_bit) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let count = entry.count;
|
||||
|
||||
let stages = conv::map_render_stages(layout.visibility);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user