From fdb29ade82d730ede35836521676c28677bc3eb3 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Fri, 16 Feb 2024 18:44:16 -0800 Subject: [PATCH] remove map/unmap calls --- include/Refresh.h | 22 ---------------------- src/Refresh.c | 28 ---------------------------- src/Refresh_Driver.h | 14 -------------- 3 files changed, 64 deletions(-) diff --git a/include/Refresh.h b/include/Refresh.h index 7f53ed2..47d5058 100644 --- a/include/Refresh.h +++ b/include/Refresh.h @@ -1043,28 +1043,6 @@ REFRESHAPI void Refresh_EndComputePass( Refresh_CommandBuffer *commandBuffer ); -/* CpuBuffer Map */ - -/* Maps a CpuBuffer to host memory. Returns a pointer that can be copied to. - * - * NOTE: Mapping a CpuBuffer that is already mapped is an error. - * - * offsetInBytes: The offset of the buffer to map. - * sizeInBytes: The number of bytes of memory to map. - */ -REFRESHAPI void* Refresh_MapCpuBuffer( - Refresh_Device *device, - Refresh_CpuBuffer *buffer, - uint32_t offsetInBytes, - uint32_t sizeInBytes -); - -/* Unmaps a mapped CpuBuffer. Call this when you are done copying data. */ -REFRESHAPI void Refresh_UnmapCpuBuffer( - Refresh_Device *device, - Refresh_CpuBuffer *buffer -); - /* Copy Pass */ /* Begins a copy pass. */ diff --git a/src/Refresh.c b/src/Refresh.c index 7487cec..7ec0e77 100644 --- a/src/Refresh.c +++ b/src/Refresh.c @@ -730,34 +730,6 @@ void Refresh_EndComputePass( ); } -/* CpuBuffer Map */ - -void* Refresh_MapCpuBuffer( - Refresh_Device *device, - Refresh_CpuBuffer *buffer, - uint32_t offsetInBytes, - uint32_t sizeInBytes -) { - NULL_RETURN_NULL(device); - return device->MapCpuBuffer( - device->driverData, - buffer, - offsetInBytes, - sizeInBytes - ); -} - -void Refresh_UnmapCpuBuffer( - Refresh_Device *device, - Refresh_CpuBuffer *buffer -) { - NULL_RETURN(device); - device->UnmapCpuBuffer( - device->driverData, - buffer - ); -} - /* Copy Pass */ void Refresh_BeginCopyPass( diff --git a/src/Refresh_Driver.h b/src/Refresh_Driver.h index 3b8f098..4e9c683 100644 --- a/src/Refresh_Driver.h +++ b/src/Refresh_Driver.h @@ -413,20 +413,6 @@ struct Refresh_Device Refresh_CommandBuffer *commandBuffer ); - /* CpuBuffer map/unmap */ - - void* (*MapCpuBuffer)( - Refresh_Renderer *driverData, - Refresh_CpuBuffer *buffer, - uint32_t offsetInBytes, - uint32_t sizeInBytes - ); - - void (*UnmapCpuBuffer)( - Refresh_Renderer *driverData, - Refresh_CpuBuffer *buffer - ); - /* Copy Pass */ void (*BeginCopyPass)(