fixing image memory bits selectio
This commit is contained in:
@@ -72,7 +72,7 @@ pub fn bindMemory(self: *Self, memory: *DeviceMemory, offset: vk.DeviceSize) VkE
|
|||||||
|
|
||||||
pub fn getMemoryRequirements(self: *Self, requirements: *vk.MemoryRequirements) VkError!void {
|
pub fn getMemoryRequirements(self: *Self, requirements: *vk.MemoryRequirements) VkError!void {
|
||||||
requirements.size = try self.getTotalSize();
|
requirements.size = try self.getTotalSize();
|
||||||
requirements.memory_type_bits = 0;
|
requirements.memory_type_bits = 1;
|
||||||
try self.vtable.getMemoryRequirements(self, requirements);
|
try self.vtable.getMemoryRequirements(self, requirements);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,11 +84,13 @@ pub fn load() VkError!void {
|
|||||||
wl_shm_pool_interface = module.lookup(*wl_interface, "wl_shm_pool_interface") orelse return VkError.Unknown;
|
wl_shm_pool_interface = module.lookup(*wl_interface, "wl_shm_pool_interface") orelse return VkError.Unknown;
|
||||||
|
|
||||||
_ = ref_count.fetchAdd(1, .monotonic);
|
_ = ref_count.fetchAdd(1, .monotonic);
|
||||||
|
std.log.scoped(.WaylandClient).debug("Loaded wayland client lib", .{});
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn unload() void {
|
pub fn unload() void {
|
||||||
if (ref_count.fetchSub(1, .release) == 1) {
|
if (ref_count.fetchSub(1, .release) == 1) {
|
||||||
module.close();
|
module.close();
|
||||||
|
std.log.scoped(.WaylandClient).debug("Unloaded wayland client lib", .{});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,7 +102,7 @@ pub fn wl_registry_bind(registry: *wl_registry, name: u32, interface: *const wl_
|
|||||||
version,
|
version,
|
||||||
0,
|
0,
|
||||||
name,
|
name,
|
||||||
interface.*.name,
|
interface.name,
|
||||||
version,
|
version,
|
||||||
@as(?*anyopaque, null),
|
@as(?*anyopaque, null),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user