forked from MoonsideGames/Refresh
implement transfer queue
parent
c818e332e7
commit
e0ff380989
|
@ -658,6 +658,7 @@ REFRESHAPI void REFRESH_DestroyDevice(REFRESH_Device *device);
|
||||||
*/
|
*/
|
||||||
REFRESHAPI void REFRESH_Clear(
|
REFRESHAPI void REFRESH_Clear(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_Rect *clearRect,
|
REFRESH_Rect *clearRect,
|
||||||
REFRESH_ClearOptions options,
|
REFRESH_ClearOptions options,
|
||||||
REFRESH_Color *colors,
|
REFRESH_Color *colors,
|
||||||
|
@ -681,6 +682,7 @@ REFRESHAPI void REFRESH_Clear(
|
||||||
*/
|
*/
|
||||||
REFRESHAPI void REFRESH_DrawInstancedPrimitives(
|
REFRESHAPI void REFRESH_DrawInstancedPrimitives(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
uint32_t baseVertex,
|
uint32_t baseVertex,
|
||||||
uint32_t minVertexIndex,
|
uint32_t minVertexIndex,
|
||||||
uint32_t numVertices,
|
uint32_t numVertices,
|
||||||
|
@ -707,6 +709,7 @@ REFRESHAPI void REFRESH_DrawInstancedPrimitives(
|
||||||
*/
|
*/
|
||||||
REFRESHAPI void REFRESH_DrawIndexedPrimitives(
|
REFRESHAPI void REFRESH_DrawIndexedPrimitives(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
uint32_t baseVertex,
|
uint32_t baseVertex,
|
||||||
uint32_t minVertexIndex,
|
uint32_t minVertexIndex,
|
||||||
uint32_t numVertices,
|
uint32_t numVertices,
|
||||||
|
@ -727,6 +730,7 @@ REFRESHAPI void REFRESH_DrawIndexedPrimitives(
|
||||||
*/
|
*/
|
||||||
REFRESHAPI void REFRESH_DrawPrimitives(
|
REFRESHAPI void REFRESH_DrawPrimitives(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
uint32_t vertexStart,
|
uint32_t vertexStart,
|
||||||
uint32_t primitiveCount,
|
uint32_t primitiveCount,
|
||||||
uint32_t vertexParamOffset,
|
uint32_t vertexParamOffset,
|
||||||
|
@ -742,6 +746,7 @@ REFRESHAPI void REFRESH_DrawPrimitives(
|
||||||
*/
|
*/
|
||||||
REFRESHAPI void REFRESH_DispatchCompute(
|
REFRESHAPI void REFRESH_DispatchCompute(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
uint32_t groupCountX,
|
uint32_t groupCountX,
|
||||||
uint32_t groupCountY,
|
uint32_t groupCountY,
|
||||||
uint32_t groupCountZ,
|
uint32_t groupCountZ,
|
||||||
|
@ -895,7 +900,7 @@ REFRESHAPI REFRESH_Buffer* REFRESH_CreateBuffer(
|
||||||
* dataLength: The size of the image data in bytes.
|
* dataLength: The size of the image data in bytes.
|
||||||
*/
|
*/
|
||||||
REFRESHAPI void REFRESH_SetTextureData2D(
|
REFRESHAPI void REFRESH_SetTextureData2D(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *driverData,
|
||||||
REFRESH_Texture *texture,
|
REFRESH_Texture *texture,
|
||||||
uint32_t x,
|
uint32_t x,
|
||||||
uint32_t y,
|
uint32_t y,
|
||||||
|
@ -920,7 +925,7 @@ REFRESHAPI void REFRESH_SetTextureData2D(
|
||||||
* dataLength: The size of the image data in bytes.
|
* dataLength: The size of the image data in bytes.
|
||||||
*/
|
*/
|
||||||
REFRESHAPI void REFRESH_SetTextureData3D(
|
REFRESHAPI void REFRESH_SetTextureData3D(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *driverData,
|
||||||
REFRESH_Texture *texture,
|
REFRESH_Texture *texture,
|
||||||
uint32_t x,
|
uint32_t x,
|
||||||
uint32_t y,
|
uint32_t y,
|
||||||
|
@ -946,7 +951,7 @@ REFRESHAPI void REFRESH_SetTextureData3D(
|
||||||
* dataLength: The size of the image data in bytes.
|
* dataLength: The size of the image data in bytes.
|
||||||
*/
|
*/
|
||||||
REFRESHAPI void REFRESH_SetTextureDataCube(
|
REFRESHAPI void REFRESH_SetTextureDataCube(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *driverData,
|
||||||
REFRESH_Texture *texture,
|
REFRESH_Texture *texture,
|
||||||
uint32_t x,
|
uint32_t x,
|
||||||
uint32_t y,
|
uint32_t y,
|
||||||
|
@ -971,7 +976,7 @@ REFRESHAPI void REFRESH_SetTextureDataCube(
|
||||||
* dataLength: The size of the image data in bytes.
|
* dataLength: The size of the image data in bytes.
|
||||||
*/
|
*/
|
||||||
REFRESHAPI void REFRESH_SetTextureDataYUV(
|
REFRESHAPI void REFRESH_SetTextureDataYUV(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *driverData,
|
||||||
REFRESH_Texture *y,
|
REFRESH_Texture *y,
|
||||||
REFRESH_Texture *u,
|
REFRESH_Texture *u,
|
||||||
REFRESH_Texture *v,
|
REFRESH_Texture *v,
|
||||||
|
@ -1014,6 +1019,7 @@ REFRESHAPI void REFRESH_SetBufferData(
|
||||||
*/
|
*/
|
||||||
REFRESHAPI uint32_t REFRESH_PushVertexShaderParams(
|
REFRESHAPI uint32_t REFRESH_PushVertexShaderParams(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
void *data,
|
void *data,
|
||||||
uint32_t paramBlockCount
|
uint32_t paramBlockCount
|
||||||
);
|
);
|
||||||
|
@ -1030,6 +1036,7 @@ REFRESHAPI uint32_t REFRESH_PushVertexShaderParams(
|
||||||
*/
|
*/
|
||||||
REFRESHAPI uint32_t REFRESH_PushFragmentShaderParams(
|
REFRESHAPI uint32_t REFRESH_PushFragmentShaderParams(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
void *data,
|
void *data,
|
||||||
uint32_t paramBlockCount
|
uint32_t paramBlockCount
|
||||||
);
|
);
|
||||||
|
@ -1046,6 +1053,7 @@ REFRESHAPI uint32_t REFRESH_PushFragmentShaderParams(
|
||||||
*/
|
*/
|
||||||
REFRESHAPI uint32_t REFRESH_PushComputeShaderParams(
|
REFRESHAPI uint32_t REFRESH_PushComputeShaderParams(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
void *data,
|
void *data,
|
||||||
uint32_t paramBlockCount
|
uint32_t paramBlockCount
|
||||||
);
|
);
|
||||||
|
@ -1061,6 +1069,7 @@ REFRESHAPI uint32_t REFRESH_PushComputeShaderParams(
|
||||||
*/
|
*/
|
||||||
REFRESHAPI void REFRESH_SetVertexSamplers(
|
REFRESHAPI void REFRESH_SetVertexSamplers(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_Texture **pTextures,
|
REFRESH_Texture **pTextures,
|
||||||
REFRESH_Sampler **pSamplers
|
REFRESH_Sampler **pSamplers
|
||||||
);
|
);
|
||||||
|
@ -1076,6 +1085,7 @@ REFRESHAPI void REFRESH_SetVertexSamplers(
|
||||||
*/
|
*/
|
||||||
REFRESHAPI void REFRESH_SetFragmentSamplers(
|
REFRESHAPI void REFRESH_SetFragmentSamplers(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_Texture **pTextures,
|
REFRESH_Texture **pTextures,
|
||||||
REFRESH_Sampler **pSamplers
|
REFRESH_Sampler **pSamplers
|
||||||
);
|
);
|
||||||
|
@ -1284,6 +1294,7 @@ REFRESHAPI void REFRESH_AddDisposeGraphicsPipeline(
|
||||||
*/
|
*/
|
||||||
REFRESHAPI void REFRESH_BeginRenderPass(
|
REFRESHAPI void REFRESH_BeginRenderPass(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_RenderPass *renderPass,
|
REFRESH_RenderPass *renderPass,
|
||||||
REFRESH_Framebuffer *framebuffer,
|
REFRESH_Framebuffer *framebuffer,
|
||||||
REFRESH_Rect renderArea,
|
REFRESH_Rect renderArea,
|
||||||
|
@ -1294,18 +1305,21 @@ REFRESHAPI void REFRESH_BeginRenderPass(
|
||||||
|
|
||||||
/* Ends the current render pass. */
|
/* Ends the current render pass. */
|
||||||
REFRESHAPI void REFRESH_EndRenderPass(
|
REFRESHAPI void REFRESH_EndRenderPass(
|
||||||
REFRESH_Device *device
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer
|
||||||
);
|
);
|
||||||
|
|
||||||
/* Binds a graphics pipeline to the graphics bind point. */
|
/* Binds a graphics pipeline to the graphics bind point. */
|
||||||
REFRESHAPI void REFRESH_BindGraphicsPipeline(
|
REFRESHAPI void REFRESH_BindGraphicsPipeline(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_GraphicsPipeline *graphicsPipeline
|
REFRESH_GraphicsPipeline *graphicsPipeline
|
||||||
);
|
);
|
||||||
|
|
||||||
/* Binds vertex buffers for use with subsequent draw calls. */
|
/* Binds vertex buffers for use with subsequent draw calls. */
|
||||||
REFRESHAPI void REFRESH_BindVertexBuffers(
|
REFRESHAPI void REFRESH_BindVertexBuffers(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
uint32_t firstBinding,
|
uint32_t firstBinding,
|
||||||
uint32_t bindingCount,
|
uint32_t bindingCount,
|
||||||
REFRESH_Buffer **pBuffers,
|
REFRESH_Buffer **pBuffers,
|
||||||
|
@ -1315,6 +1329,7 @@ REFRESHAPI void REFRESH_BindVertexBuffers(
|
||||||
/* Binds an index buffer for use with subsequent draw calls. */
|
/* Binds an index buffer for use with subsequent draw calls. */
|
||||||
REFRESHAPI void REFRESH_BindIndexBuffer(
|
REFRESHAPI void REFRESH_BindIndexBuffer(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_Buffer *buffer,
|
REFRESH_Buffer *buffer,
|
||||||
uint64_t offset,
|
uint64_t offset,
|
||||||
REFRESH_IndexElementSize indexElementSize
|
REFRESH_IndexElementSize indexElementSize
|
||||||
|
@ -1323,6 +1338,7 @@ REFRESHAPI void REFRESH_BindIndexBuffer(
|
||||||
/* Binds a compute pipeline to the compute bind point. */
|
/* Binds a compute pipeline to the compute bind point. */
|
||||||
REFRESHAPI void REFRESH_BindComputePipeline(
|
REFRESHAPI void REFRESH_BindComputePipeline(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_ComputePipeline *computePipeline
|
REFRESH_ComputePipeline *computePipeline
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1334,6 +1350,7 @@ REFRESHAPI void REFRESH_BindComputePipeline(
|
||||||
*/
|
*/
|
||||||
REFRESHAPI void REFRESH_BindComputeBuffers(
|
REFRESHAPI void REFRESH_BindComputeBuffers(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_Buffer **pBuffers
|
REFRESH_Buffer **pBuffers
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1345,6 +1362,7 @@ REFRESHAPI void REFRESH_BindComputeBuffers(
|
||||||
*/
|
*/
|
||||||
REFRESHAPI void REFRESH_BindComputeTextures(
|
REFRESHAPI void REFRESH_BindComputeTextures(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_Texture **pTextures
|
REFRESH_Texture **pTextures
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1379,6 +1397,7 @@ REFRESHAPI REFRESH_CommandBuffer* REFRESH_AcquireCommandBuffer(
|
||||||
*/
|
*/
|
||||||
REFRESHAPI void REFRESH_QueuePresent(
|
REFRESHAPI void REFRESH_QueuePresent(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_TextureSlice *textureSlice,
|
REFRESH_TextureSlice *textureSlice,
|
||||||
REFRESH_Rect *sourceRectangle,
|
REFRESH_Rect *sourceRectangle,
|
||||||
REFRESH_Rect *destinationRectangle
|
REFRESH_Rect *destinationRectangle
|
||||||
|
@ -1386,7 +1405,9 @@ REFRESHAPI void REFRESH_QueuePresent(
|
||||||
|
|
||||||
/* Submits all of the enqueued commands. */
|
/* Submits all of the enqueued commands. */
|
||||||
REFRESHAPI void REFRESH_Submit(
|
REFRESHAPI void REFRESH_Submit(
|
||||||
REFRESH_Device* device
|
REFRESH_Device* device,
|
||||||
|
REFRESH_CommandBuffer **pCommandBuffers,
|
||||||
|
uint32_t commandBufferCount
|
||||||
);
|
);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -149,6 +149,7 @@ void REFRESH_DestroyDevice(REFRESH_Device *device)
|
||||||
|
|
||||||
void REFRESH_Clear(
|
void REFRESH_Clear(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_Rect *clearRect,
|
REFRESH_Rect *clearRect,
|
||||||
REFRESH_ClearOptions options,
|
REFRESH_ClearOptions options,
|
||||||
REFRESH_Color *colors,
|
REFRESH_Color *colors,
|
||||||
|
@ -159,6 +160,7 @@ void REFRESH_Clear(
|
||||||
NULL_RETURN(device);
|
NULL_RETURN(device);
|
||||||
device->Clear(
|
device->Clear(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
|
commandBuffer,
|
||||||
clearRect,
|
clearRect,
|
||||||
options,
|
options,
|
||||||
colors,
|
colors,
|
||||||
|
@ -170,6 +172,7 @@ void REFRESH_Clear(
|
||||||
|
|
||||||
void REFRESH_DrawIndexedPrimitives(
|
void REFRESH_DrawIndexedPrimitives(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
uint32_t baseVertex,
|
uint32_t baseVertex,
|
||||||
uint32_t minVertexIndex,
|
uint32_t minVertexIndex,
|
||||||
uint32_t numVertices,
|
uint32_t numVertices,
|
||||||
|
@ -183,6 +186,7 @@ void REFRESH_DrawIndexedPrimitives(
|
||||||
NULL_RETURN(device);
|
NULL_RETURN(device);
|
||||||
device->DrawIndexedPrimitives(
|
device->DrawIndexedPrimitives(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
|
commandBuffer,
|
||||||
baseVertex,
|
baseVertex,
|
||||||
minVertexIndex,
|
minVertexIndex,
|
||||||
numVertices,
|
numVertices,
|
||||||
|
@ -197,6 +201,7 @@ void REFRESH_DrawIndexedPrimitives(
|
||||||
|
|
||||||
void REFRESH_DrawInstancedPrimitives(
|
void REFRESH_DrawInstancedPrimitives(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
uint32_t baseVertex,
|
uint32_t baseVertex,
|
||||||
uint32_t minVertexIndex,
|
uint32_t minVertexIndex,
|
||||||
uint32_t numVertices,
|
uint32_t numVertices,
|
||||||
|
@ -211,6 +216,7 @@ void REFRESH_DrawInstancedPrimitives(
|
||||||
NULL_RETURN(device);
|
NULL_RETURN(device);
|
||||||
device->DrawInstancedPrimitives(
|
device->DrawInstancedPrimitives(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
|
commandBuffer,
|
||||||
baseVertex,
|
baseVertex,
|
||||||
minVertexIndex,
|
minVertexIndex,
|
||||||
numVertices,
|
numVertices,
|
||||||
|
@ -226,6 +232,7 @@ void REFRESH_DrawInstancedPrimitives(
|
||||||
|
|
||||||
void REFRESH_DrawPrimitives(
|
void REFRESH_DrawPrimitives(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
uint32_t vertexStart,
|
uint32_t vertexStart,
|
||||||
uint32_t primitiveCount,
|
uint32_t primitiveCount,
|
||||||
uint32_t vertexParamOffset,
|
uint32_t vertexParamOffset,
|
||||||
|
@ -234,6 +241,7 @@ void REFRESH_DrawPrimitives(
|
||||||
NULL_RETURN(device);
|
NULL_RETURN(device);
|
||||||
device->DrawPrimitives(
|
device->DrawPrimitives(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
|
commandBuffer,
|
||||||
vertexStart,
|
vertexStart,
|
||||||
primitiveCount,
|
primitiveCount,
|
||||||
vertexParamOffset,
|
vertexParamOffset,
|
||||||
|
@ -243,6 +251,7 @@ void REFRESH_DrawPrimitives(
|
||||||
|
|
||||||
void REFRESH_DispatchCompute(
|
void REFRESH_DispatchCompute(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
uint32_t groupCountX,
|
uint32_t groupCountX,
|
||||||
uint32_t groupCountY,
|
uint32_t groupCountY,
|
||||||
uint32_t groupCountZ,
|
uint32_t groupCountZ,
|
||||||
|
@ -251,6 +260,7 @@ void REFRESH_DispatchCompute(
|
||||||
NULL_RETURN(device);
|
NULL_RETURN(device);
|
||||||
device->DispatchCompute(
|
device->DispatchCompute(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
|
commandBuffer,
|
||||||
groupCountX,
|
groupCountX,
|
||||||
groupCountY,
|
groupCountY,
|
||||||
groupCountZ,
|
groupCountZ,
|
||||||
|
@ -549,12 +559,14 @@ void REFRESH_SetBufferData(
|
||||||
|
|
||||||
uint32_t REFRESH_PushVertexShaderParams(
|
uint32_t REFRESH_PushVertexShaderParams(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
void *data,
|
void *data,
|
||||||
uint32_t elementCount
|
uint32_t elementCount
|
||||||
) {
|
) {
|
||||||
if (device == NULL) { return 0; }
|
if (device == NULL) { return 0; }
|
||||||
return device->PushVertexShaderParams(
|
return device->PushVertexShaderParams(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
|
commandBuffer,
|
||||||
data,
|
data,
|
||||||
elementCount
|
elementCount
|
||||||
);
|
);
|
||||||
|
@ -562,12 +574,14 @@ uint32_t REFRESH_PushVertexShaderParams(
|
||||||
|
|
||||||
uint32_t REFRESH_PushFragmentShaderParams(
|
uint32_t REFRESH_PushFragmentShaderParams(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
void *data,
|
void *data,
|
||||||
uint32_t elementCount
|
uint32_t elementCount
|
||||||
) {
|
) {
|
||||||
if (device == NULL) { return 0; }
|
if (device == NULL) { return 0; }
|
||||||
return device->PushFragmentShaderParams(
|
return device->PushFragmentShaderParams(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
|
commandBuffer,
|
||||||
data,
|
data,
|
||||||
elementCount
|
elementCount
|
||||||
);
|
);
|
||||||
|
@ -575,12 +589,14 @@ uint32_t REFRESH_PushFragmentShaderParams(
|
||||||
|
|
||||||
uint32_t REFRESH_PushComputeShaderParams(
|
uint32_t REFRESH_PushComputeShaderParams(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
void *data,
|
void *data,
|
||||||
uint32_t elementCount
|
uint32_t elementCount
|
||||||
) {
|
) {
|
||||||
if (device == NULL) { return 0; }
|
if (device == NULL) { return 0; }
|
||||||
return device->PushComputeShaderParams(
|
return device->PushComputeShaderParams(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
|
commandBuffer,
|
||||||
data,
|
data,
|
||||||
elementCount
|
elementCount
|
||||||
);
|
);
|
||||||
|
@ -588,12 +604,14 @@ uint32_t REFRESH_PushComputeShaderParams(
|
||||||
|
|
||||||
void REFRESH_SetVertexSamplers(
|
void REFRESH_SetVertexSamplers(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_Texture **pTextures,
|
REFRESH_Texture **pTextures,
|
||||||
REFRESH_Sampler **pSamplers
|
REFRESH_Sampler **pSamplers
|
||||||
) {
|
) {
|
||||||
NULL_RETURN(device);
|
NULL_RETURN(device);
|
||||||
device->SetVertexSamplers(
|
device->SetVertexSamplers(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
|
commandBuffer,
|
||||||
pTextures,
|
pTextures,
|
||||||
pSamplers
|
pSamplers
|
||||||
);
|
);
|
||||||
|
@ -601,12 +619,14 @@ void REFRESH_SetVertexSamplers(
|
||||||
|
|
||||||
void REFRESH_SetFragmentSamplers(
|
void REFRESH_SetFragmentSamplers(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_Texture **pTextures,
|
REFRESH_Texture **pTextures,
|
||||||
REFRESH_Sampler **pSamplers
|
REFRESH_Sampler **pSamplers
|
||||||
) {
|
) {
|
||||||
NULL_RETURN(device);
|
NULL_RETURN(device);
|
||||||
device->SetFragmentSamplers(
|
device->SetFragmentSamplers(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
|
commandBuffer,
|
||||||
pTextures,
|
pTextures,
|
||||||
pSamplers
|
pSamplers
|
||||||
);
|
);
|
||||||
|
@ -783,6 +803,7 @@ void REFRESH_AddDisposeGraphicsPipeline(
|
||||||
|
|
||||||
void REFRESH_BeginRenderPass(
|
void REFRESH_BeginRenderPass(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_RenderPass *renderPass,
|
REFRESH_RenderPass *renderPass,
|
||||||
REFRESH_Framebuffer *framebuffer,
|
REFRESH_Framebuffer *framebuffer,
|
||||||
REFRESH_Rect renderArea,
|
REFRESH_Rect renderArea,
|
||||||
|
@ -793,6 +814,7 @@ void REFRESH_BeginRenderPass(
|
||||||
NULL_RETURN(device);
|
NULL_RETURN(device);
|
||||||
device->BeginRenderPass(
|
device->BeginRenderPass(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
|
commandBuffer,
|
||||||
renderPass,
|
renderPass,
|
||||||
framebuffer,
|
framebuffer,
|
||||||
renderArea,
|
renderArea,
|
||||||
|
@ -803,25 +825,32 @@ void REFRESH_BeginRenderPass(
|
||||||
}
|
}
|
||||||
|
|
||||||
void REFRESH_EndRenderPass(
|
void REFRESH_EndRenderPass(
|
||||||
REFRESH_Device *device
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer
|
||||||
) {
|
) {
|
||||||
NULL_RETURN(device);
|
NULL_RETURN(device);
|
||||||
device->EndRenderPass(device->driverData);
|
device->EndRenderPass(
|
||||||
|
device->driverData,
|
||||||
|
commandBuffer
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void REFRESH_BindGraphicsPipeline(
|
void REFRESH_BindGraphicsPipeline(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_GraphicsPipeline *graphicsPipeline
|
REFRESH_GraphicsPipeline *graphicsPipeline
|
||||||
) {
|
) {
|
||||||
NULL_RETURN(device);
|
NULL_RETURN(device);
|
||||||
device->BindGraphicsPipeline(
|
device->BindGraphicsPipeline(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
|
commandBuffer,
|
||||||
graphicsPipeline
|
graphicsPipeline
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void REFRESH_BindVertexBuffers(
|
void REFRESH_BindVertexBuffers(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
uint32_t firstBinding,
|
uint32_t firstBinding,
|
||||||
uint32_t bindingCount,
|
uint32_t bindingCount,
|
||||||
REFRESH_Buffer **pBuffers,
|
REFRESH_Buffer **pBuffers,
|
||||||
|
@ -830,6 +859,7 @@ void REFRESH_BindVertexBuffers(
|
||||||
NULL_RETURN(device);
|
NULL_RETURN(device);
|
||||||
device->BindVertexBuffers(
|
device->BindVertexBuffers(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
|
commandBuffer,
|
||||||
firstBinding,
|
firstBinding,
|
||||||
bindingCount,
|
bindingCount,
|
||||||
pBuffers,
|
pBuffers,
|
||||||
|
@ -839,6 +869,7 @@ void REFRESH_BindVertexBuffers(
|
||||||
|
|
||||||
void REFRESH_BindIndexBuffer(
|
void REFRESH_BindIndexBuffer(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_Buffer *buffer,
|
REFRESH_Buffer *buffer,
|
||||||
uint64_t offset,
|
uint64_t offset,
|
||||||
REFRESH_IndexElementSize indexElementSize
|
REFRESH_IndexElementSize indexElementSize
|
||||||
|
@ -846,6 +877,7 @@ void REFRESH_BindIndexBuffer(
|
||||||
NULL_RETURN(device);
|
NULL_RETURN(device);
|
||||||
device->BindIndexBuffer(
|
device->BindIndexBuffer(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
|
commandBuffer,
|
||||||
buffer,
|
buffer,
|
||||||
offset,
|
offset,
|
||||||
indexElementSize
|
indexElementSize
|
||||||
|
@ -854,33 +886,39 @@ void REFRESH_BindIndexBuffer(
|
||||||
|
|
||||||
void REFRESH_BindComputePipeline(
|
void REFRESH_BindComputePipeline(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_ComputePipeline *computePipeline
|
REFRESH_ComputePipeline *computePipeline
|
||||||
) {
|
) {
|
||||||
NULL_RETURN(device);
|
NULL_RETURN(device);
|
||||||
device->BindComputePipeline(
|
device->BindComputePipeline(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
|
commandBuffer,
|
||||||
computePipeline
|
computePipeline
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void REFRESH_BindComputeBuffers(
|
void REFRESH_BindComputeBuffers(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_Buffer **pBuffers
|
REFRESH_Buffer **pBuffers
|
||||||
) {
|
) {
|
||||||
NULL_RETURN(device);
|
NULL_RETURN(device);
|
||||||
device->BindComputeBuffers(
|
device->BindComputeBuffers(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
|
commandBuffer,
|
||||||
pBuffers
|
pBuffers
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void REFRESH_BindComputeTextures(
|
void REFRESH_BindComputeTextures(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_Texture **pTextures
|
REFRESH_Texture **pTextures
|
||||||
) {
|
) {
|
||||||
NULL_RETURN(device);
|
NULL_RETURN(device);
|
||||||
device->BindComputeTextures(
|
device->BindComputeTextures(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
|
commandBuffer,
|
||||||
pTextures
|
pTextures
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -898,6 +936,7 @@ REFRESH_CommandBuffer* REFRESH_AcquireCommandBuffer(
|
||||||
|
|
||||||
void REFRESH_QueuePresent(
|
void REFRESH_QueuePresent(
|
||||||
REFRESH_Device *device,
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_TextureSlice* textureSlice,
|
REFRESH_TextureSlice* textureSlice,
|
||||||
REFRESH_Rect *sourceRectangle,
|
REFRESH_Rect *sourceRectangle,
|
||||||
REFRESH_Rect *destinationRectangle
|
REFRESH_Rect *destinationRectangle
|
||||||
|
@ -905,6 +944,7 @@ void REFRESH_QueuePresent(
|
||||||
NULL_RETURN(device);
|
NULL_RETURN(device);
|
||||||
device->QueuePresent(
|
device->QueuePresent(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
|
commandBuffer,
|
||||||
textureSlice,
|
textureSlice,
|
||||||
sourceRectangle,
|
sourceRectangle,
|
||||||
destinationRectangle
|
destinationRectangle
|
||||||
|
@ -912,11 +952,15 @@ void REFRESH_QueuePresent(
|
||||||
}
|
}
|
||||||
|
|
||||||
void REFRESH_Submit(
|
void REFRESH_Submit(
|
||||||
REFRESH_Device *device
|
REFRESH_Device *device,
|
||||||
|
REFRESH_CommandBuffer **pCommandBuffers,
|
||||||
|
uint32_t commandBufferCount
|
||||||
) {
|
) {
|
||||||
NULL_RETURN(device);
|
NULL_RETURN(device);
|
||||||
device->Submit(
|
device->Submit(
|
||||||
device->driverData
|
device->driverData,
|
||||||
|
pCommandBuffers,
|
||||||
|
commandBufferCount
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -169,6 +169,7 @@ struct REFRESH_Device
|
||||||
|
|
||||||
void (*Clear)(
|
void (*Clear)(
|
||||||
REFRESH_Renderer *driverData,
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_Rect *clearRect,
|
REFRESH_Rect *clearRect,
|
||||||
REFRESH_ClearOptions options,
|
REFRESH_ClearOptions options,
|
||||||
REFRESH_Color *colors,
|
REFRESH_Color *colors,
|
||||||
|
@ -179,6 +180,7 @@ struct REFRESH_Device
|
||||||
|
|
||||||
void (*DrawInstancedPrimitives)(
|
void (*DrawInstancedPrimitives)(
|
||||||
REFRESH_Renderer *driverData,
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
uint32_t baseVertex,
|
uint32_t baseVertex,
|
||||||
uint32_t minVertexIndex,
|
uint32_t minVertexIndex,
|
||||||
uint32_t numVertices,
|
uint32_t numVertices,
|
||||||
|
@ -193,6 +195,7 @@ struct REFRESH_Device
|
||||||
|
|
||||||
void (*DrawIndexedPrimitives)(
|
void (*DrawIndexedPrimitives)(
|
||||||
REFRESH_Renderer *driverData,
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
uint32_t baseVertex,
|
uint32_t baseVertex,
|
||||||
uint32_t minVertexIndex,
|
uint32_t minVertexIndex,
|
||||||
uint32_t numVertices,
|
uint32_t numVertices,
|
||||||
|
@ -206,6 +209,7 @@ struct REFRESH_Device
|
||||||
|
|
||||||
void (*DrawPrimitives)(
|
void (*DrawPrimitives)(
|
||||||
REFRESH_Renderer *driverData,
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
uint32_t vertexStart,
|
uint32_t vertexStart,
|
||||||
uint32_t primitiveCount,
|
uint32_t primitiveCount,
|
||||||
uint32_t vertexParamOffset,
|
uint32_t vertexParamOffset,
|
||||||
|
@ -214,6 +218,7 @@ struct REFRESH_Device
|
||||||
|
|
||||||
void (*DispatchCompute)(
|
void (*DispatchCompute)(
|
||||||
REFRESH_Renderer *device,
|
REFRESH_Renderer *device,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
uint32_t groupCountX,
|
uint32_t groupCountX,
|
||||||
uint32_t groupCountY,
|
uint32_t groupCountY,
|
||||||
uint32_t groupCountZ,
|
uint32_t groupCountZ,
|
||||||
|
@ -362,30 +367,35 @@ struct REFRESH_Device
|
||||||
|
|
||||||
uint32_t(*PushVertexShaderParams)(
|
uint32_t(*PushVertexShaderParams)(
|
||||||
REFRESH_Renderer *driverData,
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
void *data,
|
void *data,
|
||||||
uint32_t elementCount
|
uint32_t elementCount
|
||||||
);
|
);
|
||||||
|
|
||||||
uint32_t(*PushFragmentShaderParams)(
|
uint32_t(*PushFragmentShaderParams)(
|
||||||
REFRESH_Renderer *driverData,
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
void *data,
|
void *data,
|
||||||
uint32_t elementCount
|
uint32_t elementCount
|
||||||
);
|
);
|
||||||
|
|
||||||
uint32_t (*PushComputeShaderParams)(
|
uint32_t (*PushComputeShaderParams)(
|
||||||
REFRESH_Renderer *driverData,
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
void *data,
|
void *data,
|
||||||
uint32_t elementCount
|
uint32_t elementCount
|
||||||
);
|
);
|
||||||
|
|
||||||
void(*SetVertexSamplers)(
|
void(*SetVertexSamplers)(
|
||||||
REFRESH_Renderer *driverData,
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_Texture **pTextures,
|
REFRESH_Texture **pTextures,
|
||||||
REFRESH_Sampler **pSamplers
|
REFRESH_Sampler **pSamplers
|
||||||
);
|
);
|
||||||
|
|
||||||
void(*SetFragmentSamplers)(
|
void(*SetFragmentSamplers)(
|
||||||
REFRESH_Renderer *driverData,
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_Texture **pTextures,
|
REFRESH_Texture **pTextures,
|
||||||
REFRESH_Sampler **pSamplers
|
REFRESH_Sampler **pSamplers
|
||||||
);
|
);
|
||||||
|
@ -476,6 +486,7 @@ struct REFRESH_Device
|
||||||
|
|
||||||
void(*BeginRenderPass)(
|
void(*BeginRenderPass)(
|
||||||
REFRESH_Renderer *driverData,
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_RenderPass *renderPass,
|
REFRESH_RenderPass *renderPass,
|
||||||
REFRESH_Framebuffer *framebuffer,
|
REFRESH_Framebuffer *framebuffer,
|
||||||
REFRESH_Rect renderArea,
|
REFRESH_Rect renderArea,
|
||||||
|
@ -485,16 +496,19 @@ struct REFRESH_Device
|
||||||
);
|
);
|
||||||
|
|
||||||
void(*EndRenderPass)(
|
void(*EndRenderPass)(
|
||||||
REFRESH_Renderer *driverData
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer
|
||||||
);
|
);
|
||||||
|
|
||||||
void(*BindGraphicsPipeline)(
|
void(*BindGraphicsPipeline)(
|
||||||
REFRESH_Renderer *driverData,
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_GraphicsPipeline *graphicsPipeline
|
REFRESH_GraphicsPipeline *graphicsPipeline
|
||||||
);
|
);
|
||||||
|
|
||||||
void(*BindVertexBuffers)(
|
void(*BindVertexBuffers)(
|
||||||
REFRESH_Renderer *driverData,
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
uint32_t firstBinding,
|
uint32_t firstBinding,
|
||||||
uint32_t bindingCount,
|
uint32_t bindingCount,
|
||||||
REFRESH_Buffer **pBuffers,
|
REFRESH_Buffer **pBuffers,
|
||||||
|
@ -503,6 +517,7 @@ struct REFRESH_Device
|
||||||
|
|
||||||
void(*BindIndexBuffer)(
|
void(*BindIndexBuffer)(
|
||||||
REFRESH_Renderer *driverData,
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_Buffer *buffer,
|
REFRESH_Buffer *buffer,
|
||||||
uint64_t offset,
|
uint64_t offset,
|
||||||
REFRESH_IndexElementSize indexElementSize
|
REFRESH_IndexElementSize indexElementSize
|
||||||
|
@ -510,16 +525,19 @@ struct REFRESH_Device
|
||||||
|
|
||||||
void(*BindComputePipeline)(
|
void(*BindComputePipeline)(
|
||||||
REFRESH_Renderer *driverData,
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_ComputePipeline *computePipeline
|
REFRESH_ComputePipeline *computePipeline
|
||||||
);
|
);
|
||||||
|
|
||||||
void(*BindComputeBuffers)(
|
void(*BindComputeBuffers)(
|
||||||
REFRESH_Renderer *driverData,
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_Buffer **pBuffers
|
REFRESH_Buffer **pBuffers
|
||||||
);
|
);
|
||||||
|
|
||||||
void(*BindComputeTextures)(
|
void(*BindComputeTextures)(
|
||||||
REFRESH_Renderer *driverData,
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_Texture **pTextures
|
REFRESH_Texture **pTextures
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -530,13 +548,16 @@ struct REFRESH_Device
|
||||||
|
|
||||||
void(*QueuePresent)(
|
void(*QueuePresent)(
|
||||||
REFRESH_Renderer *driverData,
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer *commandBuffer,
|
||||||
REFRESH_TextureSlice *textureSlice,
|
REFRESH_TextureSlice *textureSlice,
|
||||||
REFRESH_Rect *sourceRectangle,
|
REFRESH_Rect *sourceRectangle,
|
||||||
REFRESH_Rect *destinationRectangle
|
REFRESH_Rect *destinationRectangle
|
||||||
);
|
);
|
||||||
|
|
||||||
void(*Submit)(
|
void(*Submit)(
|
||||||
REFRESH_Renderer *driverData
|
REFRESH_Renderer *driverData,
|
||||||
|
REFRESH_CommandBuffer **pCommandBuffers,
|
||||||
|
uint32_t commandBufferCount
|
||||||
);
|
);
|
||||||
|
|
||||||
/* Opaque pointer for the Driver */
|
/* Opaque pointer for the Driver */
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue