[Bf-blender-cvs] [15655aa1dd8] master: Cleanup: GPU: Remove unused code and header

Clément Foucault noreply at git.blender.org
Sun Jul 26 17:30:04 CEST 2020


Commit: 15655aa1dd89b334e6994a1ae9f14314a55a3476
Author: Clément Foucault
Date:   Sat Jul 25 18:46:26 2020 +0200
Branches: master
https://developer.blender.org/rB15655aa1dd89b334e6994a1ae9f14314a55a3476

Cleanup: GPU: Remove unused code and header

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

M	source/blender/gpu/GPU_debug.h
M	source/blender/gpu/intern/gpu_codegen.c
M	source/blender/gpu/intern/gpu_node_graph.h
M	source/blender/gpu/intern/gpu_primitive.c
M	source/blender/gpu/intern/gpu_select.c
M	source/blender/gpu/intern/gpu_shader_private.h
M	source/blender/gpu/intern/gpu_viewport.c

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

diff --git a/source/blender/gpu/GPU_debug.h b/source/blender/gpu/GPU_debug.h
index 8928581ee08..fc6ca791664 100644
--- a/source/blender/gpu/GPU_debug.h
+++ b/source/blender/gpu/GPU_debug.h
@@ -24,8 +24,6 @@
 #ifndef __GPU_DEBUG_H__
 #define __GPU_DEBUG_H__
 
-#include "GPU_glew.h"
-
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 0a1d6f560b6..794a5898ec2 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -41,7 +41,6 @@
 #include "BKE_material.h"
 
 #include "GPU_extensions.h"
-#include "GPU_glew.h"
 #include "GPU_material.h"
 #include "GPU_shader.h"
 #include "GPU_uniformbuffer.h"
diff --git a/source/blender/gpu/intern/gpu_node_graph.h b/source/blender/gpu/intern/gpu_node_graph.h
index bf59b720cff..a133dd1ccdc 100644
--- a/source/blender/gpu/intern/gpu_node_graph.h
+++ b/source/blender/gpu/intern/gpu_node_graph.h
@@ -29,7 +29,6 @@
 #include "DNA_customdata_types.h"
 #include "DNA_listBase.h"
 
-#include "GPU_glew.h"
 #include "GPU_material.h"
 #include "GPU_shader.h"
 
diff --git a/source/blender/gpu/intern/gpu_primitive.c b/source/blender/gpu/intern/gpu_primitive.c
index 2285c1ab95b..3b11b38db87 100644
--- a/source/blender/gpu/intern/gpu_primitive.c
+++ b/source/blender/gpu/intern/gpu_primitive.c
@@ -26,35 +26,6 @@
 #include "GPU_primitive.h"
 #include "gpu_primitive_private.h"
 
-GPUPrimClass GPU_primtype_class(GPUPrimType prim_type)
-{
-  static const GPUPrimClass classes[] = {
-      [GPU_PRIM_POINTS] = GPU_PRIM_CLASS_POINT,
-      [GPU_PRIM_LINES] = GPU_PRIM_CLASS_LINE,
-      [GPU_PRIM_LINE_STRIP] = GPU_PRIM_CLASS_LINE,
-      [GPU_PRIM_LINE_LOOP] = GPU_PRIM_CLASS_LINE,
-      [GPU_PRIM_TRIS] = GPU_PRIM_CLASS_SURFACE,
-      [GPU_PRIM_TRI_STRIP] = GPU_PRIM_CLASS_SURFACE,
-      [GPU_PRIM_TRI_FAN] = GPU_PRIM_CLASS_SURFACE,
-
-      [GPU_PRIM_LINES_ADJ] = GPU_PRIM_CLASS_LINE,
-      [GPU_PRIM_LINE_STRIP_ADJ] = GPU_PRIM_CLASS_LINE,
-      [GPU_PRIM_TRIS_ADJ] = GPU_PRIM_CLASS_SURFACE,
-
-      [GPU_PRIM_NONE] = GPU_PRIM_CLASS_NONE,
-  };
-
-  return classes[prim_type];
-}
-
-bool GPU_primtype_belongs_to_class(GPUPrimType prim_type, GPUPrimClass prim_class)
-{
-  if (prim_class == GPU_PRIM_CLASS_NONE && prim_type == GPU_PRIM_NONE) {
-    return true;
-  }
-  return prim_class & GPU_primtype_class(prim_type);
-}
-
 GLenum convert_prim_type_to_gl(GPUPrimType prim_type)
 {
 #if TRUST_NO_ONE
diff --git a/source/blender/gpu/intern/gpu_select.c b/source/blender/gpu/intern/gpu_select.c
index 5766a176a96..c069cbe012f 100644
--- a/source/blender/gpu/intern/gpu_select.c
+++ b/source/blender/gpu/intern/gpu_select.c
@@ -26,7 +26,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "GPU_glew.h"
 #include "GPU_select.h"
 
 #include "MEM_guardedalloc.h"
diff --git a/source/blender/gpu/intern/gpu_shader_private.h b/source/blender/gpu/intern/gpu_shader_private.h
index e28c5f76426..5a9a74cdfcc 100644
--- a/source/blender/gpu/intern/gpu_shader_private.h
+++ b/source/blender/gpu/intern/gpu_shader_private.h
@@ -21,7 +21,6 @@
 #ifndef __GPU_SHADER_PRIVATE_H__
 #define __GPU_SHADER_PRIVATE_H__
 
-#include "GPU_glew.h"
 #include "GPU_shader_interface.h"
 
 #ifdef __cplusplus
diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c
index 4d31366f53f..ed5297f0a4a 100644
--- a/source/blender/gpu/intern/gpu_viewport.c
+++ b/source/blender/gpu/intern/gpu_viewport.c
@@ -38,7 +38,6 @@
 #include "DNA_vec_types.h"
 
 #include "GPU_framebuffer.h"
-#include "GPU_glew.h"
 #include "GPU_immediate.h"
 #include "GPU_matrix.h"
 #include "GPU_texture.h"



More information about the Bf-blender-cvs mailing list