From 4179d7b4d96b0dd38d290e5f0ee0da7287b37b6b Mon Sep 17 00:00:00 2001 From: Rua Date: Wed, 25 Oct 2023 11:01:11 +0200 Subject: [PATCH] Skip required_subgroup_size test if compute shaders aren't supported (#2372) --- vulkano/src/pipeline/compute.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/vulkano/src/pipeline/compute.rs b/vulkano/src/pipeline/compute.rs index b9a8ce81d7..e5b5ae49b6 100644 --- a/vulkano/src/pipeline/compute.rs +++ b/vulkano/src/pipeline/compute.rs @@ -465,7 +465,7 @@ mod tests { ComputePipeline, Pipeline, PipelineBindPoint, PipelineLayout, PipelineShaderStageCreateInfo, }, - shader::{ShaderModule, ShaderModuleCreateInfo}, + shader::{ShaderModule, ShaderModuleCreateInfo, ShaderStages}, sync::{now, GpuFuture}, }; use std::sync::Arc; @@ -597,6 +597,16 @@ mod tests { let (device, queue) = gfx_dev_and_queue!(subgroup_size_control); + if !device + .physical_device() + .properties() + .required_subgroup_size_stages + .unwrap_or_default() + .intersects(ShaderStages::COMPUTE) + { + return; + } + let cs = unsafe { /* #version 450