uninitialized variables-gfx

This commit is contained in:
AzaezelX 2020-05-11 15:00:25 -05:00
parent 1efb687867
commit b9c207765e
33 changed files with 108 additions and 43 deletions

View file

@ -90,6 +90,8 @@ GFXD3D11Device::GFXD3D11Device(U32 index)
mDeviceSwizzle24 = &Swizzles::bgr;
mAdapterIndex = index;
mSwapChain = NULL;
mD3DDevice = NULL;
mD3DDeviceContext = NULL;
mVolatileVB = NULL;
@ -107,6 +109,8 @@ GFXD3D11Device::GFXD3D11Device(U32 index)
mPixVersion = 0.0;
mFeatureLevel = D3D_FEATURE_LEVEL_9_1; //lowest listed. should be overridden by init
mVertexShaderTarget = String::EmptyString;
mPixelShaderTarget = String::EmptyString;
mShaderModel = String::EmptyString;
@ -123,7 +127,8 @@ GFXD3D11Device::GFXD3D11Device(U32 index)
mCreateFenceType = -1; // Unknown, test on first allocate
mCurrentConstBuffer = NULL;
mMultisampleDesc.Count = 0;
mMultisampleDesc.Quality = 0;
mOcclusionQuerySupported = false;
mDebugLayers = false;

View file

@ -79,6 +79,7 @@ protected:
class D3D11VertexDecl : public GFXVertexDecl
{
public:
D3D11VertexDecl() :decl(NULL) {}
virtual ~D3D11VertexDecl()
{
SAFE_RELEASE( decl );

View file

@ -73,11 +73,11 @@ inline GFXD3D11PrimitiveBuffer::GFXD3D11PrimitiveBuffer( GFXDevice *device,
mLocked = false;
#ifdef TORQUE_DEBUG
mDebugGuardBuffer = NULL;
mLockedBuffer = NULL;
mLockedSize = 0;
#endif
mIndexStart = 0;
mIndexEnd = 0;
#endif
mLockedBuffer = NULL;
}
#endif

View file

@ -77,17 +77,17 @@ enum REGISTER_TYPE
struct ConstantDesc
{
String Name;
S32 RegisterIndex;
S32 RegisterCount;
S32 Rows;
S32 Columns;
S32 Elements;
S32 StructMembers;
REGISTER_TYPE RegisterSet;
CONST_CLASS Class;
CONST_TYPE Type;
U32 Bytes;
String Name = String::EmptyString;
S32 RegisterIndex = 0;
S32 RegisterCount = 0;
S32 Rows = 0;
S32 Columns = 0;
S32 Elements = 0;
S32 StructMembers = 0;
REGISTER_TYPE RegisterSet = D3DRS_FLOAT4;
CONST_CLASS Class = D3DPC_SCALAR;
CONST_TYPE Type = D3DPT_FLOAT;
U32 Bytes = 0;
};
class ConstantTable

View file

@ -324,6 +324,8 @@ GFXD3D11WindowTarget::GFXD3D11WindowTarget()
mDepthStencilView = NULL;
mDepthStencil = NULL;
mBackBufferView = NULL;
mSwapChain = NULL;
dMemset(&mPresentationParams, 0, sizeof(mPresentationParams));
mSecondaryWindow = false;
}

View file

@ -46,10 +46,13 @@ GFXD3D11TextureObject::GFXD3D11TextureObject( GFXDevice * d, GFXTextureProfile *
mLocked = false;
mD3DSurface = NULL;
dMemset(&mLockRect, 0, sizeof(mLockRect));
dMemset(&mLockBox, 0, sizeof(mLockBox));
mLockedSubresource = 0;
mDSView = NULL;
mRTView = NULL;
mSRView = NULL;
isManaged = false;
}
GFXD3D11TextureObject::~GFXD3D11TextureObject()
@ -318,4 +321,4 @@ ID3D11RenderTargetView** GFXD3D11TextureObject::getRTViewPtr()
ID3D11DepthStencilView** GFXD3D11TextureObject::getDSViewPtr()
{
return &mDSView;
}
}

View file

@ -68,10 +68,10 @@ inline GFXD3D11VertexBuffer::GFXD3D11VertexBuffer() : GFXVertexBuffer(0,0,0,0,(G
mIsFirstLock = true;
lockedVertexEnd = lockedVertexStart = 0;
mClearAtFrameEnd = false;
mLockedBuffer = NULL;
#ifdef TORQUE_DEBUG
mDebugGuardBuffer = NULL;
mLockedBuffer = NULL;
#endif
}
@ -92,4 +92,4 @@ inline GFXD3D11VertexBuffer::GFXD3D11VertexBuffer( GFXDevice *device,
#endif
}
#endif // _GFXD3D_VERTEXBUFFER_H_
#endif // _GFXD3D_VERTEXBUFFER_H_