Henri Verbeet : d3d10: Also store the depth/ stencil state in the stateblock.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Sep 18 14:26:07 CDT 2014
Module: wine
Branch: master
Commit: b5a91d1246bd6cc1ed85c5e22208595d9f4d6b97
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b5a91d1246bd6cc1ed85c5e22208595d9f4d6b97
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu Sep 18 10:56:25 2014 +0200
d3d10: Also store the depth/stencil state in the stateblock.
---
dlls/d3d10/stateblock.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/dlls/d3d10/stateblock.c b/dlls/d3d10/stateblock.c
index 73d4b1b..72466a1 100644
--- a/dlls/d3d10/stateblock.c
+++ b/dlls/d3d10/stateblock.c
@@ -55,6 +55,7 @@ struct d3d10_stateblock
ID3D10RenderTargetView *rtvs[D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT];
ID3D10DepthStencilView *dsv;
ID3D10DepthStencilState *dss;
+ UINT stencil_ref;
ID3D10BlendState *bs;
float blend_factor[4];
UINT sample_mask;
@@ -198,6 +199,11 @@ static void stateblock_cleanup(struct d3d10_stateblock *stateblock)
ID3D10DepthStencilView_Release(stateblock->dsv);
stateblock->dsv = NULL;
}
+ if (stateblock->dss)
+ {
+ ID3D10DepthStencilState_Release(stateblock->dss);
+ stateblock->dss = NULL;
+ }
if (stateblock->bs)
{
ID3D10BlendState_Release(stateblock->bs);
@@ -355,6 +361,8 @@ static HRESULT STDMETHODCALLTYPE d3d10_stateblock_Capture(ID3D10StateBlock *ifac
if (stateblock->mask.OMRenderTargets)
ID3D10Device_OMGetRenderTargets(stateblock->device, D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT,
stateblock->rtvs, &stateblock->dsv);
+ if (stateblock->mask.OMDepthStencilState)
+ ID3D10Device_OMGetDepthStencilState(stateblock->device, &stateblock->dss, &stateblock->stencil_ref);
if (stateblock->mask.OMBlendState)
ID3D10Device_OMGetBlendState(stateblock->device, &stateblock->bs,
stateblock->blend_factor, &stateblock->sample_mask);
@@ -454,6 +462,8 @@ static HRESULT STDMETHODCALLTYPE d3d10_stateblock_Apply(ID3D10StateBlock *iface)
if (stateblock->mask.OMRenderTargets)
ID3D10Device_OMSetRenderTargets(stateblock->device, D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT,
stateblock->rtvs, stateblock->dsv);
+ if (stateblock->mask.OMDepthStencilState)
+ ID3D10Device_OMSetDepthStencilState(stateblock->device, stateblock->dss, stateblock->stencil_ref);
if (stateblock->mask.OMBlendState)
ID3D10Device_OMSetBlendState(stateblock->device, stateblock->bs,
stateblock->blend_factor, stateblock->sample_mask);
More information about the wine-cvs
mailing list