[Bf-blender-cvs] [7eeb7fd4062] tmp-gpu-shader-descriptor-2: gpu_shader_3d_depth_only.
Jeroen Bakker
noreply at git.blender.org
Wed Jan 12 11:28:25 CET 2022
Commit: 7eeb7fd4062f18d729c58a35b2658eb07133b541
Author: Jeroen Bakker
Date: Wed Jan 12 09:42:06 2022 +0100
Branches: tmp-gpu-shader-descriptor-2
https://developer.blender.org/rB7eeb7fd4062f18d729c58a35b2658eb07133b541
gpu_shader_3d_depth_only.
===================================================================
M source/blender/draw/intern/draw_manager.c
M source/blender/gpu/intern/gpu_shader_builtin.c
M source/blender/gpu/shaders/infos/gpu_shader_3D_depth_only_info.hh
M source/blender/gpu/shaders/infos/gpu_shader_3D_flat_color_info.hh
===================================================================
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index b372fddfeb0..276a8cc3a13 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -2793,7 +2793,6 @@ void DRW_draw_depth_object(
GPUUniformBuf *ubo = NULL;
if (use_clipping_planes) {
- GPU_batch_uniform_4fv_array(batch, "WorldClipPlanes", 6, planes.world);
ubo = GPU_uniformbuf_create_ex(sizeof(struct GPUClipPlanes), &planes, __func__);
GPU_batch_uniformbuf_bind(batch, "clipPlanes", ubo);
}
diff --git a/source/blender/gpu/intern/gpu_shader_builtin.c b/source/blender/gpu/intern/gpu_shader_builtin.c
index cabde86aa36..db1b7f5fb45 100644
--- a/source/blender/gpu/intern/gpu_shader_builtin.c
+++ b/source/blender/gpu/intern/gpu_shader_builtin.c
@@ -237,12 +237,9 @@ static const GPUShaderStages builtin_shader_stages[GPU_SHADER_BUILTIN_LEN] = {
.vert = datatoc_gpu_shader_3D_smooth_color_vert_glsl,
.frag = datatoc_gpu_shader_3D_smooth_color_frag_glsl,
},
- [GPU_SHADER_3D_DEPTH_ONLY] =
- {
- .name = "GPU_SHADER_3D_DEPTH_ONLY",
- .vert = datatoc_gpu_shader_3D_vert_glsl,
- .frag = datatoc_gpu_shader_depth_only_frag_glsl,
- },
+ [GPU_SHADER_3D_DEPTH_ONLY] = {.name = "GPU_SHADER_3D_DEPTH_ONLY",
+ .create_info = "gpu_shader_3d_depth_only",
+ .clipped_create_info = "gpu_shader_3d_depth_only_clipped"},
[GPU_SHADER_3D_CLIPPED_UNIFORM_COLOR] =
{
.name = "GPU_SHADER_3D_CLIPPED_UNIFORM_COLOR",
diff --git a/source/blender/gpu/shaders/infos/gpu_shader_3D_depth_only_info.hh b/source/blender/gpu/shaders/infos/gpu_shader_3D_depth_only_info.hh
index 004adf0353a..71d9d98a010 100644
--- a/source/blender/gpu/shaders/infos/gpu_shader_3D_depth_only_info.hh
+++ b/source/blender/gpu/shaders/infos/gpu_shader_3D_depth_only_info.hh
@@ -9,3 +9,7 @@ GPU_SHADER_CREATE_INFO(gpu_shader_3D_depth_only)
.vertex_source("gpu_shader_3D_vert.glsl")
.fragment_source("gpu_shader_depth_only_frag.glsl")
.do_static_compilation(true);
+
+GPU_SHADER_CREATE_INFO(gpu_shader_3D_depth_only_clipped)
+ .additional_info("gpu_shader_3D_depth_only")
+ .additional_info("gpu_clip_planes");
diff --git a/source/blender/gpu/shaders/infos/gpu_shader_3D_flat_color_info.hh b/source/blender/gpu/shaders/infos/gpu_shader_3D_flat_color_info.hh
index c0d79de6d5d..7fdcc13c730 100644
--- a/source/blender/gpu/shaders/infos/gpu_shader_3D_flat_color_info.hh
+++ b/source/blender/gpu/shaders/infos/gpu_shader_3D_flat_color_info.hh
@@ -16,5 +16,4 @@ GPU_SHADER_CREATE_INFO(gpu_shader_3D_flat_color)
GPU_SHADER_CREATE_INFO(gpu_shader_3D_flat_color_clipped)
.additional_info("gpu_shader_3D_flat_color")
- .additional_info("gpu_clip_planes")
- .do_static_compilation(true);
+ .additional_info("gpu_clip_planes");
More information about the Bf-blender-cvs
mailing list