Add GPUContext::SetStencilRef to stencil reference value
This commit is contained in:
@@ -222,6 +222,7 @@ void GPUContextDX12::Reset()
|
||||
_rtDepth = nullptr;
|
||||
_srMaskDirtyGraphics = 0;
|
||||
_srMaskDirtyCompute = 0;
|
||||
_stencilRef = 0;
|
||||
_psDirtyFlag = false;
|
||||
_isCompute = false;
|
||||
_currentCompute = nullptr;
|
||||
@@ -850,6 +851,15 @@ void GPUContextDX12::SetBlendFactor(const Float4& value)
|
||||
_commandList->OMSetBlendFactor(value.Raw);
|
||||
}
|
||||
|
||||
void GPUContextDX12::SetStencilRef(uint32 value)
|
||||
{
|
||||
if (_stencilRef != value)
|
||||
{
|
||||
_stencilRef = value;
|
||||
_commandList->OMSetStencilRef(value);
|
||||
}
|
||||
}
|
||||
|
||||
void GPUContextDX12::ResetSR()
|
||||
{
|
||||
for (int32 slot = 0; slot < GPU_MAX_SR_BINDED; slot++)
|
||||
|
||||
@@ -47,6 +47,7 @@ private:
|
||||
|
||||
uint32 _srMaskDirtyGraphics;
|
||||
uint32 _srMaskDirtyCompute;
|
||||
uint32 _stencilRef;
|
||||
|
||||
int32 _isCompute : 1;
|
||||
int32 _rtDirtyFlag : 1;
|
||||
@@ -167,6 +168,7 @@ public:
|
||||
void SetRenderTarget(GPUTextureView* depthBuffer, GPUTextureView* rt) override;
|
||||
void SetRenderTarget(GPUTextureView* depthBuffer, const Span<GPUTextureView*>& rts) override;
|
||||
void SetBlendFactor(const Float4& value) override;
|
||||
void SetStencilRef(uint32 value) override;
|
||||
void ResetSR() override;
|
||||
void ResetUA() override;
|
||||
void ResetCB() override;
|
||||
|
||||
Reference in New Issue
Block a user