Fix code quality issues detected by PVS-Studio

This commit is contained in:
Wojtek Figat
2021-09-04 16:57:28 +02:00
parent 9c76d0c3cb
commit 53022ff013
30 changed files with 102 additions and 135 deletions

View File

@@ -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;

View File

@@ -589,7 +589,7 @@ void GPUTextureDX12::initHandles()
}
if (useUAV)
{
if (isCubeMap || isArray)
if (isCubeMap)
{
uavDesc.ViewDimension = D3D12_UAV_DIMENSION_TEXTURE2DARRAY;
uavDesc.Texture2DArray.ArraySize = arraySize;