diff --git a/include/Refresh.h b/include/Refresh.h index a527c63..8594c1d 100644 --- a/include/Refresh.h +++ b/include/Refresh.h @@ -1064,6 +1064,8 @@ REFRESHAPI void Refresh_EndComputePass( /* 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. @@ -1102,8 +1104,8 @@ REFRESHAPI void Refresh_UploadToTexture( Refresh_Device *device, Refresh_CommandBuffer *commandBuffer, Refresh_CpuBuffer *cpuBuffer, - Refresh_BufferImageCopy *copyParams, - Refresh_TextureSlice *textureSlice + Refresh_TextureSlice *textureSlice, + Refresh_BufferImageCopy *copyParams ); /* Uploads data from a CpuBuffer to a GpuBuffer. */ @@ -1165,8 +1167,8 @@ REFRESHAPI void Refresh_CopyBufferToTexture( Refresh_Device *device, Refresh_CommandBuffer *commandBuffer, Refresh_GpuBuffer *buffer, - Refresh_BufferImageCopy *copyParams, - Refresh_TextureSlice *textureSlice + Refresh_TextureSlice *textureSlice, + Refresh_BufferImageCopy *copyParams ); /* Copies data from a buffer to a buffer. */ diff --git a/src/Refresh.c b/src/Refresh.c index d5c24fc..3384950 100644 --- a/src/Refresh.c +++ b/src/Refresh.c @@ -793,16 +793,16 @@ void Refresh_UploadToTexture( Refresh_Device *device, Refresh_CommandBuffer *commandBuffer, Refresh_CpuBuffer *cpuBuffer, - Refresh_BufferImageCopy *copyParams, - Refresh_TextureSlice *textureSlice + Refresh_TextureSlice *textureSlice, + Refresh_BufferImageCopy *copyParams ) { NULL_RETURN(device); device->UploadToTexture( device->driverData, commandBuffer, cpuBuffer, - copyParams, - textureSlice + textureSlice, + copyParams ); } @@ -893,16 +893,16 @@ void Refresh_CopyBufferToTexture( Refresh_Device *device, Refresh_CommandBuffer *commandBuffer, Refresh_GpuBuffer *buffer, - Refresh_BufferImageCopy *copyParams, - Refresh_TextureSlice *textureSlice + Refresh_TextureSlice *textureSlice, + Refresh_BufferImageCopy *copyParams ) { NULL_RETURN(device); device->CopyBufferToTexture( device->driverData, commandBuffer, buffer, - copyParams, - textureSlice + textureSlice, + copyParams ); } diff --git a/src/Refresh_Driver.h b/src/Refresh_Driver.h index 2514efa..949c191 100644 --- a/src/Refresh_Driver.h +++ b/src/Refresh_Driver.h @@ -447,8 +447,8 @@ struct Refresh_Device Refresh_Renderer *driverData, Refresh_CommandBuffer *commandBuffer, Refresh_CpuBuffer *cpuBuffer, - Refresh_BufferImageCopy *copyParams, - Refresh_TextureSlice *textureSlice + Refresh_TextureSlice *textureSlice, + Refresh_BufferImageCopy *copyParams ); void (*UploadToBuffer)( @@ -494,8 +494,8 @@ struct Refresh_Device Refresh_Renderer *driverData, Refresh_CommandBuffer *commandBuffer, Refresh_GpuBuffer *buffer, - Refresh_BufferImageCopy *copyParams, - Refresh_TextureSlice *textureSlice + Refresh_TextureSlice *textureSlice, + Refresh_BufferImageCopy *copyParams ); void (*CopyBufferToBuffer)(