rename AddDispose to QueueDestroy

submit_rewrite
cosmonaut 2021-01-05 17:02:36 -08:00
parent d3d9c9ad55
commit 4b6f17054c
4 changed files with 70 additions and 70 deletions

View File

@ -1065,121 +1065,121 @@ REFRESHAPI void Refresh_GetBufferData(
/* Disposal */
/* Sends a texture to be destroyed by the renderer. Note that we call it
* "AddDispose" because it may not be immediately destroyed by the renderer if
* "QueueDestroy" because it may not be immediately destroyed by the renderer if
* this is not called from the main thread (for example, if a garbage collector
* deletes the resource instead of the programmer).
*
* texture: The Refresh_Texture to be destroyed.
*/
REFRESHAPI void Refresh_AddDisposeTexture(
REFRESHAPI void Refresh_QueueDestroyTexture(
Refresh_Device *device,
Refresh_Texture *texture
);
/* Sends a sampler to be destroyed by the renderer. Note that we call it
* "AddDispose" because it may not be immediately destroyed by the renderer if
* "QueueDestroy" because it may not be immediately destroyed by the renderer if
* this is not called from the main thread (for example, if a garbage collector
* deletes the resource instead of the programmer).
*
* texture: The Refresh_Sampler to be destroyed.
*/
REFRESHAPI void Refresh_AddDisposeSampler(
REFRESHAPI void Refresh_QueueDestroySampler(
Refresh_Device *device,
Refresh_Sampler *sampler
);
/* Sends a buffer to be destroyed by the renderer. Note that we call it
* "AddDispose" because it may not be immediately destroyed by the renderer if
* "QueueDestroy" because it may not be immediately destroyed by the renderer if
* this is not called from the main thread (for example, if a garbage collector
* deletes the resource instead of the programmer).
*
* buffer: The Refresh_Buffer to be destroyed.
*/
REFRESHAPI void Refresh_AddDisposeBuffer(
REFRESHAPI void Refresh_QueueDestroyBuffer(
Refresh_Device *device,
Refresh_Buffer *buffer
);
/* Sends a color target to be destroyed by the renderer. Note that we call it
* "AddDispose" because it may not be immediately destroyed by the renderer if
* "QueueDestroy" because it may not be immediately destroyed by the renderer if
* this is not called from the main thread (for example, if a garbage collector
* deletes the resource instead of the programmer).
*
* colorTarget: The Refresh_ColorTarget to be destroyed.
*/
REFRESHAPI void Refresh_AddDisposeColorTarget(
REFRESHAPI void Refresh_QueueDestroyColorTarget(
Refresh_Device *device,
Refresh_ColorTarget *colorTarget
);
/* Sends a depth/stencil target to be destroyed by the renderer. Note that we call it
* "AddDispose" because it may not be immediately destroyed by the renderer if
* "QueueDestroy" because it may not be immediately destroyed by the renderer if
* this is not called from the main thread (for example, if a garbage collector
* deletes the resource instead of the programmer).
*
* depthStencilTarget: The Refresh_DepthStencilTarget to be destroyed.
*/
REFRESHAPI void Refresh_AddDisposeDepthStencilTarget(
REFRESHAPI void Refresh_QueueDestroyDepthStencilTarget(
Refresh_Device *device,
Refresh_DepthStencilTarget *depthStencilTarget
);
/* Sends a framebuffer to be destroyed by the renderer. Note that we call it
* "AddDispose" because it may not be immediately destroyed by the renderer if
* "QueueDestroy" because it may not be immediately destroyed by the renderer if
* this is not called from the main thread (for example, if a garbage collector
* deletes the resource instead of the programmer).
*
* framebuffer: The Refresh_Framebuffer to be destroyed.
*/
REFRESHAPI void Refresh_AddDisposeFramebuffer(
REFRESHAPI void Refresh_QueueDestroyFramebuffer(
Refresh_Device *device,
Refresh_Framebuffer *frameBuffer
);
/* Sends a shader module to be destroyed by the renderer. Note that we call it
* "AddDispose" because it may not be immediately destroyed by the renderer if
* "QueueDestroy" because it may not be immediately destroyed by the renderer if
* this is not called from the main thread (for example, if a garbage collector
* deletes the resource instead of the programmer).
*
* shaderModule: The Refresh_ShaderModule to be destroyed.
*/
REFRESHAPI void Refresh_AddDisposeShaderModule(
REFRESHAPI void Refresh_QueueDestroyShaderModule(
Refresh_Device *device,
Refresh_ShaderModule *shaderModule
);
/* Sends a render pass to be destroyed by the renderer. Note that we call it
* "AddDispose" because it may not be immediately destroyed by the renderer if
* "QueueDestroy" because it may not be immediately destroyed by the renderer if
* this is not called from the main thread (for example, if a garbage collector
* deletes the resource instead of the programmer).
*
* renderPass: The Refresh_RenderPass to be destroyed.
*/
REFRESHAPI void Refresh_AddDisposeRenderPass(
REFRESHAPI void Refresh_QueueDestroyRenderPass(
Refresh_Device *device,
Refresh_RenderPass *renderPass
);
/* Sends a compute pipeline to be destroyed by the renderer. Note that we call it
* "AddDispose" because it may not be immediately destroyed by the renderer if
* "QueueDestroy" because it may not be immediately destroyed by the renderer if
* this is not called from the main thread (for example, if a garbage collector
* deletes the resource instead of the programmer).
*
* computePipeline: The Refresh_ComputePipeline to be destroyed.
*/
REFRESHAPI void Refresh_AddDisposeComputePipeline(
REFRESHAPI void Refresh_QueueDestroyComputePipeline(
Refresh_Device *device,
Refresh_ComputePipeline *computePipeline
);
/* Sends a graphics pipeline to be destroyed by the renderer. Note that we call it
* "AddDispose" because it may not be immediately destroyed by the renderer if
* "QueueDestroy" because it may not be immediately destroyed by the renderer if
* this is not called from the main thread (for example, if a garbage collector
* deletes the resource instead of the programmer).
*
* graphicsPipeline: The Refresh_GraphicsPipeline to be destroyed.
*/
REFRESHAPI void Refresh_AddDisposeGraphicsPipeline(
REFRESHAPI void Refresh_QueueDestroyGraphicsPipeline(
Refresh_Device *device,
Refresh_GraphicsPipeline *graphicsPipeline
);

View File

@ -613,111 +613,111 @@ void Refresh_GetBufferData(
);
}
void Refresh_AddDisposeTexture(
void Refresh_QueueDestroyTexture(
Refresh_Device *device,
Refresh_Texture *texture
) {
NULL_RETURN(device);
device->AddDisposeTexture(
device->QueueDestroyTexture(
device->driverData,
texture
);
}
void Refresh_AddDisposeSampler(
void Refresh_QueueDestroySampler(
Refresh_Device *device,
Refresh_Sampler *sampler
) {
NULL_RETURN(device);
device->AddDisposeSampler(
device->QueueDestroySampler(
device->driverData,
sampler
);
}
void Refresh_AddDisposeBuffer(
void Refresh_QueueDestroyBuffer(
Refresh_Device *device,
Refresh_Buffer *buffer
) {
NULL_RETURN(device);
device->AddDisposeBuffer(
device->QueueDestroyBuffer(
device->driverData,
buffer
);
}
void Refresh_AddDisposeColorTarget(
void Refresh_QueueDestroyColorTarget(
Refresh_Device *device,
Refresh_ColorTarget *colorTarget
) {
NULL_RETURN(device);
device->AddDisposeColorTarget(
device->QueueDestroyColorTarget(
device->driverData,
colorTarget
);
}
void Refresh_AddDisposeDepthStencilTarget(
void Refresh_QueueDestroyDepthStencilTarget(
Refresh_Device *device,
Refresh_DepthStencilTarget *depthStencilTarget
) {
NULL_RETURN(device);
device->AddDisposeDepthStencilTarget(
device->QueueDestroyDepthStencilTarget(
device->driverData,
depthStencilTarget
);
}
void Refresh_AddDisposeFramebuffer(
void Refresh_QueueDestroyFramebuffer(
Refresh_Device *device,
Refresh_Framebuffer *frameBuffer
) {
NULL_RETURN(device);
device->AddDisposeFramebuffer(
device->QueueDestroyFramebuffer(
device->driverData,
frameBuffer
);
}
void Refresh_AddDisposeShaderModule(
void Refresh_QueueDestroyShaderModule(
Refresh_Device *device,
Refresh_ShaderModule *shaderModule
) {
NULL_RETURN(device);
device->AddDisposeShaderModule(
device->QueueDestroyShaderModule(
device->driverData,
shaderModule
);
}
void Refresh_AddDisposeRenderPass(
void Refresh_QueueDestroyRenderPass(
Refresh_Device *device,
Refresh_RenderPass *renderPass
) {
NULL_RETURN(device);
device->AddDisposeRenderPass(
device->QueueDestroyRenderPass(
device->driverData,
renderPass
);
}
void Refresh_AddDisposeComputePipeline(
void Refresh_QueueDestroyComputePipeline(
Refresh_Device *device,
Refresh_ComputePipeline *computePipeline
) {
NULL_RETURN(device);
device->AddDisposeComputePipeline(
device->QueueDestroyComputePipeline(
device->driverData,
computePipeline
);
}
void Refresh_AddDisposeGraphicsPipeline(
void Refresh_QueueDestroyGraphicsPipeline(
Refresh_Device *device,
Refresh_GraphicsPipeline *graphicsPipeline
) {
NULL_RETURN(device);
device->AddDisposeGraphicsPipeline(
device->QueueDestroyGraphicsPipeline(
device->driverData,
graphicsPipeline
);

View File

@ -394,52 +394,52 @@ struct Refresh_Device
/* Disposal */
void(*AddDisposeTexture)(
void(*QueueDestroyTexture)(
Refresh_Renderer *driverData,
Refresh_Texture *texture
);
void(*AddDisposeSampler)(
void(*QueueDestroySampler)(
Refresh_Renderer *driverData,
Refresh_Sampler *sampler
);
void(*AddDisposeBuffer)(
void(*QueueDestroyBuffer)(
Refresh_Renderer *driverData,
Refresh_Buffer *buffer
);
void(*AddDisposeColorTarget)(
void(*QueueDestroyColorTarget)(
Refresh_Renderer *driverData,
Refresh_ColorTarget *colorTarget
);
void(*AddDisposeDepthStencilTarget)(
void(*QueueDestroyDepthStencilTarget)(
Refresh_Renderer *driverData,
Refresh_DepthStencilTarget *depthStencilTarget
);
void(*AddDisposeFramebuffer)(
void(*QueueDestroyFramebuffer)(
Refresh_Renderer *driverData,
Refresh_Framebuffer *frameBuffer
);
void(*AddDisposeShaderModule)(
void(*QueueDestroyShaderModule)(
Refresh_Renderer *driverData,
Refresh_ShaderModule *shaderModule
);
void(*AddDisposeRenderPass)(
void(*QueueDestroyRenderPass)(
Refresh_Renderer *driverData,
Refresh_RenderPass *renderPass
);
void(*AddDisposeComputePipeline)(
void(*QueueDestroyComputePipeline)(
Refresh_Renderer *driverData,
Refresh_ComputePipeline *computePipeline
);
void(*AddDisposeGraphicsPipeline)(
void(*QueueDestroyGraphicsPipeline)(
Refresh_Renderer *driverData,
Refresh_GraphicsPipeline *graphicsPipeline
);
@ -562,16 +562,16 @@ struct Refresh_Device
ASSIGN_DRIVER_FUNC(BindVertexSamplers, name) \
ASSIGN_DRIVER_FUNC(BindFragmentSamplers, name) \
ASSIGN_DRIVER_FUNC(GetBufferData, name) \
ASSIGN_DRIVER_FUNC(AddDisposeTexture, name) \
ASSIGN_DRIVER_FUNC(AddDisposeSampler, name) \
ASSIGN_DRIVER_FUNC(AddDisposeBuffer, name) \
ASSIGN_DRIVER_FUNC(AddDisposeColorTarget, name) \
ASSIGN_DRIVER_FUNC(AddDisposeDepthStencilTarget, name) \
ASSIGN_DRIVER_FUNC(AddDisposeFramebuffer, name) \
ASSIGN_DRIVER_FUNC(AddDisposeShaderModule, name) \
ASSIGN_DRIVER_FUNC(AddDisposeRenderPass, name) \
ASSIGN_DRIVER_FUNC(AddDisposeComputePipeline, name) \
ASSIGN_DRIVER_FUNC(AddDisposeGraphicsPipeline, name) \
ASSIGN_DRIVER_FUNC(QueueDestroyTexture, name) \
ASSIGN_DRIVER_FUNC(QueueDestroySampler, name) \
ASSIGN_DRIVER_FUNC(QueueDestroyBuffer, name) \
ASSIGN_DRIVER_FUNC(QueueDestroyColorTarget, name) \
ASSIGN_DRIVER_FUNC(QueueDestroyDepthStencilTarget, name) \
ASSIGN_DRIVER_FUNC(QueueDestroyFramebuffer, name) \
ASSIGN_DRIVER_FUNC(QueueDestroyShaderModule, name) \
ASSIGN_DRIVER_FUNC(QueueDestroyRenderPass, name) \
ASSIGN_DRIVER_FUNC(QueueDestroyComputePipeline, name) \
ASSIGN_DRIVER_FUNC(QueueDestroyGraphicsPipeline, name) \
ASSIGN_DRIVER_FUNC(BeginRenderPass, name) \
ASSIGN_DRIVER_FUNC(EndRenderPass, name) \
ASSIGN_DRIVER_FUNC(BindGraphicsPipeline, name) \

View File

@ -7133,7 +7133,7 @@ static void VULKAN_CopyTextureToBuffer(
);
}
static void VULKAN_AddDisposeTexture(
static void VULKAN_QueueDestroyTexture(
Refresh_Renderer *driverData,
Refresh_Texture *texture
) {
@ -7156,7 +7156,7 @@ static void VULKAN_AddDisposeTexture(
SDL_UnlockMutex(renderer->disposeLock);
}
static void VULKAN_AddDisposeSampler(
static void VULKAN_QueueDestroySampler(
Refresh_Renderer *driverData,
Refresh_Sampler *sampler
) {
@ -7179,7 +7179,7 @@ static void VULKAN_AddDisposeSampler(
SDL_UnlockMutex(renderer->disposeLock);
}
static void VULKAN_AddDisposeBuffer(
static void VULKAN_QueueDestroyBuffer(
Refresh_Renderer *driverData,
Refresh_Buffer *buffer
) {
@ -7204,7 +7204,7 @@ static void VULKAN_AddDisposeBuffer(
SDL_UnlockMutex(renderer->disposeLock);
}
static void VULKAN_AddDisposeColorTarget(
static void VULKAN_QueueDestroyColorTarget(
Refresh_Renderer *driverData,
Refresh_ColorTarget *colorTarget
) {
@ -7227,7 +7227,7 @@ static void VULKAN_AddDisposeColorTarget(
SDL_UnlockMutex(renderer->disposeLock);
}
static void VULKAN_AddDisposeDepthStencilTarget(
static void VULKAN_QueueDestroyDepthStencilTarget(
Refresh_Renderer *driverData,
Refresh_DepthStencilTarget *depthStencilTarget
) {
@ -7250,7 +7250,7 @@ static void VULKAN_AddDisposeDepthStencilTarget(
SDL_UnlockMutex(renderer->disposeLock);
}
static void VULKAN_AddDisposeFramebuffer(
static void VULKAN_QueueDestroyFramebuffer(
Refresh_Renderer *driverData,
Refresh_Framebuffer *framebuffer
) {
@ -7273,7 +7273,7 @@ static void VULKAN_AddDisposeFramebuffer(
SDL_UnlockMutex(renderer->disposeLock);
}
static void VULKAN_AddDisposeShaderModule(
static void VULKAN_QueueDestroyShaderModule(
Refresh_Renderer *driverData,
Refresh_ShaderModule *shaderModule
) {
@ -7296,7 +7296,7 @@ static void VULKAN_AddDisposeShaderModule(
SDL_UnlockMutex(renderer->disposeLock);
}
static void VULKAN_AddDisposeRenderPass(
static void VULKAN_QueueDestroyRenderPass(
Refresh_Renderer *driverData,
Refresh_RenderPass *renderPass
) {
@ -7319,7 +7319,7 @@ static void VULKAN_AddDisposeRenderPass(
SDL_UnlockMutex(renderer->disposeLock);
}
static void VULKAN_AddDisposeComputePipeline(
static void VULKAN_QueueDestroyComputePipeline(
Refresh_Renderer *driverData,
Refresh_ComputePipeline *computePipeline
) {
@ -7342,7 +7342,7 @@ static void VULKAN_AddDisposeComputePipeline(
SDL_UnlockMutex(renderer->disposeLock);
}
static void VULKAN_AddDisposeGraphicsPipeline(
static void VULKAN_QueueDestroyGraphicsPipeline(
Refresh_Renderer *driverData,
Refresh_GraphicsPipeline *graphicsPipeline
) {