Skip required_subgroup_size test if compute shaders aren't supported (#2372)

This commit is contained in:
Rua 2023-10-25 11:01:11 +02:00 committed by GitHub
parent 9526e772e2
commit 918c4f5016
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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