spirv: make all vulkan structs Block for now

This commit is contained in:
Robin Voetter 2024-11-02 18:57:50 +01:00
parent d35dfc5a3f
commit b16252b17e
No known key found for this signature in database

View File

@ -1396,10 +1396,6 @@ const NavGen = struct {
const child_ty_id = try self.resolveType(child_ty, child_repr);
if (storage_class == .Uniform or storage_class == .PushConstant) {
try self.spv.decorate(child_ty_id, .Block);
}
try self.spv.sections.types_globals_constants.emit(self.spv.gpa, .OpTypePointer, .{
.id_result = result_id,
.storage_class = storage_class,
@ -1746,6 +1742,10 @@ const NavGen = struct {
defer self.gpa.free(type_name);
try self.spv.debugName(result_id, type_name);
if (target.os.tag == .vulkan) {
try self.spv.decorate(result_id, .Block); // Decorate all structs as block for now...
}
return result_id;
},
.struct_type => ip.loadStructType(ty.toIntern()),
@ -1791,6 +1791,10 @@ const NavGen = struct {
defer self.gpa.free(type_name);
try self.spv.debugName(result_id, type_name);
if (target.os.tag == .vulkan) {
try self.spv.decorate(result_id, .Block); // Decorate all structs as block for now...
}
return result_id;
},
.optional => {