Regression: Crash on EEVEE when launch with --debug-gpu-force-workarounds #103313

Closed
opened 2022-12-18 11:18:41 +01:00 by Sun Kim · 9 comments
Contributor

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: Radeon RX 570 Series ATI Technologies Inc. 4.5.0 Core Profile Context 22.11.2.221130

Blender Version
Broken: version: 3.5.0 Alpha, branch: master, commit date: 2022-12-17 02:15, hash: 6797de4e10
Worked: 3.5 2022-12-08 02:10, hash: 04693f9074
Caused by 6b8bb26c45

Based on daily builds I have on my PC, it's between 2022-12-08 02:10, hash: 04693f9074 and 2022-12-10 12:43, hash: fe30856d83.

Short description of error
Blender crashes on EEVEE (Material Preview, Render Preview) when it was launched with blender_debug_gpu_glitchworkaround.

blender_system_info.txt

blender_debug_output.txt

blender.crash.txt

Exact steps for others to reproduce the error

  • Start Blender with blender_debug_gpu_glitchworkaround.
  • From startup file, switch to Material Preview or Render Preview.
  • Crash
**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: Radeon RX 570 Series ATI Technologies Inc. 4.5.0 Core Profile Context 22.11.2.221130 **Blender Version** Broken: version: 3.5.0 Alpha, branch: master, commit date: 2022-12-17 02:15, hash: `6797de4e10` Worked: 3.5 2022-12-08 02:10, hash: `04693f9074` Caused by 6b8bb26c45 Based on daily builds I have on my PC, it's between 2022-12-08 02:10, hash: `04693f9074` and 2022-12-10 12:43, hash: `fe30856d83`. **Short description of error** Blender crashes on EEVEE (Material Preview, Render Preview) when it was launched with `blender_debug_gpu_glitchworkaround`. [blender_system_info.txt](https://archive.blender.org/developer/F14069083/blender_system_info.txt) [blender_debug_output.txt](https://archive.blender.org/developer/F14069084/blender_debug_output.txt) [blender.crash.txt](https://archive.blender.org/developer/F14069085/blender.crash.txt) **Exact steps for others to reproduce the error** - Start Blender with `blender_debug_gpu_glitchworkaround`. - From startup file, switch to Material Preview or Render Preview. - Crash
Author
Contributor

Added subscriber: @persun

Added subscriber: @persun
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Hi, thanks for the report. I can confirm.
got assert hit in debug build at GPU_material_status(mat) == GPU_MAT_SUCCESS

ERROR (gpu.shader): WOWorld VertShader:
      |
 4864 |   return textureLod_cubemapArray(probeCubes, vec4(R, float(pd_id)), lod).rgb;
      |
      | Error: C1102: incompatible type for parameter #1 ("tex.502")
      |
 4870 |   return textureLod_cubemapArray(probeCubes, vec4(R, 0.0), lod).rgb;
      |
      | Error: C1102: incompatible type for parameter #1 ("tex.502")

ERROR (gpu.shader): WOWorld FragShader:
      |
 5210 |   return textureLod_cubemapArray(probeCubes, vec4(R, float(pd_id)), lod).rgb;
      |
      | Error: C1102: incompatible type for parameter #1 ("tex.500")
      |
 5216 |   return textureLod_cubemapArray(probeCubes, vec4(R, 0.0), lod).rgb;
      |
      | Error: C1102: incompatible type for parameter #1 ("tex.500")

ERROR (gpu.shader): MAEEVEEE default error VertShader:
      |
 4874 |   return textureLod_cubemapArray(probeCubes, vec4(R, float(pd_id)), lod).rgb;
      |
      | Error: C1102: incompatible type for parameter #1 ("tex.506")
      |
 4880 |   return textureLod_cubemapArray(probeCubes, vec4(R, 0.0), lod).rgb;
      |
      | Error: C1102: incompatible type for parameter #1 ("tex.506")

ERROR (gpu.shader): MAEEVEEE default error FragShader:
      |
 5220 |   return textureLod_cubemapArray(probeCubes, vec4(R, float(pd_id)), lod).rgb;
      |
      | Error: C1102: incompatible type for parameter #1 ("tex.504")
      |
 5226 |   return textureLod_cubemapArray(probeCubes, vec4(R, 0.0), lod).rgb;
      |
      | Error: C1102: incompatible type for parameter #1 ("tex.504")

Stack trace:
blender.exe         :0x00007FF70A020D10  bli_windows_system_backtrace_stack_thread C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\blenlib\intern\system_win32.c:219
blender.exe         :0x00007FF70A01FDA0  BLI_windows_system_backtrace_stack C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\blenlib\intern\system_win32.c:306
blender.exe         :0x00007FF70A01F770  BLI_system_backtrace C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\blenlib\intern\system_win32.c:372
blender.exe         :0x00007FF70A025050  _BLI_assert_print_backtrace C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\blenlib\intern\BLI_assert.c:36
blender.exe         :0x00007FF707B2D250  EEVEE_material_get C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\draw\engines\eevee\eevee_shaders.cc:1408
blender.exe         :0x00007FF707B09FF0  EEVEE_lightprobes_cache_init C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\draw\engines\eevee\eevee_lightprobes.c:301
blender.exe         :0x00007FF707AC0120  eevee_cache_init C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\draw\engines\eevee\eevee_engine.c:89
blender.exe         :0x00007FF7079FF280  drw_engines_cache_init C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager.c:1040
blender.exe         :0x00007FF7079F82D0  DRW_draw_render_loop_ex C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager.c:1710
blender.exe         :0x00007FF7079FA010  DRW_draw_view C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager.c:1636
blender.exe         :0x00007FF70961F070  view3d_draw_view C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\editors\space_view3d\view3d_draw.cc:1552
blender.exe         :0x00007FF709625060  view3d_main_region_draw C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\editors\space_view3d\view3d_draw.cc:1587
blender.exe         :0x00007FF706B26840  ED_region_do_draw C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\editors\screen\area.c:551
blender.exe         :0x00007FF706AE8ED0  wm_draw_window_offscreen C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_draw.c:960
blender.exe         :0x00007FF706AE8B60  wm_draw_window C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_draw.c:1127
blender.exe         :0x00007FF706AE84C0  wm_draw_update C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_draw.c:1385
blender.exe         :0x00007FF706A95EF0  WM_main C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm.c:647
blender.exe         :0x00007FF706A8D4C0  main C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\creator\creator.c:589
blender.exe         :0x00007FF70A48FE70  invoke_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79
blender.exe         :0x00007FF70A48FC20  __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
blender.exe         :0x00007FF70A48FC00  __scrt_common_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331
blender.exe         :0x00007FF70A48FF30  mainCRTStartup D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17
KERNEL32.DLL        :0x00007FFF48B45590  BaseThreadInitThunk
ntdll.dll           :0x00007FFF4AA44830  RtlUserThreadStart```
Hi, thanks for the report. I can confirm. got assert hit in debug build at `GPU_material_status(mat) == GPU_MAT_SUCCESS` ```lines=10 ERROR (gpu.shader): WOWorld VertShader: | 4864 | return textureLod_cubemapArray(probeCubes, vec4(R, float(pd_id)), lod).rgb; | | Error: C1102: incompatible type for parameter #1 ("tex.502") | 4870 | return textureLod_cubemapArray(probeCubes, vec4(R, 0.0), lod).rgb; | | Error: C1102: incompatible type for parameter #1 ("tex.502") ERROR (gpu.shader): WOWorld FragShader: | 5210 | return textureLod_cubemapArray(probeCubes, vec4(R, float(pd_id)), lod).rgb; | | Error: C1102: incompatible type for parameter #1 ("tex.500") | 5216 | return textureLod_cubemapArray(probeCubes, vec4(R, 0.0), lod).rgb; | | Error: C1102: incompatible type for parameter #1 ("tex.500") ERROR (gpu.shader): MAEEVEEE default error VertShader: | 4874 | return textureLod_cubemapArray(probeCubes, vec4(R, float(pd_id)), lod).rgb; | | Error: C1102: incompatible type for parameter #1 ("tex.506") | 4880 | return textureLod_cubemapArray(probeCubes, vec4(R, 0.0), lod).rgb; | | Error: C1102: incompatible type for parameter #1 ("tex.506") ERROR (gpu.shader): MAEEVEEE default error FragShader: | 5220 | return textureLod_cubemapArray(probeCubes, vec4(R, float(pd_id)), lod).rgb; | | Error: C1102: incompatible type for parameter #1 ("tex.504") | 5226 | return textureLod_cubemapArray(probeCubes, vec4(R, 0.0), lod).rgb; | | Error: C1102: incompatible type for parameter #1 ("tex.504") Stack trace: blender.exe :0x00007FF70A020D10 bli_windows_system_backtrace_stack_thread C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\blenlib\intern\system_win32.c:219 blender.exe :0x00007FF70A01FDA0 BLI_windows_system_backtrace_stack C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\blenlib\intern\system_win32.c:306 blender.exe :0x00007FF70A01F770 BLI_system_backtrace C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\blenlib\intern\system_win32.c:372 blender.exe :0x00007FF70A025050 _BLI_assert_print_backtrace C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\blenlib\intern\BLI_assert.c:36 blender.exe :0x00007FF707B2D250 EEVEE_material_get C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\draw\engines\eevee\eevee_shaders.cc:1408 blender.exe :0x00007FF707B09FF0 EEVEE_lightprobes_cache_init C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\draw\engines\eevee\eevee_lightprobes.c:301 blender.exe :0x00007FF707AC0120 eevee_cache_init C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\draw\engines\eevee\eevee_engine.c:89 blender.exe :0x00007FF7079FF280 drw_engines_cache_init C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager.c:1040 blender.exe :0x00007FF7079F82D0 DRW_draw_render_loop_ex C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager.c:1710 blender.exe :0x00007FF7079FA010 DRW_draw_view C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager.c:1636 blender.exe :0x00007FF70961F070 view3d_draw_view C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\editors\space_view3d\view3d_draw.cc:1552 blender.exe :0x00007FF709625060 view3d_main_region_draw C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\editors\space_view3d\view3d_draw.cc:1587 blender.exe :0x00007FF706B26840 ED_region_do_draw C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\editors\screen\area.c:551 blender.exe :0x00007FF706AE8ED0 wm_draw_window_offscreen C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_draw.c:960 blender.exe :0x00007FF706AE8B60 wm_draw_window C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_draw.c:1127 blender.exe :0x00007FF706AE84C0 wm_draw_update C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_draw.c:1385 blender.exe :0x00007FF706A95EF0 WM_main C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm.c:647 blender.exe :0x00007FF706A8D4C0 main C:\Users\prati\OneDrive\Desktop\BlenderOSP\blender\source\creator\creator.c:589 blender.exe :0x00007FF70A48FE70 invoke_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79 blender.exe :0x00007FF70A48FC20 __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288 blender.exe :0x00007FF70A48FC00 __scrt_common_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331 blender.exe :0x00007FF70A48FF30 mainCRTStartup D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17 KERNEL32.DLL :0x00007FFF48B45590 BaseThreadInitThunk ntdll.dll :0x00007FFF4AA44830 RtlUserThreadStart```
Member

Added subscribers: @Michael-Parkin-White-Apple, @fclem

Added subscribers: @Michael-Parkin-White-Apple, @fclem
Member
First bad commit: 6b8bb26c45 cc @Michael-Parkin-White-Apple cc @fclem
Pratik Borhade changed title from Crash on EEVEE when launch with --debug-gpu-force-workarounds to Regression: Crash on EEVEE when launch with --debug-gpu-force-workarounds 2022-12-19 07:50:45 +01:00

From a quick scan, looks like there has been an issue with the cubemap_lib fallback path for when GPU_ARB_texture_cube_map_array is undefined., following the changes to make EEVEE utilise CreateInfo.

One immediate cause of the vetted shader errors comes from the prevalence of pass-specific resources. Even for cases where the cube maps aren't sampled in the vertex shader, as the shader resources are declared in all cases, this can cause an error if cubemap_lib is missing when generating shaders with cube map resource declarations. Previously, those declarations may not be present in the vertex shader, unless included via a library, which would have had the correct include for cubemap_lib.glsl.

Second issue is that shader library dependencies get injected after resource declaration, so even if cubemap_lib is present, the sampler type declaration will exist above resource declarations. For this, I propose moving the cube map type declaration to glsl_shader_defines.glsl, such that it exists at the very top of the code. Then, cubemap_lib can still be included as-is, as dependent functions will still retain correct order.

Will submit a sample patch once errors are fixed locally.

From a quick scan, looks like there has been an issue with the `cubemap_lib` fallback path for when `GPU_ARB_texture_cube_map_array` is undefined., following the changes to make EEVEE utilise CreateInfo. One immediate cause of the vetted shader errors comes from the prevalence of pass-specific resources. Even for cases where the cube maps aren't sampled in the vertex shader, as the shader resources are declared in all cases, this can cause an error if cubemap_lib is missing when generating shaders with cube map resource declarations. Previously, those declarations may not be present in the vertex shader, unless included via a library, which would have had the correct include for `cubemap_lib.glsl`. Second issue is that shader library dependencies get injected after resource declaration, so even if cubemap_lib is present, the sampler type declaration will exist above resource declarations. For this, I propose moving the cube map type declaration to `glsl_shader_defines.glsl`, such that it exists at the very top of the code. Then, cubemap_lib can still be included as-is, as dependent functions will still retain correct order. Will submit a sample patch once errors are fixed locally.

This issue was referenced by dedca2c994

This issue was referenced by dedca2c9948af7a65dd78263e37f77052fc03de7

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Clément Foucault self-assigned this 2022-12-20 14:22:39 +01:00
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
5 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#103313
No description provided.