[Vulkan] Select back-face stencil ref/mask when culling only front faces
They were picked whenever front faces were culled, even with both faces culled. Matches D3D12. Co-authored-by: Herman S. <429230+has207@users.noreply.github.com>
This commit is contained in:
committed by
Radosław Gliński
parent
53061c63fe
commit
77597d62ae
@@ -4712,8 +4712,9 @@ void VulkanCommandProcessor::UpdateDynamicState(
|
||||
stencil_ref_mask_back_reg = XE_GPU_REG_RB_STENCILREFMASK_BF;
|
||||
} else {
|
||||
// Choose the back face values only if drawing only back faces.
|
||||
auto pa_su_sc_mode_cntl = regs.Get<reg::PA_SU_SC_MODE_CNTL>();
|
||||
stencil_ref_mask_front_reg =
|
||||
regs.Get<reg::PA_SU_SC_MODE_CNTL>().cull_front
|
||||
(pa_su_sc_mode_cntl.cull_front && !pa_su_sc_mode_cntl.cull_back)
|
||||
? XE_GPU_REG_RB_STENCILREFMASK_BF
|
||||
: XE_GPU_REG_RB_STENCILREFMASK;
|
||||
stencil_ref_mask_back_reg = stencil_ref_mask_front_reg;
|
||||
|
||||
Reference in New Issue
Block a user