From 5f8095c862e9f196ad7f47d011b0746d060145e4 Mon Sep 17 00:00:00 2001 From: msiglreith Date: Wed, 19 May 2021 21:44:08 +0200 Subject: [PATCH 1/2] asm: support sampler and as types --- crates/rustc_codegen_spirv/src/builder/spirv_asm.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/rustc_codegen_spirv/src/builder/spirv_asm.rs b/crates/rustc_codegen_spirv/src/builder/spirv_asm.rs index 810aa0678a..74ea413002 100644 --- a/crates/rustc_codegen_spirv/src/builder/spirv_asm.rs +++ b/crates/rustc_codegen_spirv/src/builder/spirv_asm.rs @@ -311,6 +311,8 @@ impl<'cx, 'tcx> Builder<'cx, 'tcx> { image_type: inst.operands[0].unwrap_id_ref(), } .def(self.span(), self), + Op::TypeSampler => SpirvType::Sampler.def(self.span(), self), + Op::TypeAccelerationStructureKHR => SpirvType::AccelerationStructureKhr.def(self.span(), self), Op::TypeRayQueryKHR => SpirvType::RayQueryKhr.def(self.span(), self), Op::Variable => { // OpVariable with Function storage class should be emitted inside the function, From d1049df314582e951936b88a1b1c5039445c1174 Mon Sep 17 00:00:00 2001 From: msiglreith Date: Thu, 20 May 2021 08:19:10 +0200 Subject: [PATCH 2/2] fmt --- crates/rustc_codegen_spirv/src/builder/spirv_asm.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/rustc_codegen_spirv/src/builder/spirv_asm.rs b/crates/rustc_codegen_spirv/src/builder/spirv_asm.rs index 74ea413002..1f816fa233 100644 --- a/crates/rustc_codegen_spirv/src/builder/spirv_asm.rs +++ b/crates/rustc_codegen_spirv/src/builder/spirv_asm.rs @@ -312,7 +312,9 @@ impl<'cx, 'tcx> Builder<'cx, 'tcx> { } .def(self.span(), self), Op::TypeSampler => SpirvType::Sampler.def(self.span(), self), - Op::TypeAccelerationStructureKHR => SpirvType::AccelerationStructureKhr.def(self.span(), self), + Op::TypeAccelerationStructureKHR => { + SpirvType::AccelerationStructureKhr.def(self.span(), self) + } Op::TypeRayQueryKHR => SpirvType::RayQueryKhr.def(self.span(), self), Op::Variable => { // OpVariable with Function storage class should be emitted inside the function,