Discarding Primitives Before Rasterization

Atualizado em 2023/10/21
Tempos estimado de leitura: < 5 min

Primitives are discarded before rasterization if the rasterizerDiscardEnable member of afxPipelineRasterizationConfig is enabled. When enabled, primitives are discarded after they are processed by the last active shader stage in the pipeline before rasterization.

To dynamically enable whether primitives are discarded before the rasterization stage, call:

void AfxCmdEnableRasterizerDiscard
    afxDrawScript dscr, /// is the command buffer into which the command will be recorded.
    afxBool enabled /// controls whether primitives are discarded immediately before the
 rasterization stage.

This command sets the discard enable for subsequent drawing commands when the graphics pipeline is created with VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE set in VkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by the VkPipelineRasterizationStateCreateInfo::rasterizerDiscardEnable value used to create the currently active pipeline.

Esta publicação foi útil?
Desaprovar 0
Leituras: 2


Translate »