Fix code quality issues detected by PVS-Studio
This commit is contained in:
@@ -180,7 +180,7 @@ void GPUContextDX11::ClearUA(GPUBuffer* buf, const Vector4& value)
|
||||
|
||||
void GPUContextDX11::ResetRenderTarget()
|
||||
{
|
||||
if (_rtCount > 0 || _uaOutput || _rtDepth)
|
||||
if (_rtCount != 0 || _uaOutput || _rtDepth)
|
||||
{
|
||||
_omDirtyFlag = true;
|
||||
_rtCount = 0;
|
||||
|
||||
@@ -730,7 +730,7 @@ void GPUContextDX12::ClearUA(GPUBuffer* buf, const Vector4& value)
|
||||
|
||||
void GPUContextDX12::ResetRenderTarget()
|
||||
{
|
||||
if (_rtDepth != nullptr || _rtCount != 0 || _rtDepth)
|
||||
if (_rtDepth || _rtCount != 0)
|
||||
{
|
||||
_rtDirtyFlag = false;
|
||||
_psDirtyFlag = true;
|
||||
|
||||
@@ -589,7 +589,7 @@ void GPUTextureDX12::initHandles()
|
||||
}
|
||||
if (useUAV)
|
||||
{
|
||||
if (isCubeMap || isArray)
|
||||
if (isCubeMap)
|
||||
{
|
||||
uavDesc.ViewDimension = D3D12_UAV_DIMENSION_TEXTURE2DARRAY;
|
||||
uavDesc.Texture2DArray.ArraySize = arraySize;
|
||||
|
||||
Reference in New Issue
Block a user