2022-10-19 09:50:24 +00:00
|
|
|
// Tests that `#[rust_gpu::spirv(...)]` attributes cannot be applied to the wrong "targets"
|
2021-03-22 03:01:39 +00:00
|
|
|
// (i.e. various kinds of definitions and other syntactic categories).
|
|
|
|
|
|
|
|
// build-fail
|
|
|
|
|
2021-03-26 09:25:29 +00:00
|
|
|
#![feature(
|
|
|
|
extern_types,
|
2021-08-02 12:08:10 +00:00
|
|
|
type_alias_impl_trait, // HACK(eddyb) this comment prevents rustfmt
|
2021-03-26 09:25:29 +00:00
|
|
|
stmt_expr_attributes,
|
|
|
|
trait_alias
|
|
|
|
)]
|
2021-03-22 03:01:39 +00:00
|
|
|
|
|
|
|
// NOTE(eddyb) in the interest of keeping this test manageable, only one of
|
2022-10-19 09:50:24 +00:00
|
|
|
// each of the following categories of `#[rust_gpu::spirv(...)]` attributes is used:
|
2021-03-22 03:01:39 +00:00
|
|
|
// * entry: `vertex`
|
2021-02-22 15:12:54 +00:00
|
|
|
// * storage class: `uniform`
|
|
|
|
// * builtin: `position`
|
2021-03-22 03:01:39 +00:00
|
|
|
|
|
|
|
// NOTE(eddyb) accounting for the number of errors this test actually produces:
|
2022-11-24 15:51:13 +00:00
|
|
|
// * 437 errors, all "attribute is only valid on" (see `invalid-target.stderr`)
|
2022-10-19 09:50:24 +00:00
|
|
|
// * 41 uses of `#[rust_gpu::spirv(...)]` in this test
|
2022-11-24 15:51:13 +00:00
|
|
|
// * at most 11 attributes per `#[rust_gpu::spirv(...)]`, so an upper bound of `41*11 = 451`
|
|
|
|
// * the difference between 451 and 437 is 14, i.e. valid attributes, made up of:
|
2021-02-22 15:12:54 +00:00
|
|
|
// * 4 on `_Struct`
|
2022-11-24 15:51:13 +00:00
|
|
|
// * 4 on functions, i.e. 1 on each of:
|
2021-03-22 03:01:39 +00:00
|
|
|
// * `_inherent_method`
|
|
|
|
// * `_trait_method_with_default`,
|
|
|
|
// * `_trait_method` (in `impl _Trait for ()`)
|
|
|
|
// * `_fn`
|
2021-06-24 14:29:01 +00:00
|
|
|
// * 6 on `_entry_param`
|
2021-03-22 03:01:39 +00:00
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
// NOTE(shesp) Directly using `#[rust_gpu::spirv(...)]` because macro attributes are invalid in most contexts
|
2022-10-19 08:57:47 +00:00
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
macro_rules! _macro {
|
2021-03-26 09:17:44 +00:00
|
|
|
() => {};
|
2021-03-22 03:01:39 +00:00
|
|
|
}
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
extern crate spirv_std as _;
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
use spirv_std as _;
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
mod _mod {}
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
extern "C" {
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
type _ForeignTy;
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
static _FOREIGN_STATIC: ();
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
fn _foreign_fn();
|
|
|
|
}
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
static _STATIC: () = ();
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
const _CONST: () = ();
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
type _TyAlias = ();
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
type _OpaqueTy = impl Copy;
|
|
|
|
|
2021-03-26 09:25:29 +00:00
|
|
|
fn _opaque_ty_definer() -> _OpaqueTy {
|
|
|
|
()
|
|
|
|
}
|
2021-03-22 03:01:39 +00:00
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
enum _Enum {
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
_Variant {
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
2021-03-26 09:17:44 +00:00
|
|
|
_field: (),
|
|
|
|
},
|
2021-03-22 03:01:39 +00:00
|
|
|
}
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
union _Union {
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
2021-03-26 09:17:44 +00:00
|
|
|
_field: (),
|
2021-03-22 03:01:39 +00:00
|
|
|
}
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
struct _Struct {
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
2021-03-26 09:17:44 +00:00
|
|
|
_field: (),
|
2021-03-22 03:01:39 +00:00
|
|
|
}
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
impl _Struct {
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
const _INHERENT_ASSOC_CONST: () = ();
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
fn _inherent_method() {}
|
|
|
|
}
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
trait _TraitAlias = Copy;
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
trait _Trait {
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
type _AssocTy;
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
const _TRAIT_ASSOC_CONST: ();
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
fn _trait_method();
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
fn _trait_method_with_default() {}
|
|
|
|
}
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
impl _Trait for () {
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
type _AssocTy = ();
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
const _TRAIT_ASSOC_CONST: () = ();
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
fn _trait_method() {}
|
|
|
|
}
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
fn _fn(
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
|
|
|
)]
|
2021-03-26 09:17:44 +00:00
|
|
|
_entry_param: (),
|
2021-03-22 03:01:39 +00:00
|
|
|
) {
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
let _statement = ();
|
|
|
|
|
2022-10-19 09:50:24 +00:00
|
|
|
let _closure = #[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
2021-03-26 09:25:29 +00:00
|
|
|
|| {};
|
2021-03-22 03:01:39 +00:00
|
|
|
|
|
|
|
(
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
(1, 2, 3) // expression
|
|
|
|
);
|
|
|
|
|
|
|
|
match () {
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-22 03:01:39 +00:00
|
|
|
)]
|
|
|
|
_arm => {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn _fn_with_generics<
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-26 09:25:29 +00:00
|
|
|
)] '_lifetime_param,
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-26 09:25:29 +00:00
|
|
|
)] _TyParam,
|
2022-10-19 09:50:24 +00:00
|
|
|
#[rust_gpu::spirv(
|
2021-06-15 07:19:23 +00:00
|
|
|
sampler, block, sampled_image, generic_image_type, // struct-only
|
2021-03-22 03:01:39 +00:00
|
|
|
vertex, // fn-only
|
2021-03-26 09:17:44 +00:00
|
|
|
uniform, position, descriptor_set = 0, binding = 0, flat, invariant, // param-only
|
2021-03-26 09:25:29 +00:00
|
|
|
)] const _CONST_PARAM: usize,
|
|
|
|
>() {
|
|
|
|
}
|