Added missing SDL_zero for renderTargetViewDesc

This commit is contained in:
chalonverse 2022-06-08 12:37:36 -07:00 committed by Sam Lantinga
parent 6bd49fc00c
commit 8303c5d0a3
1 changed files with 1 additions and 0 deletions

View File

@ -1540,6 +1540,7 @@ D3D12_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
if (texture->access & SDL_TEXTUREACCESS_TARGET) { if (texture->access & SDL_TEXTUREACCESS_TARGET) {
D3D12_RENDER_TARGET_VIEW_DESC renderTargetViewDesc; D3D12_RENDER_TARGET_VIEW_DESC renderTargetViewDesc;
SDL_zero(renderTargetViewDesc);
renderTargetViewDesc.Format = textureDesc.Format; renderTargetViewDesc.Format = textureDesc.Format;
renderTargetViewDesc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2D; renderTargetViewDesc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2D;
renderTargetViewDesc.Texture2D.MipSlice = 0; renderTargetViewDesc.Texture2D.MipSlice = 0;