Skip to content

Commit 71cbc92

Browse files
Firestar99LegNeato
authored andcommitted
fixed signed constant actually being unsigned
1 parent 88b2468 commit 71cbc92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/rustc_codegen_spirv/src/codegen_cx/constant.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl<'tcx> CodegenCx<'tcx> {
5454

5555
fn constant_int_from_native_signed(&self, span: Span, val: impl Into<i128>) -> SpirvValue {
5656
let size = Size::from_bytes(std::mem::size_of_val(&val));
57-
let ty = SpirvType::Integer(size.bits() as u32, false).def(span, self);
57+
let ty = SpirvType::Integer(size.bits() as u32, true).def(span, self);
5858
self.constant_int(ty, val.into() as u128)
5959
}
6060

0 commit comments

Comments
 (0)