mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-01 07:24:12 +01:00
[general] Minor COM pointer improvements
This commit is contained in:
parent
173e46e2bd
commit
ca53eaf878
@ -1728,7 +1728,7 @@ namespace dxvk {
|
||||
m_state.om.sampleMask = SampleMask;
|
||||
|
||||
if (blendState == nullptr)
|
||||
blendState = m_defaultBlendState.ptr();
|
||||
blendState = m_defaultBlendState;
|
||||
|
||||
EmitCs([
|
||||
cBlendState = std::move(blendState),
|
||||
@ -1769,7 +1769,7 @@ namespace dxvk {
|
||||
m_state.om.dsState = depthStencilState;
|
||||
|
||||
if (depthStencilState == nullptr)
|
||||
depthStencilState = m_defaultDepthStencilState.ptr();
|
||||
depthStencilState = m_defaultDepthStencilState;
|
||||
|
||||
EmitCs([cDepthStencilState = std::move(depthStencilState)]
|
||||
(DxvkContext* ctx) {
|
||||
@ -1848,7 +1848,7 @@ namespace dxvk {
|
||||
m_state.rs.state = rasterizerState;
|
||||
|
||||
if (rasterizerState == nullptr)
|
||||
rasterizerState = m_defaultRasterizerState.ptr();
|
||||
rasterizerState = m_defaultRasterizerState;
|
||||
|
||||
EmitCs([cRasterizerState = std::move(rasterizerState)]
|
||||
(DxvkContext* ctx) {
|
||||
|
@ -32,6 +32,13 @@ namespace dxvk {
|
||||
other.m_ptr = nullptr;
|
||||
}
|
||||
|
||||
Com& operator = (T* object) {
|
||||
this->decRef();
|
||||
m_ptr = object;
|
||||
this->incRef();
|
||||
return *this;
|
||||
}
|
||||
|
||||
Com& operator = (const Com& other) {
|
||||
other.incRef();
|
||||
this->decRef();
|
||||
|
Loading…
Reference in New Issue
Block a user