remove unused parameters from draw calls

pull/1/head
cosmonaut 2021-01-13 21:04:53 -08:00
parent bf91de783f
commit b25daa5198
4 changed files with 3 additions and 57 deletions

View File

@ -757,13 +757,9 @@ REFRESHAPI void Refresh_Clear(
/* Draws data from vertex/index buffers with instancing enabled. /* Draws data from vertex/index buffers with instancing enabled.
* *
* baseVertex: The starting offset to read from the vertex buffer. * baseVertex: The starting offset to read from the vertex buffer.
* minVertexIndex: The lowest index value expected from the index buffer.
* numVertices: The highest offset expected from the index buffer.
* startIndex: The starting offset to read from the index buffer. * startIndex: The starting offset to read from the index buffer.
* primitiveCount: The number of primitives to draw. * primitiveCount: The number of primitives to draw.
* instanceCount: The number of instances that will be drawn. * instanceCount: The number of instances that will be drawn.
* indices: The index buffer to bind for this draw call.
* indexElementSize: The size of the index type for this index buffer.
* vertexParamOffset: The offset of the vertex shader param data. * vertexParamOffset: The offset of the vertex shader param data.
* fragmentParamOffset: The offset of the fragment shader param data. * fragmentParamOffset: The offset of the fragment shader param data.
*/ */
@ -771,13 +767,9 @@ REFRESHAPI void Refresh_DrawInstancedPrimitives(
Refresh_Device *device, Refresh_Device *device,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
uint32_t baseVertex, uint32_t baseVertex,
uint32_t minVertexIndex,
uint32_t numVertices,
uint32_t startIndex, uint32_t startIndex,
uint32_t primitiveCount, uint32_t primitiveCount,
uint32_t instanceCount, uint32_t instanceCount,
Refresh_Buffer *indices,
Refresh_IndexElementSize indexElementSize,
uint32_t vertexParamOffset, uint32_t vertexParamOffset,
uint32_t fragmentParamOffset uint32_t fragmentParamOffset
); );
@ -785,12 +777,8 @@ REFRESHAPI void Refresh_DrawInstancedPrimitives(
/* Draws data from vertex/index buffers. /* Draws data from vertex/index buffers.
* *
* baseVertex: The starting offset to read from the vertex buffer. * baseVertex: The starting offset to read from the vertex buffer.
* minVertexIndex: The lowest index value expected from the index buffer.
* numVertices: The highest offset expected from the index buffer.
* startIndex: The starting offset to read from the index buffer. * startIndex: The starting offset to read from the index buffer.
* primitiveCount: The number of primitives to draw. * primitiveCount: The number of primitives to draw.
* indices: The index buffer to bind for this draw call.
* indexElementSize: The size of the index type for this index buffer.
* vertexParamOffset: The offset of the vertex shader param data. * vertexParamOffset: The offset of the vertex shader param data.
* fragmentParamOffset: The offset of the fragment shader param data. * fragmentParamOffset: The offset of the fragment shader param data.
*/ */
@ -798,12 +786,8 @@ REFRESHAPI void Refresh_DrawIndexedPrimitives(
Refresh_Device *device, Refresh_Device *device,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
uint32_t baseVertex, uint32_t baseVertex,
uint32_t minVertexIndex,
uint32_t numVertices,
uint32_t startIndex, uint32_t startIndex,
uint32_t primitiveCount, uint32_t primitiveCount,
Refresh_Buffer *indices,
Refresh_IndexElementSize indexElementSize,
uint32_t vertexParamOffset, uint32_t vertexParamOffset,
uint32_t fragmentParamOffset uint32_t fragmentParamOffset
); );

View File

@ -194,12 +194,8 @@ void Refresh_DrawIndexedPrimitives(
Refresh_Device *device, Refresh_Device *device,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
uint32_t baseVertex, uint32_t baseVertex,
uint32_t minVertexIndex,
uint32_t numVertices,
uint32_t startIndex, uint32_t startIndex,
uint32_t primitiveCount, uint32_t primitiveCount,
Refresh_Buffer *indices,
Refresh_IndexElementSize indexElementSize,
uint32_t vertexParamOffset, uint32_t vertexParamOffset,
uint32_t fragmentParamOffset uint32_t fragmentParamOffset
) { ) {
@ -208,12 +204,8 @@ void Refresh_DrawIndexedPrimitives(
device->driverData, device->driverData,
commandBuffer, commandBuffer,
baseVertex, baseVertex,
minVertexIndex,
numVertices,
startIndex, startIndex,
primitiveCount, primitiveCount,
indices,
indexElementSize,
vertexParamOffset, vertexParamOffset,
fragmentParamOffset fragmentParamOffset
); );
@ -223,13 +215,9 @@ void Refresh_DrawInstancedPrimitives(
Refresh_Device *device, Refresh_Device *device,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
uint32_t baseVertex, uint32_t baseVertex,
uint32_t minVertexIndex,
uint32_t numVertices,
uint32_t startIndex, uint32_t startIndex,
uint32_t primitiveCount, uint32_t primitiveCount,
uint32_t instanceCount, uint32_t instanceCount,
Refresh_Buffer *indices,
Refresh_IndexElementSize indexElementSize,
uint32_t vertexParamOffset, uint32_t vertexParamOffset,
uint32_t fragmentParamOffset uint32_t fragmentParamOffset
) { ) {
@ -238,13 +226,9 @@ void Refresh_DrawInstancedPrimitives(
device->driverData, device->driverData,
commandBuffer, commandBuffer,
baseVertex, baseVertex,
minVertexIndex,
numVertices,
startIndex, startIndex,
primitiveCount, primitiveCount,
instanceCount, instanceCount,
indices,
indexElementSize,
vertexParamOffset, vertexParamOffset,
fragmentParamOffset fragmentParamOffset
); );

View File

@ -182,13 +182,9 @@ struct Refresh_Device
Refresh_Renderer *driverData, Refresh_Renderer *driverData,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
uint32_t baseVertex, uint32_t baseVertex,
uint32_t minVertexIndex,
uint32_t numVertices,
uint32_t startIndex, uint32_t startIndex,
uint32_t primitiveCount, uint32_t primitiveCount,
uint32_t instanceCount, uint32_t instanceCount,
Refresh_Buffer *indices,
Refresh_IndexElementSize indexElementSize,
uint32_t vertexParamOffset, uint32_t vertexParamOffset,
uint32_t fragmentParamOffset uint32_t fragmentParamOffset
); );
@ -197,12 +193,8 @@ struct Refresh_Device
Refresh_Renderer *driverData, Refresh_Renderer *driverData,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
uint32_t baseVertex, uint32_t baseVertex,
uint32_t minVertexIndex,
uint32_t numVertices,
uint32_t startIndex, uint32_t startIndex,
uint32_t primitiveCount, uint32_t primitiveCount,
Refresh_Buffer *indices,
Refresh_IndexElementSize indexElementSize,
uint32_t vertexParamOffset, uint32_t vertexParamOffset,
uint32_t fragmentParamOffset uint32_t fragmentParamOffset
); );

View File

@ -3804,13 +3804,9 @@ static void VULKAN_DrawInstancedPrimitives(
Refresh_Renderer *driverData, Refresh_Renderer *driverData,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
uint32_t baseVertex, uint32_t baseVertex,
uint32_t minVertexIndex,
uint32_t numVertices,
uint32_t startIndex, uint32_t startIndex,
uint32_t primitiveCount, uint32_t primitiveCount,
uint32_t instanceCount, uint32_t instanceCount,
Refresh_Buffer *indices,
Refresh_IndexElementSize indexElementSize,
uint32_t vertexParamOffset, uint32_t vertexParamOffset,
uint32_t fragmentParamOffset uint32_t fragmentParamOffset
) { ) {
@ -3856,12 +3852,8 @@ static void VULKAN_DrawIndexedPrimitives(
Refresh_Renderer *driverData, Refresh_Renderer *driverData,
Refresh_CommandBuffer *commandBuffer, Refresh_CommandBuffer *commandBuffer,
uint32_t baseVertex, uint32_t baseVertex,
uint32_t minVertexIndex,
uint32_t numVertices,
uint32_t startIndex, uint32_t startIndex,
uint32_t primitiveCount, uint32_t primitiveCount,
Refresh_Buffer *indices,
Refresh_IndexElementSize indexElementSize,
uint32_t vertexParamOffset, uint32_t vertexParamOffset,
uint32_t fragmentParamOffset uint32_t fragmentParamOffset
) { ) {
@ -3869,13 +3861,9 @@ static void VULKAN_DrawIndexedPrimitives(
driverData, driverData,
commandBuffer, commandBuffer,
baseVertex, baseVertex,
minVertexIndex,
numVertices,
startIndex, startIndex,
primitiveCount, primitiveCount,
1, 1,
indices,
indexElementSize,
vertexParamOffset, vertexParamOffset,
fragmentParamOffset fragmentParamOffset
); );
@ -6052,7 +6040,6 @@ static void VULKAN_SetTextureData(
VkCommandBuffer commandBuffer = renderer->transferCommandBuffers[renderer->frameIndex]; VkCommandBuffer commandBuffer = renderer->transferCommandBuffers[renderer->frameIndex];
VkBufferImageCopy imageCopy; VkBufferImageCopy imageCopy;
VkResult vulkanResult;
uint8_t *stagingBufferPointer; uint8_t *stagingBufferPointer;
SDL_LockMutex(renderer->stagingLock); SDL_LockMutex(renderer->stagingLock);
@ -6467,7 +6454,6 @@ static void VULKAN_SetBufferData(
) { ) {
VulkanRenderer* renderer = (VulkanRenderer*)driverData; VulkanRenderer* renderer = (VulkanRenderer*)driverData;
VulkanBuffer* vulkanBuffer = (VulkanBuffer*)buffer; VulkanBuffer* vulkanBuffer = (VulkanBuffer*)buffer;
VkResult vulkanResult;
uint32_t i; uint32_t i;
#define CURIDX vulkanBuffer->currentSubBufferIndex #define CURIDX vulkanBuffer->currentSubBufferIndex
@ -8961,7 +8947,7 @@ static void VULKAN_INTERNAL_LoadEntryPoints(
if (SDL_Vulkan_LoadLibrary(NULL) < 0) if (SDL_Vulkan_LoadLibrary(NULL) < 0)
{ {
Refresh_LogWarn("Vulkan: SDL_Vulkan_LoadLibrary failed!"); Refresh_LogWarn("Vulkan: SDL_Vulkan_LoadLibrary failed!");
return 0; return;
} }
#pragma GCC diagnostic push #pragma GCC diagnostic push
@ -8974,7 +8960,7 @@ static void VULKAN_INTERNAL_LoadEntryPoints(
"SDL_Vulkan_GetVkGetInstanceProcAddr(): %s", "SDL_Vulkan_GetVkGetInstanceProcAddr(): %s",
SDL_GetError() SDL_GetError()
); );
return 0; return;
} }
#define VULKAN_GLOBAL_FUNCTION(name) \ #define VULKAN_GLOBAL_FUNCTION(name) \
@ -8982,7 +8968,7 @@ static void VULKAN_INTERNAL_LoadEntryPoints(
if (name == NULL) \ if (name == NULL) \
{ \ { \
Refresh_LogWarn("vkGetInstanceProcAddr(VK_NULL_HANDLE, \"" #name "\") failed"); \ Refresh_LogWarn("vkGetInstanceProcAddr(VK_NULL_HANDLE, \"" #name "\") failed"); \
return 0; \ return; \
} }
#include "Refresh_Driver_Vulkan_vkfuncs.h" #include "Refresh_Driver_Vulkan_vkfuncs.h"
} }