[Bf-blender-cvs] [ee7093689f6] master: GPU: Use uint in GPU_batch_uniform_1ui.

mano-wii noreply at git.blender.org
Mon May 20 21:03:31 CEST 2019


Commit: ee7093689f65556588eb812631abb56d2b415263
Author: mano-wii
Date:   Mon May 20 15:41:39 2019 -0300
Branches: master
https://developer.blender.org/rBee7093689f65556588eb812631abb56d2b415263

GPU: Use uint in GPU_batch_uniform_1ui.

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

M	source/blender/draw/intern/draw_manager.c
M	source/blender/gpu/GPU_batch.h
M	source/blender/gpu/intern/gpu_batch.c

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

diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index c3818fa8837..d8afe4f248c 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -2684,7 +2684,7 @@ void DRW_draw_depth_object(ARegion *ar, GPUViewport *viewport, Object *object)
   DRW_opengl_context_disable();
 }
 
-static void draw_mesh_verts(GPUBatch *batch, int offset, const float world_clip_planes[6][4])
+static void draw_mesh_verts(GPUBatch *batch, uint offset, const float world_clip_planes[6][4])
 {
   GPU_point_size(UI_GetThemeValuef(TH_VERTEX_SIZE));
 
@@ -2698,7 +2698,7 @@ static void draw_mesh_verts(GPUBatch *batch, int offset, const float world_clip_
   GPU_batch_draw(batch);
 }
 
-static void draw_mesh_edges(GPUBatch *batch, int offset, const float world_clip_planes[6][4])
+static void draw_mesh_edges(GPUBatch *batch, uint offset, const float world_clip_planes[6][4])
 {
   GPU_line_width(1.0f);
   glProvokingVertex(GL_FIRST_VERTEX_CONVENTION);
@@ -2717,7 +2717,7 @@ static void draw_mesh_edges(GPUBatch *batch, int offset, const float world_clip_
 
 /* two options, facecolors or black */
 static void draw_mesh_face(GPUBatch *batch,
-                           int offset,
+                           uint offset,
                            const bool use_select,
                            const float world_clip_planes[6][4])
 {
@@ -2743,7 +2743,7 @@ static void draw_mesh_face(GPUBatch *batch,
   }
 }
 
-static void draw_mesh_face_dot(GPUBatch *batch, int offset, const float world_clip_planes[6][4])
+static void draw_mesh_face_dot(GPUBatch *batch, uint offset, const float world_clip_planes[6][4])
 {
   const eGPUShaderConfig sh_cfg = world_clip_planes ? GPU_SHADER_CFG_CLIPPED :
                                                       GPU_SHADER_CFG_DEFAULT;
diff --git a/source/blender/gpu/GPU_batch.h b/source/blender/gpu/GPU_batch.h
index 783bfb0b1f0..c48d49b5948 100644
--- a/source/blender/gpu/GPU_batch.h
+++ b/source/blender/gpu/GPU_batch.h
@@ -132,7 +132,7 @@ void GPU_batch_program_set_builtin_with_config(GPUBatch *batch,
 void GPU_batch_program_use_begin(GPUBatch *); /* call before Batch_Uniform (temp hack?) */
 void GPU_batch_program_use_end(GPUBatch *);
 
-void GPU_batch_uniform_1ui(GPUBatch *, const char *name, int value);
+void GPU_batch_uniform_1ui(GPUBatch *, const char *name, uint value);
 void GPU_batch_uniform_1i(GPUBatch *, const char *name, int value);
 void GPU_batch_uniform_1b(GPUBatch *, const char *name, bool value);
 void GPU_batch_uniform_1f(GPUBatch *, const char *name, float value);
diff --git a/source/blender/gpu/intern/gpu_batch.c b/source/blender/gpu/intern/gpu_batch.c
index 45697befe50..76a250a55c7 100644
--- a/source/blender/gpu/intern/gpu_batch.c
+++ b/source/blender/gpu/intern/gpu_batch.c
@@ -461,7 +461,7 @@ void GPU_batch_program_use_end(GPUBatch *batch)
     const GPUShaderInput *uniform = GPU_shaderinterface_uniform_ensure(batch->interface, name);
 #endif
 
-void GPU_batch_uniform_1ui(GPUBatch *batch, const char *name, int value)
+void GPU_batch_uniform_1ui(GPUBatch *batch, const char *name, uint value)
 {
   GET_UNIFORM
   glUniform1ui(uniform->location, value);



More information about the Bf-blender-cvs mailing list