Don't remove pointers on in_pointer parameters.

Previously pointers were removed here to facilitate using anonymous struct
literals. Now that Zig supports &.{, these are no longer required, and they
can be pointers again.

Note that there are still some problems in the Zig stage1 compiler, see
https://github.com/ziglang/zig/issues/7627 for example.
This commit is contained in:
Robin Voetter
2021-12-08 23:22:34 +01:00
parent 2952901939
commit d1e949a434
4 changed files with 55 additions and 55 deletions

View File

@@ -108,7 +108,7 @@ pub const GraphicsContext = struct {
.api_version = vk.API_VERSION_1_2,
};
self.instance = try self.vkb.createInstance(.{
self.instance = try self.vkb.createInstance(&.{
.flags = .{},
.p_application_info = &app_info,
.enabled_layer_count = 0,
@@ -160,7 +160,7 @@ pub const GraphicsContext = struct {
}
pub fn allocate(self: GraphicsContext, requirements: vk.MemoryRequirements, flags: vk.MemoryPropertyFlags) !vk.DeviceMemory {
return try self.vkd.allocateMemory(self.dev, .{
return try self.vkd.allocateMemory(self.dev, &.{
.allocation_size = requirements.size,
.memory_type_index = try self.findMemoryTypeIndex(requirements.memory_type_bits, flags),
}, null);
@@ -210,7 +210,7 @@ fn initializeCandidate(vki: InstanceDispatch, candidate: DeviceCandidate) !vk.De
else
2;
return try vki.createDevice(candidate.pdev, .{
return try vki.createDevice(candidate.pdev, &.{
.flags = .{},
.queue_create_info_count = queue_count,
.p_queue_create_infos = &qci,