fix stencil API
continuous-integration/drone/push Build is failing Details

d3d11
cosmonaut 2024-03-02 23:02:44 -08:00
parent 8f2e70948d
commit 172348e65f
2 changed files with 4 additions and 6 deletions

View File

@ -55,7 +55,7 @@ add_library(Refresh
# Internal Headers # Internal Headers
src/Refresh_Driver.h src/Refresh_Driver.h
src/Refresh_Driver_Vulkan_vkfuncs.h src/Refresh_Driver_Vulkan_vkfuncs.h
Refresh_Driver_D3D11_cdefines.h src/Refresh_Driver_D3D11_cdefines.h
# Source Files # Source Files
src/Refresh.c src/Refresh.c
src/Refresh_Driver_D3D11.c src/Refresh_Driver_D3D11.c

View File

@ -1032,9 +1032,8 @@ static ID3D11DepthStencilState* D3D11_INTERNAL_FetchDepthStencilState(
dsDesc.FrontFace.StencilFailOp = RefreshToD3D11_CompareOp[depthStencilState.frontStencilState.failOp]; dsDesc.FrontFace.StencilFailOp = RefreshToD3D11_CompareOp[depthStencilState.frontStencilState.failOp];
dsDesc.FrontFace.StencilPassOp = RefreshToD3D11_CompareOp[depthStencilState.frontStencilState.passOp]; dsDesc.FrontFace.StencilPassOp = RefreshToD3D11_CompareOp[depthStencilState.frontStencilState.passOp];
/* API FIXME: D3D11 doesn't have separate read/write masks for each stencil side. What should we do? */ dsDesc.StencilReadMask = depthStencilState.compareMask;
dsDesc.StencilReadMask = depthStencilState.frontStencilState.compareMask; dsDesc.StencilWriteMask = depthStencilState.writeMask;
dsDesc.StencilWriteMask = depthStencilState.frontStencilState.writeMask;
if (depthStencilState.depthBoundsTestEnable) if (depthStencilState.depthBoundsTestEnable)
{ {
@ -1240,8 +1239,7 @@ static Refresh_GraphicsPipeline* D3D11_CreateGraphicsPipeline(
pipeline->depthStencilAttachmentFormat = RefreshToD3D11_TextureFormat[ pipeline->depthStencilAttachmentFormat = RefreshToD3D11_TextureFormat[
pipelineCreateInfo->attachmentInfo.depthStencilFormat pipelineCreateInfo->attachmentInfo.depthStencilFormat
]; ];
/* API FIXME: D3D11 doesn't have separate references for each stencil side. What should we do? */ pipeline->stencilRef = pipelineCreateInfo->depthStencilState.reference;
pipeline->stencilRef = pipelineCreateInfo->depthStencilState.frontStencilState.reference;
/* Rasterizer */ /* Rasterizer */