http://bugs.winehq.org/show_bug.cgi?id=15644
--- Comment #12 from H. Verbeet hverbeet@gmail.com 2008-10-18 09:22:44 --- Yes, "texture" can potentially be a cube or rect texture. depth_blt_texture should always be a GL_TEXURE_2D, although that might actually be a problem in some cases if the card doesn't support NPOT textures (ie, might cause a software fallback). This->glDescription.textureName depends on the type of the surfaces used for the depth stencil, and can be either GL_TEXTURE_2D, GL_TEXTURE_RECT, or a cube face.
The other issue that's less obvious, is that the depth blit shader needs to be modified as well. It currently always uses texture2D to sample (in case of GLSL), but that's incorrect if the texture is a cube or rect texture, of course.