tests: get --target-env vulkan1.2 passing.

This commit is contained in:
Eduard-Mihai Burtescu 2021-11-03 17:57:36 +00:00 committed by Eduard-Mihai Burtescu
parent cda583e0d5
commit b28716d5eb
3 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,5 @@
// build-pass
// compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query
// compile-flags: -Ctarget-feature=+RayTracingKHR,+RayQueryKHR,+ext:SPV_KHR_ray_tracing,+ext:SPV_KHR_ray_query
use glam::Vec3;
use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery};

View File

@ -5,6 +5,11 @@
// normalize-stderr-test "OpExtension .SPV_KHR_vulkan_memory_model.\n" -> ""
// normalize-stderr-test "OpMemoryModel Logical Vulkan" -> "OpMemoryModel Logical Simple"
// FIXME(eddyb) this should use revisions to track both the `vulkan1.2` output
// and the pre-`vulkan1.2` output, but per-revisions `{only,ignore}-*` directives
// are not supported in `compiletest-rs`.
// ignore-vulkan1.2
use spirv_std as _;
fn add_decorate() {

View File

@ -8,12 +8,12 @@ pub fn main(
#[spirv(descriptor_set = 0, binding = 0)] image: &Image!(2D, type=f32, sampled),
#[spirv(descriptor_set = 1, binding = 1)] image_array: &Image!(2D, type=f32, arrayed, sampled),
#[spirv(descriptor_set = 2, binding = 2)] sampler: &Sampler,
#[spirv(descriptor_set = 3, binding = 3)] cubemap: &Image!(3D, type=f32),
#[spirv(descriptor_set = 3, binding = 3)] cubemap: &Image!(3D, type=f32, sampled),
output: &mut f32,
) {
let v2 = glam::Vec2::new(0.0, 1.0);
let v3 = glam::Vec3A::new(0.0, 0.0, 1.0);
*output = image.sample_depth_reference_by_lod(*sampler, v2, 1.0, 0.0);
*output += image_array.sample_depth_reference_by_lod(*sampler, v3, 1.0, 0.0);
*output += image_array.sample_depth_reference_by_lod(*sampler, v3, 1.0, 0.0);
*output += cubemap.sample_depth_reference_by_lod(*sampler, v3, 1.0, 0.0);
}