Skip to content

Commit 3f1acff

Browse files
Fixed issue in OpenGL texture depth query
1 parent 13a8eef commit 3f1acff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,9 @@ static TextureDesc GetTextureDescFromGLHandle(DeviceContextGLImpl *pDeviceContex
130130
VERIFY(TexDesc.Depth != 0, "Texture depth query is not supported; it must be specified by the texture description.");
131131
#endif
132132
}
133-
else
134-
TexDesc.Depth = 1;
133+
134+
if (TexDesc.Type == RESOURCE_DIM_TEX_1D || TexDesc.Type == RESOURCE_DIM_TEX_2D)
135+
TexDesc.ArraySize = 1; // TexDesc.Depth also
135136

136137
#if GL_TEXTURE_INTERNAL_FORMAT
137138
GLint GlFormat = 0;

0 commit comments

Comments
 (0)