remove SetDataOptions
parent
0c153607f5
commit
65d5a65e9d
|
@ -96,12 +96,6 @@ typedef enum Refresh_StoreOp
|
|||
REFRESH_STOREOP_DONT_CARE
|
||||
} Refresh_StoreOp;
|
||||
|
||||
typedef enum Refresh_SetDataOptions
|
||||
{
|
||||
REFRESH_SETDATAOPTIONS_IMMEDIATE,
|
||||
REFRESH_SETDATAOPTIONS_DEFERRED
|
||||
} Refresh_SetDataOptions;
|
||||
|
||||
typedef enum Refresh_ClearOptionsBits
|
||||
{
|
||||
REFRESH_CLEAROPTIONS_COLOR = 0x00000001,
|
||||
|
@ -968,7 +962,6 @@ REFRESHAPI void Refresh_CopyTextureToBuffer(
|
|||
* offsetInBytes: The starting offset of the buffer to write into.
|
||||
* data: The client data to write into the buffer.
|
||||
* dataLength: The length of data from the client buffer to write.
|
||||
* setDataOption: Specifies how the buffer data will be copied.
|
||||
*/
|
||||
REFRESHAPI void Refresh_SetBufferData(
|
||||
Refresh_Device *device,
|
||||
|
@ -976,8 +969,7 @@ REFRESHAPI void Refresh_SetBufferData(
|
|||
Refresh_Buffer *buffer,
|
||||
uint32_t offsetInBytes,
|
||||
void* data,
|
||||
uint32_t dataLength,
|
||||
Refresh_SetDataOptions setDataOption
|
||||
uint32_t dataLength
|
||||
);
|
||||
|
||||
/* Pushes vertex shader params to the device.
|
||||
|
|
|
@ -457,8 +457,7 @@ void Refresh_SetBufferData(
|
|||
Refresh_Buffer *buffer,
|
||||
uint32_t offsetInBytes,
|
||||
void* data,
|
||||
uint32_t dataLength,
|
||||
Refresh_SetDataOptions setDataOption
|
||||
uint32_t dataLength
|
||||
) {
|
||||
NULL_RETURN(device);
|
||||
device->SetBufferData(
|
||||
|
@ -467,8 +466,7 @@ void Refresh_SetBufferData(
|
|||
buffer,
|
||||
offsetInBytes,
|
||||
data,
|
||||
dataLength,
|
||||
setDataOption
|
||||
dataLength
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -310,8 +310,7 @@ struct Refresh_Device
|
|||
Refresh_Buffer *buffer,
|
||||
uint32_t offsetInBytes,
|
||||
void* data,
|
||||
uint32_t dataLength,
|
||||
Refresh_SetDataOptions setDataOption
|
||||
uint32_t dataLength
|
||||
);
|
||||
|
||||
uint32_t(*PushVertexShaderUniforms)(
|
||||
|
|
|
@ -6332,6 +6332,12 @@ static void VULKAN_SetTextureData(
|
|||
VkBufferImageCopy imageCopy;
|
||||
uint8_t *stagingBufferPointer;
|
||||
|
||||
if (vulkanCommandBuffer->renderPassInProgress)
|
||||
{
|
||||
Refresh_LogError("Cannot perform buffer updates mid-render pass!");
|
||||
return;
|
||||
}
|
||||
|
||||
VULKAN_INTERNAL_MaybeExpandTransferBuffer(
|
||||
renderer,
|
||||
vulkanCommandBuffer,
|
||||
|
@ -6757,8 +6763,7 @@ static void VULKAN_SetBufferData(
|
|||
Refresh_Buffer *buffer,
|
||||
uint32_t offsetInBytes,
|
||||
void* data,
|
||||
uint32_t dataLength,
|
||||
Refresh_SetDataOptions setDataOption
|
||||
uint32_t dataLength
|
||||
) {
|
||||
VulkanRenderer* renderer = (VulkanRenderer*) driverData;
|
||||
VulkanCommandBuffer* vulkanCommandBuffer = (VulkanCommandBuffer*) commandBuffer;
|
||||
|
@ -6767,11 +6772,9 @@ static void VULKAN_SetBufferData(
|
|||
uint8_t* transferBufferPointer;
|
||||
VkBufferCopy bufferCopy;
|
||||
|
||||
if (setDataOption == REFRESH_SETDATAOPTIONS_DEFERRED)
|
||||
{
|
||||
if (vulkanCommandBuffer->renderPassInProgress)
|
||||
{
|
||||
Refresh_LogError("Cannot perform deferred buffer updates mid-render pass!");
|
||||
Refresh_LogError("Cannot perform buffer updates mid-render pass!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -6819,20 +6822,6 @@ static void VULKAN_SetBufferData(
|
|||
1,
|
||||
&bufferCopy
|
||||
);
|
||||
}
|
||||
else if (setDataOption == REFRESH_SETDATAOPTIONS_IMMEDIATE)
|
||||
{
|
||||
VULKAN_INTERNAL_SetBufferData(
|
||||
vulkanBuffer,
|
||||
offsetInBytes,
|
||||
data,
|
||||
dataLength
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
Refresh_LogError("Unrecognized Refresh_SetDataOptions value!");
|
||||
}
|
||||
}
|
||||
|
||||
/* FIXME: this should return uint64_t */
|
||||
|
|
Loading…
Reference in New Issue