improving CTS support
This commit is contained in:
@@ -21,6 +21,8 @@ pub fn create(device: *SoftDevice, allocator: std.mem.Allocator, size: vk.Device
|
||||
.destroy = destroy,
|
||||
.map = map,
|
||||
.unmap = unmap,
|
||||
.flushRange = flushRange,
|
||||
.invalidateRange = invalidateRange,
|
||||
};
|
||||
|
||||
self.* = .{
|
||||
@@ -37,6 +39,20 @@ pub fn destroy(interface: *Interface, allocator: std.mem.Allocator) void {
|
||||
allocator.destroy(self);
|
||||
}
|
||||
|
||||
pub fn flushRange(interface: *Interface, offset: vk.DeviceSize, size: vk.DeviceSize) VkError!void {
|
||||
// No-op, host and device memory are the same for software driver
|
||||
_ = interface;
|
||||
_ = offset;
|
||||
_ = size;
|
||||
}
|
||||
|
||||
pub fn invalidateRange(interface: *Interface, offset: vk.DeviceSize, size: vk.DeviceSize) VkError!void {
|
||||
// No-op, host and device memory are the same for software driver
|
||||
_ = interface;
|
||||
_ = offset;
|
||||
_ = size;
|
||||
}
|
||||
|
||||
pub fn map(interface: *Interface, offset: vk.DeviceSize, size: vk.DeviceSize) VkError!?*anyopaque {
|
||||
const self: *Self = @alignCast(@fieldParentPtr("interface", interface));
|
||||
if (offset >= self.data.len or (size != vk.WHOLE_SIZE and offset + size > self.data.len)) {
|
||||
|
||||
Reference in New Issue
Block a user