From fe9aa0cce10b78f12c89f3752bb508b784e1b8a2 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Wed, 12 Jan 2022 14:04:42 +0100 Subject: Removed parts of the build scripts that are currently not needed. --- source/blender/gpu/CMakeLists.txt | 22 +++---- .../blender/gpu/intern/gpu_shader_create_info.cc | 1 - source/blender/gpu/intern/gpu_shader_info_baked.cc | 4 +- source/blender/gpu/intern/gpu_shader_info_baked.hh | 30 ---------- .../gpu/intern/gpu_shader_info_baked_stub.cc | 25 -------- .../gpu/shaders/infos/gpu_shader_todo_info.hh | 68 ---------------------- 6 files changed, 11 insertions(+), 139 deletions(-) delete mode 100644 source/blender/gpu/intern/gpu_shader_info_baked.hh delete mode 100644 source/blender/gpu/intern/gpu_shader_info_baked_stub.cc delete mode 100644 source/blender/gpu/shaders/infos/gpu_shader_todo_info.hh diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt index 03efc54635e..a525986e1cd 100644 --- a/source/blender/gpu/CMakeLists.txt +++ b/source/blender/gpu/CMakeLists.txt @@ -428,9 +428,6 @@ shaders/infos/gpu_shader_3D_flat_color_info.hh shaders/infos/gpu_shader_3D_uniform_color_info.hh shaders/infos/gpu_shader_3D_smooth_color_info.hh shaders/infos/gpu_shader_3D_depth_only_info.hh -#shaders/infos/gpu_shader_3D_polyline_info.hh !TODO -#shaders/infos/gpu_shader_2D_line_dashed_uniform_color_info.hh -#shaders/infos/gpu_shader_3D_line_dashed_uniform_color_info.hh shaders/infos/gpu_shader_2D_point_varying_size_varying_color_info.hh shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_aa_info.hh shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_outline_aa_info.hh @@ -440,7 +437,6 @@ shaders/infos/gpu_shader_3D_point_info.hh shaders/infos/gpu_shader_2D_nodelink_info.hh shaders/infos/gpu_shader_gpencil_stroke_info.hh shaders/infos/gpu_shader_simple_lighting_info.hh -#shaders/infos/gpu_shader_todo_info.hh ) set(SHADER_CREATE_INFOS_CONTENT "") @@ -472,15 +468,11 @@ if(CXX_WARN_NO_SUGGEST_OVERRIDE) endif() -set(GPU_SHADER_INFO_SRC - intern/gpu_shader_info_baked.cc -) if(WITH_GPU_SHADER_BUILDER) add_executable(shader_builder intern/gpu_shader_builder.cc intern/gpu_shader_builder_stubs.cc - intern/gpu_shader_info_baked_stub.cc ${shader_create_info_list_file} ) @@ -489,22 +481,24 @@ if(WITH_GPU_SHADER_BUILDER) ${PLATFORM_LINKLIBS} ) target_include_directories(shader_builder PRIVATE ${INC} ${CMAKE_CURRENT_BINARY_DIR}) - + set(BAKED_CREATE_INFOS_FILE ${CMAKE_CURRENT_BINARY_DIR}/shader_baked.hh) - + add_custom_command( OUTPUT - ${BAKED_CREATE_INFOS_FILE} + ${BAKED_CREATE_INFOS_FILE} COMMAND "$" ${BAKED_CREATE_INFOS_FILE} DEPENDS shader_builder ) + set(GPU_SHADER_INFO_SRC + intern/gpu_shader_info_baked.cc + ${BAKED_CREATE_INFOS_FILE} + ) - list(APPEND GPU_SHADER_INFO_SRC ${BAKED_CREATE_INFOS_FILE}) + blender_add_lib(bf_gpu_shader_infos "${GPU_SHADER_INFO_SRC}" "" "" "") endif() -blender_add_lib(bf_gpu_shader_infos "${GPU_SHADER_INFO_SRC}" "" "" "") -#add_dependencies(blender bf_gpu_shader_infos) if(WITH_GTESTS) if(WITH_OPENGL_DRAW_TESTS) diff --git a/source/blender/gpu/intern/gpu_shader_create_info.cc b/source/blender/gpu/intern/gpu_shader_create_info.cc index 223a62f3118..e4e5034026f 100644 --- a/source/blender/gpu/intern/gpu_shader_create_info.cc +++ b/source/blender/gpu/intern/gpu_shader_create_info.cc @@ -32,7 +32,6 @@ #include "gpu_shader_create_info.hh" #include "gpu_shader_create_info_private.hh" -#include "gpu_shader_info_baked.hh" #undef GPU_SHADER_INTERFACE_INFO #undef GPU_SHADER_CREATE_INFO diff --git a/source/blender/gpu/intern/gpu_shader_info_baked.cc b/source/blender/gpu/intern/gpu_shader_info_baked.cc index d97135062e0..00af803f765 100644 --- a/source/blender/gpu/intern/gpu_shader_info_baked.cc +++ b/source/blender/gpu/intern/gpu_shader_info_baked.cc @@ -19,4 +19,6 @@ /** \file * \ingroup gpu - */ + * + * Intentionally empty for compiling shader builder. + */ \ No newline at end of file diff --git a/source/blender/gpu/intern/gpu_shader_info_baked.hh b/source/blender/gpu/intern/gpu_shader_info_baked.hh deleted file mode 100644 index 7e86d27e091..00000000000 --- a/source/blender/gpu/intern/gpu_shader_info_baked.hh +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2021 Blender Foundation. - * All rights reserved. - */ - -/** \file - * \ingroup gpu - * - * Header to baked shader infos. - * - * Baked shader infos are optionally compiled into a separate library (bf_gpu_shader_infos). - * This header contains the interface to this library so shader_builder can be linked to a stub - * implementation. - */ - -#pragma once diff --git a/source/blender/gpu/intern/gpu_shader_info_baked_stub.cc b/source/blender/gpu/intern/gpu_shader_info_baked_stub.cc deleted file mode 100644 index 21f22ec331d..00000000000 --- a/source/blender/gpu/intern/gpu_shader_info_baked_stub.cc +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2021 Blender Foundation. - * All rights reserved. - */ - -/** \file - * \ingroup gpu - * - * Stub file to fix cyclic-dependency between shader_builder and bf_gpu. - */ - diff --git a/source/blender/gpu/shaders/infos/gpu_shader_todo_info.hh b/source/blender/gpu/shaders/infos/gpu_shader_todo_info.hh deleted file mode 100644 index 099f0070000..00000000000 --- a/source/blender/gpu/shaders/infos/gpu_shader_todo_info.hh +++ /dev/null @@ -1,68 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2022 Blender Foundation. - * All rights reserved. - */ - -/** \file - * \ingroup gpu - */ - -#include "gpu_shader_create_info.hh" - -GPU_SHADER_CREATE_INFO(gpu_shader_2D_image_multi_rect_color) - .vertex_source("datatoc_gpu_shader_2D_image_multi_rect_vert.glsl") - .fragment_source("datatoc_gpu_shader_image_varying_color_frag.glsl") - .do_static_compilation(true); - -GPU_SHADER_CREATE_INFO(gpu_shader_2D_widget_base) - .vertex_source("gpu_shader_2D_widget_base_vert.glsl") - .fragment_source("gpu_shader_2D_widget_base_frag.glsl") - .do_static_compilation(true); -/* - [GPU_SHADER_2D_WIDGET_BASE] = - { - .name = "GPU_SHADER_2D_WIDGET_BASE", - .vert = datatoc_gpu_shader_2D_widget_base_vert_glsl, - .frag = datatoc_gpu_shader_2D_widget_base_frag_glsl, -}, -*/ -GPU_SHADER_CREATE_INFO(gpu_shader_2D_widget_base_inst) - .vertex_source("gpu_shader_2D_widget_base_vert.glsl") - .fragment_source("gpu_shader_2D_widget_base_frag.glsl") - .define("USE_INSTANCE") - .do_static_compilation(true); -/* - [GPU_SHADER_2D_WIDGET_BASE_INST] = - { - .name = "GPU_SHADER_2D_WIDGET_BASE_INST", - .vert = datatoc_gpu_shader_2D_widget_base_vert_glsl, - .frag = datatoc_gpu_shader_2D_widget_base_frag_glsl, - .defs = "#define USE_INSTANCE\n", -}, -*/ -GPU_SHADER_CREATE_INFO(gpu_shader_2D_widget_shadow) - .vertex_source("gpu_shader_2D_widget_shadow_vert.glsl") - .fragment_source("gpu_shader_2D_widget_shadow_frag.glsl") - .do_static_compilation(true); -/* - [GPU_SHADER_2D_WIDGET_SHADOW] = - { - .name = "GPU_SHADER_2D_WIDGET_SHADOW", - .vert = datatoc_gpu_shader_2D_widget_shadow_vert_glsl, - .frag = datatoc_gpu_shader_2D_widget_shadow_frag_glsl, -}, -*/ \ No newline at end of file -- cgit v1.2.3