[Bf-blender-cvs] [70bbccb478b] experimental-build: Revert "Test fix for eevee textures"

Dalai Felinto noreply at git.blender.org
Thu Sep 21 19:37:25 CEST 2017


Commit: 70bbccb478be7a80cefff2e76b13304ecf1d5c8d
Author: Dalai Felinto
Date:   Thu Sep 21 19:37:16 2017 +0200
Branches: experimental-build
https://developer.blender.org/rB70bbccb478be7a80cefff2e76b13304ecf1d5c8d

Revert "Test fix for eevee textures"

This reverts commit ff1cdddf704ae97b96e3e166203a8d6d1321b229.

===================================================================

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 b4375c7031b..bc8adf7556a 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -364,8 +364,6 @@ static struct DRWResourceState {
 	GPUTexture **bound_texs;
 
 	bool *bound_tex_slots;
-
-	int bind_tex_inc;
 	int bind_ubo_inc;
 } RST = {NULL};
 
@@ -1839,11 +1837,10 @@ 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) {
-			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;
+			if (RST.bound_tex_slots[i] == false) {
+				GPU_texture_bind(tex, i);
+				RST.bound_texs[i] = tex;
+				RST.bound_tex_slots[i] = true;
 				return;
 			}
 		}
@@ -1871,7 +1868,6 @@ static void bind_ubo(GPUUniformBuffer *ubo)
 
 static void release_texture_slots(void)
 {
-	RST.bind_tex_inc = 0;
 	memset(RST.bound_tex_slots, 0x0, sizeof(bool) * GPU_max_textures());
 }



More information about the Bf-blender-cvs mailing list