#[spirv(uniform)] is actually immutable in the absence of BufferBlock. (#558)

This commit is contained in:
Eduard-Mihai Burtescu 2021-03-30 12:32:59 +03:00 committed by GitHub
parent 820573a21f
commit 0e7fdb30f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -246,6 +246,7 @@ impl<'tcx> CodegenCx<'tcx> {
let expected_mutbl = match storage_class {
StorageClass::UniformConstant
| StorageClass::Input
| StorageClass::Uniform
| StorageClass::PushConstant => hir::Mutability::Not,
_ => hir::Mutability::Mut,

View File

@ -463,7 +463,7 @@ fn index_user_dst() {
r#"
#[spirv(fragment)]
pub fn main(
#[spirv(uniform, descriptor_set = 0, binding = 0)] slice: &mut SliceF32,
#[spirv(uniform, descriptor_set = 0, binding = 0)] slice: &SliceF32,
) {
let float: f32 = slice.rta[0];
let _ = float;