uniform API update
continuous-integration/drone/push Build is passing Details

pull/1/head
cosmonaut 2021-02-02 16:37:01 -08:00
parent 4699c158f3
commit 7f3e89315e
4 changed files with 26 additions and 26 deletions

View File

@ -991,13 +991,13 @@ REFRESHAPI void Refresh_SetBufferData(
* Will use the block size of the currently bound vertex shader. * Will use the block size of the currently bound vertex shader.
* *
* data: The client data to write into the buffer. * data: The client data to write into the buffer.
* paramBlockCount: The number of param-sized blocks from the client buffer to write. * dataLengthInBytes: The length of the data to write.
*/ */
REFRESHAPI uint32_t Refresh_PushVertexShaderUniforms( REFRESHAPI uint32_t Refresh_PushVertexShaderUniforms(
Refresh_Device *device, Refresh_Device *device,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
void *data, void *data,
uint32_t paramBlockCount uint32_t dataLengthInBytes
); );
/* Pushes fragment shader params to the device. /* Pushes fragment shader params to the device.
@ -1008,13 +1008,13 @@ REFRESHAPI uint32_t Refresh_PushVertexShaderUniforms(
* Will use the block size of the currently bound fragment shader. * Will use the block size of the currently bound fragment shader.
* *
* data: The client data to write into the buffer. * data: The client data to write into the buffer.
* paramBlockCount: The number of param-sized blocks from the client buffer to write. * dataLengthInBytes: The length of the data to write.
*/ */
REFRESHAPI uint32_t Refresh_PushFragmentShaderUniforms( REFRESHAPI uint32_t Refresh_PushFragmentShaderUniforms(
Refresh_Device *device, Refresh_Device *device,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
void *data, void *data,
uint32_t paramBlockCount uint32_t dataLengthInBytes
); );
/* Pushes compute shader params to the device. /* Pushes compute shader params to the device.
@ -1025,13 +1025,13 @@ REFRESHAPI uint32_t Refresh_PushFragmentShaderUniforms(
* Will use the block size of the currently bound compute shader. * Will use the block size of the currently bound compute shader.
* *
* data: The client data to write into the buffer. * data: The client data to write into the buffer.
* paramBlockData: The number of param-sized blocks from the client buffer to write. * dataLengthInBytes: The length of the data to write.
*/ */
REFRESHAPI uint32_t Refresh_PushComputeShaderUniforms( REFRESHAPI uint32_t Refresh_PushComputeShaderUniforms(
Refresh_Device *device, Refresh_Device *device,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
void *data, void *data,
uint32_t paramBlockCount uint32_t dataLengthInBytes
); );
/* Getters */ /* Getters */

View File

@ -468,14 +468,14 @@ uint32_t Refresh_PushVertexShaderUniforms(
Refresh_Device *device, Refresh_Device *device,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
void *data, void *data,
uint32_t elementCount uint32_t dataLengthInBytes
) { ) {
if (device == NULL) { return 0; } if (device == NULL) { return 0; }
return device->PushVertexShaderUniforms( return device->PushVertexShaderUniforms(
device->driverData, device->driverData,
commandBuffer, commandBuffer,
data, data,
elementCount dataLengthInBytes
); );
} }
@ -483,14 +483,14 @@ uint32_t Refresh_PushFragmentShaderUniforms(
Refresh_Device *device, Refresh_Device *device,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
void *data, void *data,
uint32_t elementCount uint32_t dataLengthInBytes
) { ) {
if (device == NULL) { return 0; } if (device == NULL) { return 0; }
return device->PushFragmentShaderUniforms( return device->PushFragmentShaderUniforms(
device->driverData, device->driverData,
commandBuffer, commandBuffer,
data, data,
elementCount dataLengthInBytes
); );
} }
@ -498,14 +498,14 @@ uint32_t Refresh_PushComputeShaderUniforms(
Refresh_Device *device, Refresh_Device *device,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
void *data, void *data,
uint32_t elementCount uint32_t dataLengthInBytes
) { ) {
if (device == NULL) { return 0; } if (device == NULL) { return 0; }
return device->PushComputeShaderUniforms( return device->PushComputeShaderUniforms(
device->driverData, device->driverData,
commandBuffer, commandBuffer,
data, data,
elementCount dataLengthInBytes
); );
} }

View File

@ -314,21 +314,21 @@ struct Refresh_Device
Refresh_Renderer *driverData, Refresh_Renderer *driverData,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
void *data, void *data,
uint32_t elementCount uint32_t dataLengthInBytes
); );
uint32_t(*PushFragmentShaderUniforms)( uint32_t(*PushFragmentShaderUniforms)(
Refresh_Renderer *driverData, Refresh_Renderer *driverData,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
void *data, void *data,
uint32_t elementCount uint32_t dataLengthInBytes
); );
uint32_t (*PushComputeShaderUniforms)( uint32_t (*PushComputeShaderUniforms)(
Refresh_Renderer *driverData, Refresh_Renderer *driverData,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
void *data, void *data,
uint32_t elementCount uint32_t dataLengthInBytes
); );
void(*BindVertexSamplers)( void(*BindVertexSamplers)(

View File

@ -6555,7 +6555,7 @@ static uint32_t VULKAN_PushVertexShaderUniforms(
Refresh_Renderer *driverData, Refresh_Renderer *driverData,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
void *data, void *data,
uint32_t elementCount uint32_t dataLengthInBytes
) { ) {
VulkanRenderer* renderer = (VulkanRenderer*) driverData; VulkanRenderer* renderer = (VulkanRenderer*) driverData;
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer*) commandBuffer; VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer*) commandBuffer;
@ -6579,7 +6579,7 @@ static uint32_t VULKAN_PushVertexShaderUniforms(
(Refresh_Buffer*) renderer->vertexUBO, (Refresh_Buffer*) renderer->vertexUBO,
renderer->vertexUBOOffset, renderer->vertexUBOOffset,
data, data,
elementCount * vulkanCommandBuffer->currentGraphicsPipeline->vertexUBOBlockSize dataLengthInBytes
); );
SDL_UnlockMutex(renderer->uniformBufferLock); SDL_UnlockMutex(renderer->uniformBufferLock);
@ -6591,7 +6591,7 @@ static uint32_t VULKAN_PushFragmentShaderUniforms(
Refresh_Renderer *driverData, Refresh_Renderer *driverData,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
void *data, void *data,
uint32_t elementCount uint32_t dataLengthInBytes
) { ) {
VulkanRenderer* renderer = (VulkanRenderer*) driverData; VulkanRenderer* renderer = (VulkanRenderer*) driverData;
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer*) commandBuffer; VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer*) commandBuffer;
@ -6615,7 +6615,7 @@ static uint32_t VULKAN_PushFragmentShaderUniforms(
(Refresh_Buffer*) renderer->fragmentUBO, (Refresh_Buffer*) renderer->fragmentUBO,
renderer->fragmentUBOOffset, renderer->fragmentUBOOffset,
data, data,
elementCount * vulkanCommandBuffer->currentGraphicsPipeline->fragmentUBOBlockSize dataLengthInBytes
); );
SDL_UnlockMutex(renderer->uniformBufferLock); SDL_UnlockMutex(renderer->uniformBufferLock);
@ -6627,7 +6627,7 @@ static uint32_t VULKAN_PushComputeShaderUniforms(
Refresh_Renderer *driverData, Refresh_Renderer *driverData,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
void *data, void *data,
uint32_t elementCount uint32_t dataLengthInBytes
) { ) {
VulkanRenderer* renderer = (VulkanRenderer*) driverData; VulkanRenderer* renderer = (VulkanRenderer*) driverData;
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer*) commandBuffer; VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer*) commandBuffer;
@ -6651,7 +6651,7 @@ static uint32_t VULKAN_PushComputeShaderUniforms(
(Refresh_Buffer*) renderer->computeUBO, (Refresh_Buffer*) renderer->computeUBO,
renderer->computeUBOOffset, renderer->computeUBOOffset,
data, data,
elementCount * vulkanCommandBuffer->currentComputePipeline->computeUBOBlockSize dataLengthInBytes
); );
SDL_UnlockMutex(renderer->uniformBufferLock); SDL_UnlockMutex(renderer->uniformBufferLock);