mirror of
https://github.com/Kbz-8/Pulse.git
synced 2026-01-11 07:23:35 +00:00
yes
This commit is contained in:
@@ -108,7 +108,6 @@ PulseImage VulkanCreateImage(PulseDevice device, const PulseImageCreateInfo* cre
|
||||
uint32_t layer_count = (create_infos->type == PULSE_IMAGE_TYPE_3D) ? 1 : create_infos->layer_count_or_depth;
|
||||
uint32_t depth = (create_infos->type == PULSE_IMAGE_TYPE_3D) ? create_infos->layer_count_or_depth : 1;
|
||||
|
||||
image->device = device;
|
||||
image->driver_data = vulkan_image;
|
||||
|
||||
VmaAllocationCreateInfo allocation_create_info = { 0 };
|
||||
|
||||
@@ -45,7 +45,7 @@ PulseBuffer WebGPUCreateBuffer(PulseDevice device, const PulseBufferCreateInfo*
|
||||
descriptor.usage |= WGPUBufferUsage_MapRead;
|
||||
}
|
||||
if(buffer->usage & PULSE_BUFFER_USAGE_TRANSFER_UPLOAD)
|
||||
descriptor.usage |= WGPUBufferUsage_CopyDst | WGPUBufferUsage_CopySrc;
|
||||
descriptor.usage |= WGPUBufferUsage_CopySrc;
|
||||
if(buffer->usage & PULSE_INTERNAL_BUFFER_USAGE_UNIFORM_ACCESS)
|
||||
descriptor.usage |= WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst | WGPUBufferUsage_CopySrc;
|
||||
|
||||
@@ -74,7 +74,7 @@ static void WebGPUMapBufferCallback(WGPUMapAsyncStatus status, WGPUStringView me
|
||||
"mapping was aborted",
|
||||
};
|
||||
if(PULSE_IS_BACKEND_LOW_LEVEL_DEBUG(buffer->device->backend))
|
||||
PulseLogErrorFmt(buffer->device->backend, "(WebGPU) buffer mapping failed because %s. %.*s", reasons[status], message.length, message.data);
|
||||
PulseLogErrorFmt(buffer->device->backend, "(WebGPU) buffer mapping failed because %s. %.*s", reasons[status - 1], message.length, message.data);
|
||||
PulseSetInternalError(PULSE_ERROR_MAP_FAILED);
|
||||
atomic_store(mapping_finished, 2);
|
||||
}
|
||||
|
||||
@@ -103,6 +103,7 @@ PULSE_API PulseImage PulseCreateImage(PulseDevice device, const PulseImageCreate
|
||||
if(image == PULSE_NULL_HANDLE)
|
||||
return PULSE_NULL_HANDLE;
|
||||
|
||||
image->device = device;
|
||||
image->type = create_infos->type;
|
||||
image->format = create_infos->format;
|
||||
image->usage = create_infos->usage;
|
||||
|
||||
Reference in New Issue
Block a user