diff --git a/include/Refresh.h b/include/Refresh.h index f36b32f..02748b5 100644 --- a/include/Refresh.h +++ b/include/Refresh.h @@ -995,7 +995,7 @@ REFRESHAPI void Refresh_SetBufferData( */ REFRESHAPI uint32_t Refresh_PushVertexShaderUniforms( Refresh_Device *device, - Refresh_CommandBuffer *commandBuffer, + Refresh_GraphicsPipeline *pipeline, void *data, uint32_t dataLengthInBytes ); @@ -1012,7 +1012,7 @@ REFRESHAPI uint32_t Refresh_PushVertexShaderUniforms( */ REFRESHAPI uint32_t Refresh_PushFragmentShaderUniforms( Refresh_Device *device, - Refresh_CommandBuffer *commandBuffer, + Refresh_GraphicsPipeline *pipeline, void *data, uint32_t dataLengthInBytes ); @@ -1029,7 +1029,7 @@ REFRESHAPI uint32_t Refresh_PushFragmentShaderUniforms( */ REFRESHAPI uint32_t Refresh_PushComputeShaderUniforms( Refresh_Device *device, - Refresh_CommandBuffer *commandBuffer, + Refresh_ComputePipeline *pipeline, void *data, uint32_t dataLengthInBytes ); diff --git a/src/Refresh.c b/src/Refresh.c index 8d3e2f4..906e8ce 100644 --- a/src/Refresh.c +++ b/src/Refresh.c @@ -466,14 +466,14 @@ void Refresh_SetBufferData( uint32_t Refresh_PushVertexShaderUniforms( Refresh_Device *device, - Refresh_CommandBuffer *commandBuffer, + Refresh_GraphicsPipeline *pipeline, void *data, uint32_t dataLengthInBytes ) { if (device == NULL) { return 0; } return device->PushVertexShaderUniforms( device->driverData, - commandBuffer, + pipeline, data, dataLengthInBytes ); @@ -481,14 +481,14 @@ uint32_t Refresh_PushVertexShaderUniforms( uint32_t Refresh_PushFragmentShaderUniforms( Refresh_Device *device, - Refresh_CommandBuffer *commandBuffer, + Refresh_GraphicsPipeline * pipeline, void *data, uint32_t dataLengthInBytes ) { if (device == NULL) { return 0; } return device->PushFragmentShaderUniforms( device->driverData, - commandBuffer, + pipeline, data, dataLengthInBytes ); @@ -496,14 +496,14 @@ uint32_t Refresh_PushFragmentShaderUniforms( uint32_t Refresh_PushComputeShaderUniforms( Refresh_Device *device, - Refresh_CommandBuffer *commandBuffer, + Refresh_ComputePipeline *pipeline, void *data, uint32_t dataLengthInBytes ) { if (device == NULL) { return 0; } return device->PushComputeShaderUniforms( device->driverData, - commandBuffer, + pipeline, data, dataLengthInBytes ); diff --git a/src/Refresh_Driver.h b/src/Refresh_Driver.h index bf74867..1b3e8d1 100644 --- a/src/Refresh_Driver.h +++ b/src/Refresh_Driver.h @@ -312,21 +312,21 @@ struct Refresh_Device uint32_t(*PushVertexShaderUniforms)( Refresh_Renderer *driverData, - Refresh_CommandBuffer *commandBuffer, + Refresh_GraphicsPipeline* pipeline, void *data, uint32_t dataLengthInBytes ); uint32_t(*PushFragmentShaderUniforms)( Refresh_Renderer *driverData, - Refresh_CommandBuffer *commandBuffer, + Refresh_GraphicsPipeline *pipeline, void *data, uint32_t dataLengthInBytes ); uint32_t (*PushComputeShaderUniforms)( Refresh_Renderer *driverData, - Refresh_CommandBuffer *commandBuffer, + Refresh_ComputePipeline *pipeline, void *data, uint32_t dataLengthInBytes ); diff --git a/src/Refresh_Driver_Vulkan.c b/src/Refresh_Driver_Vulkan.c index 11eebf2..08d107b 100644 --- a/src/Refresh_Driver_Vulkan.c +++ b/src/Refresh_Driver_Vulkan.c @@ -6553,21 +6553,21 @@ static void VULKAN_SetBufferData( static uint32_t VULKAN_PushVertexShaderUniforms( Refresh_Renderer *driverData, - Refresh_CommandBuffer *commandBuffer, + Refresh_GraphicsPipeline *pipeline, void *data, uint32_t dataLengthInBytes ) { VulkanRenderer* renderer = (VulkanRenderer*) driverData; - VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer*) commandBuffer; + VulkanGraphicsPipeline* graphicsPipeline = (VulkanGraphicsPipeline*) pipeline; SDL_LockMutex(renderer->uniformBufferLock); renderer->vertexUBOOffset += renderer->vertexUBOBlockIncrement; - renderer->vertexUBOBlockIncrement = vulkanCommandBuffer->currentGraphicsPipeline->vertexUBOBlockSize; + renderer->vertexUBOBlockIncrement = graphicsPipeline->vertexUBOBlockSize; if ( renderer->vertexUBOOffset + - vulkanCommandBuffer->currentGraphicsPipeline->vertexUBOBlockSize >= + graphicsPipeline->vertexUBOBlockSize >= UBO_BUFFER_SIZE * (renderer->frameIndex + 1) ) { Refresh_LogError("Vertex UBO overflow!"); @@ -6589,21 +6589,21 @@ static uint32_t VULKAN_PushVertexShaderUniforms( static uint32_t VULKAN_PushFragmentShaderUniforms( Refresh_Renderer *driverData, - Refresh_CommandBuffer *commandBuffer, + Refresh_GraphicsPipeline *pipeline, void *data, uint32_t dataLengthInBytes ) { VulkanRenderer* renderer = (VulkanRenderer*) driverData; - VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer*) commandBuffer; + VulkanGraphicsPipeline* graphicsPipeline = (VulkanGraphicsPipeline*) pipeline; SDL_LockMutex(renderer->uniformBufferLock); renderer->fragmentUBOOffset += renderer->fragmentUBOBlockIncrement; - renderer->fragmentUBOBlockIncrement = vulkanCommandBuffer->currentGraphicsPipeline->fragmentUBOBlockSize; + renderer->fragmentUBOBlockIncrement = graphicsPipeline->fragmentUBOBlockSize; if ( renderer->fragmentUBOOffset + - vulkanCommandBuffer->currentGraphicsPipeline->fragmentUBOBlockSize >= + graphicsPipeline->fragmentUBOBlockSize >= UBO_BUFFER_SIZE * (renderer->frameIndex + 1) ) { Refresh_LogError("Fragment UBO overflow!"); @@ -6625,21 +6625,21 @@ static uint32_t VULKAN_PushFragmentShaderUniforms( static uint32_t VULKAN_PushComputeShaderUniforms( Refresh_Renderer *driverData, - Refresh_CommandBuffer *commandBuffer, + Refresh_ComputePipeline *pipeline, void *data, uint32_t dataLengthInBytes ) { VulkanRenderer* renderer = (VulkanRenderer*) driverData; - VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer*) commandBuffer; + VulkanComputePipeline* computePipeline = (VulkanComputePipeline*) pipeline; SDL_LockMutex(renderer->uniformBufferLock); renderer->computeUBOOffset += renderer->computeUBOBlockIncrement; - renderer->computeUBOBlockIncrement = vulkanCommandBuffer->currentComputePipeline->computeUBOBlockSize; + renderer->computeUBOBlockIncrement = computePipeline->computeUBOBlockSize; if ( renderer->computeUBOOffset + - vulkanCommandBuffer->currentComputePipeline->computeUBOBlockSize >= + computePipeline->computeUBOBlockSize >= UBO_BUFFER_SIZE * (renderer->frameIndex + 1) ) { Refresh_LogError("Compute UBO overflow!");