change Clear definition to make more sense
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
d9700707d0
commit
fe03f1739a
|
@ -746,8 +746,7 @@ REFRESHAPI void Refresh_DestroyDevice(Refresh_Device *device);
|
|||
* options: Bitflags to specify color/depth/stencil buffers for clearing.
|
||||
* colors: An array of color values for the cleared color buffers.
|
||||
* colorCount: The number of colors in the above array.
|
||||
* depth: The new value of the cleared depth buffer.
|
||||
* stencil: The new value of the cleared stencil buffer.
|
||||
* depthStencil: Depth and stencil values for the cleared depth stencil buffer.
|
||||
*/
|
||||
REFRESHAPI void Refresh_Clear(
|
||||
Refresh_Device *device,
|
||||
|
@ -756,8 +755,7 @@ REFRESHAPI void Refresh_Clear(
|
|||
Refresh_ClearOptions options,
|
||||
Refresh_Color *colors,
|
||||
uint32_t colorCount,
|
||||
float depth,
|
||||
int32_t stencil
|
||||
Refresh_DepthStencilValue depthStencil
|
||||
);
|
||||
|
||||
/* Draws data from vertex/index buffers with instancing enabled.
|
||||
|
|
|
@ -174,8 +174,7 @@ void Refresh_Clear(
|
|||
Refresh_ClearOptions options,
|
||||
Refresh_Color *colors,
|
||||
uint32_t colorCount,
|
||||
float depth,
|
||||
int32_t stencil
|
||||
Refresh_DepthStencilValue depthStencil
|
||||
) {
|
||||
NULL_RETURN(device);
|
||||
device->Clear(
|
||||
|
@ -185,8 +184,7 @@ void Refresh_Clear(
|
|||
options,
|
||||
colors,
|
||||
colorCount,
|
||||
depth,
|
||||
stencil
|
||||
depthStencil
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -174,8 +174,7 @@ struct Refresh_Device
|
|||
Refresh_ClearOptions options,
|
||||
Refresh_Color *colors,
|
||||
uint32_t colorCount,
|
||||
float depth,
|
||||
int32_t stencil
|
||||
Refresh_DepthStencilValue depthStencil
|
||||
);
|
||||
|
||||
void (*DrawInstancedPrimitives)(
|
||||
|
|
|
@ -3694,8 +3694,7 @@ static void VULKAN_Clear(
|
|||
Refresh_ClearOptions options,
|
||||
Refresh_Color *colors,
|
||||
uint32_t colorCount,
|
||||
float depth,
|
||||
int32_t stencil
|
||||
Refresh_DepthStencilValue depthStencil
|
||||
) {
|
||||
VulkanRenderer* renderer = (VulkanRenderer*) driverData;
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer*) commandBuffer;
|
||||
|
@ -3762,16 +3761,16 @@ static void VULKAN_Clear(
|
|||
|
||||
if (shouldClearDepth)
|
||||
{
|
||||
if (depth < 0.0f)
|
||||
if (depthStencil.depth < 0.0f)
|
||||
{
|
||||
depth = 0.0f;
|
||||
depthStencil.depth = 0.0f;
|
||||
}
|
||||
else if (depth > 1.0f)
|
||||
else if (depthStencil.depth > 1.0f)
|
||||
{
|
||||
depth = 1.0f;
|
||||
depthStencil.depth = 1.0f;
|
||||
}
|
||||
clearAttachments[attachmentCount].aspectMask |= VK_IMAGE_ASPECT_DEPTH_BIT;
|
||||
clearAttachments[attachmentCount].clearValue.depthStencil.depth = depth;
|
||||
clearAttachments[attachmentCount].clearValue.depthStencil.depth = depthStencil.depth;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3781,7 +3780,7 @@ static void VULKAN_Clear(
|
|||
if (shouldClearStencil)
|
||||
{
|
||||
clearAttachments[attachmentCount].aspectMask |= VK_IMAGE_ASPECT_STENCIL_BIT;
|
||||
clearAttachments[attachmentCount].clearValue.depthStencil.stencil = stencil;
|
||||
clearAttachments[attachmentCount].clearValue.depthStencil.stencil = depthStencil.stencil;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue