Page MenuHome

GPUShader: compile error (when clipping in viewport)
Closed, ResolvedPublic

Description

System Information
Operating system: Win 10
Graphics card: RX 580

Blender Version
Broken: current master 7454fa927b8
Worked: 0093ad643a6

Short description of error
After selecting a region to be clipped blender crashes.

Exact steps for others to reproduce the error

  1. Open default .blend file.
  2. Alt+B to select a clipping region.

Debug Output

GPUShader: compile error:
Vertex shader failed to compile with the following errors:
ERROR: 5:3: error(#191) Redeclaration of array with size: WorldClipPlanes
ERROR: 5:29: error(#248) Function already has a body: world_clip_planes_calc_clip_distance
ERROR: error(#273) 2 compilation errors.  No code generated


GPUShader: compile error:
Vertex shader failed to compile with the following errors:
ERROR: 5:3: error(#191) Redeclaration of array with size: WorldClipPlanes
ERROR: 5:239: error(#248) Function already has a body: world_clip_planes_calc_clip_distance
ERROR: error(#273) 2 compilation errors.  No code generated


GPUShader: compile error:
Vertex shader failed to compile with the following errors:
ERROR: 5:3: error(#191) Redeclaration of array with size: WorldClipPlanes
ERROR: 5:29: error(#248) Function already has a body: world_clip_planes_calc_clip_distance
ERROR: error(#273) 2 compilation errors.  No code generated


GPUShader: compile error:
Vertex shader failed to compile with the following errors:
ERROR: 5:3: error(#191) Redeclaration of array with size: WorldClipPlanes
ERROR: 5:239: error(#248) Function already has a body: world_clip_planes_calc_clip_distance
ERROR: error(#273) 2 compilation errors.  No code generated


23: BLI_system_backtrace - 0xE8864FD0
22: GPU_shader_get_uniform_block - 0xE7E42E60
21: drw_shgroup_init - 0xE7E9BC00
20: DRW_shgroup_create - 0xE7E97B20
19: get_or_create_material_data - 0xE7F64070
18: workbench_deferred_solid_cache_populate - 0xE7F61E90
17: workbench_solid_cache_populate - 0xE7F06D90
16: drw_engines_cache_populate - 0xE7E703D0
15: DRW_draw_render_loop_ex - 0xE7E69E50
14: DRW_draw_view - 0xE7E69A40
13: view3d_draw_view - 0xE74BD440
12: view3d_main_region_draw - 0xE74B9D70
11: ED_region_do_draw - 0xE79C7620
10: wm_draw_window_offscreen - 0xE7320BA0
9: wm_draw_window - 0xE7321420
8: wm_draw_update - 0xE731F570
7: WM_main - 0xE72DEF40
6: main - 0xE72D72F0
5: invoke_main - 0xE8C682C0
4: __scrt_common_main_seh - 0xE8C68070
3: __scrt_common_main - 0xE8C68050
2: mainCRTStartup - 0xE8C68380
1: BaseThreadInitThunk - 0xD94181E0
0: RtlUserThreadStart - 0xDA7DA230
BLI_assert failed: C:\Users\User\blender-git\blender\source\blender\gpu\intern\gpu_shader.c:671, GPU_shader_get_uniform_block(), at 'shader && shader->program'

Event Timeline

matc (matc) renamed this task from GPUShader: compile error to GPUShader: compile error (when clipping in viewport).Mar 23 2019, 6:24 AM
matc (matc) updated the task description. (Show Details)

This would solve my problem.

diff --git a/source/blender/draw/engines/workbench/workbench_deferred.c b/source/blender/draw/engines/workbench/workbench_deferred.c
index a88ab5825ea..7b2030a6863 100644
--- a/source/blender/draw/engines/workbench/workbench_deferred.c
+++ b/source/blender/draw/engines/workbench/workbench_deferred.c
@@ -236,7 +236,7 @@ static GPUShader *ensure_deferred_prepass_shader(
                char *prepass_vert = workbench_build_prepass_vert(is_hair);
                char *prepass_frag = workbench_build_prepass_frag();
                sh_data->prepass_sh_cache[index] = GPU_shader_create_from_arrays({
-                       .vert = (const char *[]){sh_cfg_data->lib, prepass_vert, NULL},
+                       .vert = (const char *[]){prepass_vert, NULL},
                        .frag = (const char *[]){prepass_frag, NULL},
                        .defs = (const char *[]){sh_cfg_data->def, defines, NULL},
                });
Sebastian Parborg (zeddb) lowered the priority of this task from Needs Triage by Developer to Confirmed, High.