rename Set_Samplers to Bind_Samplers

submit_rewrite
cosmonaut 2021-01-05 17:00:06 -08:00
parent c316b50b80
commit d3d9c9ad55
4 changed files with 44 additions and 44 deletions

View File

@ -1046,38 +1046,6 @@ REFRESHAPI uint32_t Refresh_PushComputeShaderParams(
uint32_t paramBlockCount
);
/* Sets textures/samplers for use with the currently bound vertex shader.
*
* NOTE:
* The length of the passed arrays must be equal to the number
* of sampler bindings specified by the pipeline.
*
* textures: A pointer to an array of textures.
* samplers: A pointer to an array of samplers.
*/
REFRESHAPI void Refresh_SetVertexSamplers(
Refresh_Device *device,
Refresh_CommandBuffer *commandBuffer,
Refresh_Texture **pTextures,
Refresh_Sampler **pSamplers
);
/* Sets textures/samplers for use with the currently bound fragment shader.
*
* NOTE:
* The length of the passed arrays must be equal to the number
* of sampler bindings specified by the pipeline.
*
* textures: A pointer to an array of textures.
* samplers: A pointer to an array of samplers.
*/
REFRESHAPI void Refresh_SetFragmentSamplers(
Refresh_Device *device,
Refresh_CommandBuffer *commandBuffer,
Refresh_Texture **pTextures,
Refresh_Sampler **pSamplers
);
/* Getters */
/* Synchronously copies data from a buffer to a pointer.
@ -1276,6 +1244,38 @@ REFRESHAPI void Refresh_BindIndexBuffer(
Refresh_IndexElementSize indexElementSize
);
/* Sets textures/samplers for use with the currently bound vertex shader.
*
* NOTE:
* The length of the passed arrays must be equal to the number
* of sampler bindings specified by the pipeline.
*
* textures: A pointer to an array of textures.
* samplers: A pointer to an array of samplers.
*/
REFRESHAPI void Refresh_BindVertexSamplers(
Refresh_Device *device,
Refresh_CommandBuffer *commandBuffer,
Refresh_Texture **pTextures,
Refresh_Sampler **pSamplers
);
/* Sets textures/samplers for use with the currently bound fragment shader.
*
* NOTE:
* The length of the passed arrays must be equal to the number
* of sampler bindings specified by the pipeline.
*
* textures: A pointer to an array of textures.
* samplers: A pointer to an array of samplers.
*/
REFRESHAPI void Refresh_BindFragmentSamplers(
Refresh_Device *device,
Refresh_CommandBuffer *commandBuffer,
Refresh_Texture **pTextures,
Refresh_Sampler **pSamplers
);
/* Binds a compute pipeline to the compute bind point. */
REFRESHAPI void Refresh_BindComputePipeline(
Refresh_Device *device,

View File

@ -568,14 +568,14 @@ uint32_t Refresh_PushComputeShaderParams(
);
}
void Refresh_SetVertexSamplers(
void Refresh_BindVertexSamplers(
Refresh_Device *device,
Refresh_CommandBuffer *commandBuffer,
Refresh_Texture **pTextures,
Refresh_Sampler **pSamplers
) {
NULL_RETURN(device);
device->SetVertexSamplers(
device->BindVertexSamplers(
device->driverData,
commandBuffer,
pTextures,
@ -583,14 +583,14 @@ void Refresh_SetVertexSamplers(
);
}
void Refresh_SetFragmentSamplers(
void Refresh_BindFragmentSamplers(
Refresh_Device *device,
Refresh_CommandBuffer *commandBuffer,
Refresh_Texture **pTextures,
Refresh_Sampler **pSamplers
) {
NULL_RETURN(device);
device->SetFragmentSamplers(
device->BindFragmentSamplers(
device->driverData,
commandBuffer,
pTextures,

View File

@ -369,14 +369,14 @@ struct Refresh_Device
uint32_t elementCount
);
void(*SetVertexSamplers)(
void(*BindVertexSamplers)(
Refresh_Renderer *driverData,
Refresh_CommandBuffer *commandBuffer,
Refresh_Texture **pTextures,
Refresh_Sampler **pSamplers
);
void(*SetFragmentSamplers)(
void(*BindFragmentSamplers)(
Refresh_Renderer *driverData,
Refresh_CommandBuffer *commandBuffer,
Refresh_Texture **pTextures,
@ -559,8 +559,8 @@ struct Refresh_Device
ASSIGN_DRIVER_FUNC(PushVertexShaderParams, name) \
ASSIGN_DRIVER_FUNC(PushFragmentShaderParams, name) \
ASSIGN_DRIVER_FUNC(PushComputeShaderParams, name) \
ASSIGN_DRIVER_FUNC(SetVertexSamplers, name) \
ASSIGN_DRIVER_FUNC(SetFragmentSamplers, name) \
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) \

View File

@ -713,8 +713,8 @@ typedef struct VulkanGraphicsPipeline
VkPipeline pipeline;
VulkanGraphicsPipelineLayout *pipelineLayout;
Refresh_PrimitiveType primitiveType;
VkDescriptorSet vertexSamplerDescriptorSet; /* updated by SetVertexSamplers */
VkDescriptorSet fragmentSamplerDescriptorSet; /* updated by SetFragmentSamplers */
VkDescriptorSet vertexSamplerDescriptorSet; /* updated by BindVertexSamplers */
VkDescriptorSet fragmentSamplerDescriptorSet; /* updated by BindFragmentSamplers */
VkDescriptorSet vertexUBODescriptorSet; /* permanently set in Create function */
VkDescriptorSet fragmentUBODescriptorSet; /* permanently set in Create function */
@ -6944,7 +6944,7 @@ static VkDescriptorSet VULKAN_INTERNAL_FetchImageDescriptorSet(
return newDescriptorSet;
}
static void VULKAN_SetVertexSamplers(
static void VULKAN_BindVertexSamplers(
Refresh_Renderer *driverData,
Refresh_CommandBuffer *commandBuffer,
Refresh_Texture **pTextures,
@ -6980,7 +6980,7 @@ static void VULKAN_SetVertexSamplers(
);
}
static void VULKAN_SetFragmentSamplers(
static void VULKAN_BindFragmentSamplers(
Refresh_Renderer *driverData,
Refresh_CommandBuffer *commandBuffer,
Refresh_Texture **pTextures,