mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-26 08:45:43 +00:00
016363a2eb
For the state of this commit on top of 3fca36ec
, before rebasing, see this gist:
https://gist.github.com/eddyb/50c055df2e10756a2704277619e36857
24 lines
799 B
Rust
24 lines
799 B
Rust
// HACK(eddyb) duplicate of generic-fn-op-name.spirt.rs because only-/ignore- do not work with revisions.
|
|
// only-not_spirt
|
|
#![crate_name = "generic_fn_op_name"]
|
|
//
|
|
// Test that generic functions' `OpName` correctly include generic arguments.
|
|
|
|
// build-pass
|
|
// compile-flags: -C llvm-args=--disassemble-globals
|
|
// normalize-stderr-test "OpCapability VulkanMemoryModel\n" -> ""
|
|
// normalize-stderr-test "OpExtension .SPV_KHR_vulkan_memory_model.\n" -> ""
|
|
// normalize-stderr-test "OpMemoryModel Logical Vulkan" -> "OpMemoryModel Logical Simple"
|
|
#![feature(adt_const_params)]
|
|
#![allow(incomplete_features)]
|
|
|
|
use spirv_std::image::Dimensionality;
|
|
use spirv_std::spirv;
|
|
|
|
fn generic<T, const DIM: Dimensionality>() {}
|
|
|
|
#[spirv(fragment)]
|
|
pub fn main() {
|
|
generic::<f32, { Dimensionality::TwoD }>();
|
|
}
|