authorgravatar for alichraghi@proton.meAli Chraghi <alichraghi@proton.me> 2026-06-30 11:34:55+03:30
committergravatar for alichraghi@proton.meAli Chraghi <alichraghi@proton.me> 2026-06-30 11:58:33+03:30
logae4fc20de3543370e8a27989c5957e34f4638676
tree4186746bb951e75047a7ec06ac0ab72e506b5bd5
parentbe7634b82829cbd0ba6c1845a7ce91cc1aa60f88

spirv: decorate const storage buffers as NonWritable


1 files changed, 3 insertions(+), 0 deletions(-)

src/codegen/spirv/CodeGen.zig+3
...@@ -894,6 +894,9 @@ pub fn genNav(cg: *CodeGen, do_codegen: bool) Error!void {...@@ -894,6 +894,9 @@ pub fn genNav(cg: *CodeGen, do_codegen: bool) Error!void {
894 });894 });
895 if (!cg.needsLayout(as, ty)) try cg.decorateLayout(ty, ty_id);895 if (!cg.needsLayout(as, ty)) try cg.decorateLayout(ty, ty_id);
896 }896 }
897 if (key.is_const and storage_class == .storage_buffer) {
898 try cg.decorate(result_id, .non_writable);
899 }
897 },900 },
898 else => {},901 else => {},
899 }902 }