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;
|
m_state.om.sampleMask = SampleMask;
|
||||||
|
|
||||||
if (blendState == nullptr)
|
if (blendState == nullptr)
|
||||||
blendState = m_defaultBlendState.ptr();
|
blendState = m_defaultBlendState;
|
||||||
|
|
||||||
EmitCs([
|
EmitCs([
|
||||||
cBlendState = std::move(blendState),
|
cBlendState = std::move(blendState),
|
||||||
@ -1769,7 +1769,7 @@ namespace dxvk {
|
|||||||
m_state.om.dsState = depthStencilState;
|
m_state.om.dsState = depthStencilState;
|
||||||
|
|
||||||
if (depthStencilState == nullptr)
|
if (depthStencilState == nullptr)
|
||||||
depthStencilState = m_defaultDepthStencilState.ptr();
|
depthStencilState = m_defaultDepthStencilState;
|
||||||
|
|
||||||
EmitCs([cDepthStencilState = std::move(depthStencilState)]
|
EmitCs([cDepthStencilState = std::move(depthStencilState)]
|
||||||
(DxvkContext* ctx) {
|
(DxvkContext* ctx) {
|
||||||
@ -1848,7 +1848,7 @@ namespace dxvk {
|
|||||||
m_state.rs.state = rasterizerState;
|
m_state.rs.state = rasterizerState;
|
||||||
|
|
||||||
if (rasterizerState == nullptr)
|
if (rasterizerState == nullptr)
|
||||||
rasterizerState = m_defaultRasterizerState.ptr();
|
rasterizerState = m_defaultRasterizerState;
|
||||||
|
|
||||||
EmitCs([cRasterizerState = std::move(rasterizerState)]
|
EmitCs([cRasterizerState = std::move(rasterizerState)]
|
||||||
(DxvkContext* ctx) {
|
(DxvkContext* ctx) {
|
||||||
|
@ -32,6 +32,13 @@ namespace dxvk {
|
|||||||
other.m_ptr = nullptr;
|
other.m_ptr = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Com& operator = (T* object) {
|
||||||
|
this->decRef();
|
||||||
|
m_ptr = object;
|
||||||
|
this->incRef();
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
Com& operator = (const Com& other) {
|
Com& operator = (const Com& other) {
|
||||||
other.incRef();
|
other.incRef();
|
||||||
this->decRef();
|
this->decRef();
|
||||||
|
Loading…
Reference in New Issue
Block a user