From 4de58520987882e1daa162e31cabca3f334c20a8 Mon Sep 17 00:00:00 2001 From: assiduous Date: Thu, 5 Nov 2020 22:46:17 -0800 Subject: Refactored TextureBase --- Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp b/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp index 243ab1c9..77e681f7 100644 --- a/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp @@ -359,7 +359,7 @@ void TextureBaseGL::CreateViewInternal(const struct TextureViewDesc& OrigViewDes try { auto ViewDesc = OrigViewDesc; - CorrectTextureViewDesc(ViewDesc); + ValidatedAndCorrectTextureViewDesc(m_Desc, ViewDesc); auto* pDeviceGLImpl = GetDevice(); auto& TexViewAllocator = pDeviceGLImpl->GetTexViewObjAllocator(); @@ -598,7 +598,7 @@ void TextureBaseGL::CopyData(DeviceContextGLImpl* pDeviceCtxGL, TextureViewDesc SRVDesc; SRVDesc.TextureDim = SrcTexDesc.Type; SRVDesc.ViewType = TEXTURE_VIEW_SHADER_RESOURCE; - CorrectTextureViewDesc(SRVDesc); + ValidatedAndCorrectTextureViewDesc(m_Desc, SRVDesc); // Note: texture view allocates memory for the copy of the name // If the name is empty, memory should not be allocated // We have to provide allocator even though it will never be used @@ -617,7 +617,7 @@ void TextureBaseGL::CopyData(DeviceContextGLImpl* pDeviceCtxGL, RTVDesc.FirstArraySlice = DepthSlice + DstSlice; RTVDesc.MostDetailedMip = DstMipLevel; RTVDesc.NumArraySlices = 1; - CorrectTextureViewDesc(RTVDesc); + ValidatedAndCorrectTextureViewDesc(m_Desc, RTVDesc); // Note: texture view allocates memory for the copy of the name // If the name is empty, memory should not be allocated // We have to provide allocator even though it will never be used -- cgit v1.2.3