[Bf-blender-cvs] [d97f52f0154] blender2.8: Revert "Fix T52855: Eevee: viewport artifacts"
Clément Foucault
noreply at git.blender.org
Thu Sep 21 19:54:55 CEST 2017
Commit: d97f52f0154923c3b2ba5f6095c35b1dad6aba0f
Author: Clément Foucault
Date: Thu Sep 21 19:43:53 2017 +0200
Branches: blender2.8
https://developer.blender.org/rBd97f52f0154923c3b2ba5f6095c35b1dad6aba0f
Revert "Fix T52855: Eevee: viewport artifacts"
This reverts commit 803c757c2b64258890aa30d20187fd8daf83b5e4.
===================================================================
M source/blender/draw/intern/draw_manager.c
===================================================================
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index bc8adf7556a..94f42f1ec18 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -364,6 +364,8 @@ static struct DRWResourceState {
GPUTexture **bound_texs;
bool *bound_tex_slots;
+
+ int bind_tex_inc;
int bind_ubo_inc;
} RST = {NULL};
@@ -1837,10 +1839,11 @@ static void bind_texture(GPUTexture *tex)
int bind_num = GPU_texture_bound_number(tex);
if (bind_num == -1) {
for (int i = 0; i < GPU_max_textures(); ++i) {
- if (RST.bound_tex_slots[i] == false) {
- GPU_texture_bind(tex, i);
- RST.bound_texs[i] = tex;
- RST.bound_tex_slots[i] = true;
+ RST.bind_tex_inc = (RST.bind_tex_inc + 1) % GPU_max_textures();
+ if (RST.bound_tex_slots[RST.bind_tex_inc] == false) {
+ GPU_texture_bind(tex, RST.bind_tex_inc);
+ RST.bound_texs[RST.bind_tex_inc] = tex;
+ RST.bound_tex_slots[RST.bind_tex_inc] = true;
return;
}
}
More information about the Bf-blender-cvs
mailing list