mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2025-02-20 10:56:12 +00:00
tests: get --target-env vulkan1.2
passing.
This commit is contained in:
parent
cda583e0d5
commit
b28716d5eb
@ -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};
|
||||
|
@ -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() {
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user