GPUShader: compile error (when clipping in viewport) #62873

Closed
opened 2019-03-23 06:21:31 +01:00 by matc · 4 comments

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

Blender Version
Broken: current master 7454fa927b
Worked: 0093ad643a

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

Exact steps for others to reproduce the error

  • Open default .blend file.
  • 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'
**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** - Open default .blend file. - 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' ```
Author

Added subscriber: @matc

Added subscriber: @matc
matc changed title from GPUShader: compile error to GPUShader: compile error (when clipping in viewport) 2019-03-23 06:24:06 +01:00
Author

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},
                });

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}, }); ```
Clément Foucault was assigned by Sebastian Parborg 2019-03-23 17:58:47 +01:00

This issue was referenced by 13832988ad

This issue was referenced by 13832988add506a3c2dca4964e8a9d1216aef80c

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#62873
No description provided.