File tree Expand file tree Collapse file tree 2 files changed +4
-12
lines changed
crates/rustc_codegen_spirv/src/codegen_cx
tests/compiletests/ui/spirv-attr Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -881,7 +881,7 @@ impl<'tcx> CodegenCx<'tcx> {
881881 Decoration :: Location ,
882882 std:: iter:: once ( Operand :: LiteralBit32 ( * location) ) ,
883883 ) ;
884- * location += 1 ;
884+ * location += value_layout . size . bytes ( ) . div_ceil ( 16 ) as u32 ;
885885 }
886886
887887 match storage_class {
Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ OpName %5 "out4"
1919OpMemberDecorate %9 0 Offset 0
2020OpMemberDecorate %9 1 Offset 16
2121OpDecorate %2 Location 0
22- OpDecorate %3 Location 1
23- OpDecorate %4 Location 2
24- OpDecorate %5 Location 3
22+ OpDecorate %3 Location 2
23+ OpDecorate %4 Location 3
24+ OpDecorate %5 Location 7
2525%10 = OpTypeFloat 32
2626%11 = OpTypeVector %10 4
2727%12 = OpTypeVector %10 2
@@ -68,11 +68,3 @@ OpStore %5 %19
6868OpNoLine
6969OpReturn
7070OpFunctionEnd
71- error: error:0:0 - [VUID-StandaloneSpirv-OpEntryPoint-08722] Entry-point has conflicting output location assignment at location 1, component 0
72- OpEntryPoint Vertex %1 "main" %out1 %out2 %out3 %out4
73- |
74- = note: spirv-val failed
75- = note: module `$TEST_BUILD_DIR/spirv-attr/location_assignment.vulkan1.2`
76-
77- error: aborting due to 1 previous error
78-
You can’t perform that action at this time.
0 commit comments