Module: wine
Branch: master
Commit: 41581e8de8595175314412b14519069e6ce119ac
URL: https://gitlab.winehq.org/wine/wine/-/commit/41581e8de8595175314412b1451906…
Author: Zebediah Figura <zfigura(a)codeweavers.com>
Date: Thu Jul 21 18:51:36 2022 -0500
wined3d: Do not use glFramebufferTexture() to bind array RTVs with an array size of one.
Despite the array size, these are considered to be "layered" for the purposes of
GL_FRAMEBUFFER_ATTACHMENT_LAYERED, and mixing array and non-array textures in
this way will trigger GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49002
---
dlls/wined3d/context_gl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c
index 240eaec349c..a8c5160a5b3 100644
--- a/dlls/wined3d/context_gl.c
+++ b/dlls/wined3d/context_gl.c
@@ -507,7 +507,7 @@ static inline void wined3d_context_gl_set_fbo_key_for_render_target(const struct
key->objects[idx].object = render_target->gl_view.name;
key->objects[idx].target = render_target->gl_view.target;
key->objects[idx].level = 0;
- key->objects[idx].layer = WINED3D_ALL_LAYERS;
+ key->objects[idx].layer = (render_target->layer_count == 1 ? 0 : WINED3D_ALL_LAYERS);
return;
}