



Disabling stencil testing with a depth+stencil buffer doesn’t work on AMD/Windows
Currently playing with stencil test in my samples projects for my RHI.
I have a deferred renderer who enable the stencil test for the depth prepass, the g-buffer pass, the skybox pass and the lighting pass.
For the OIT pass the stencil test is disabled with VkPipelineDepthStencilStateCreateInfo.stencilTestEnable=false (VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE is not enabled in the dynamic states) but the depth/stencil buffer is the same as the other passes (third image, layout VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL)
On Nvidia GPU, the stencil test is correctly disabled in the OIT pass both on Windows & Linux.
On AMD GPU the stencil test is correctly disabled on Linux (second image, OIT revealage buffe) but not on Windows (first image).
RenderDoc shows no stencil state on the OIT pass (fourth image), which is correct since the stencil test is disabled, but we can see in the ouputs buffers that the stencil is applied.
Did I miss something in the pipeline config parameters ?
This is the pipeline creation code : https://github.com/HenriMichelon/vireo_rhi/blob/main/src/vulkan/VKPipelines.cpp#L255
UPDATE : I tried on a computer with an integrated AMD GPU (my AMD development computer have a RX5700) and it works correctly (both computers have the same drivers versions).