Fix 106278: HD5500 Crashes When Switching to Eevee #106535

Merged
Jeroen Bakker merged 6 commits from Jeroen-Bakker/blender:opengl-hd5500-macro-unrolling into main 2023-04-06 08:03:38 +02:00
Member

After investigating the crash logs it looked like the macro
unrolling wasn't working on Windows systems with these GPUs.

Macro unrolling was changed in order to cross compile to Metal and
in the future to Vulkan. The macro unrolling in OpenGL can be removed
by using a different naming scema.

This PR removes the macro unrolling by changing the generated GLSL
code:

Before

layout(std140) uniform _probe_block
{
  ProbeBlock probe_block;
};

After

layout(std140) uniform probe_block
{
  ProbeBlock _probe_block;
};

Some tweaks had to be done to the Eevee-shaders to make sure that
the macro unrolling is done correctly and could be compiled using
legacy opengl drivers.

Fix: #106278
Fix: #106555
(and others)

After investigating the crash logs it looked like the macro unrolling wasn't working on Windows systems with these GPUs. Macro unrolling was changed in order to cross compile to Metal and in the future to Vulkan. The macro unrolling in OpenGL can be removed by using a different naming scema. This PR removes the macro unrolling by changing the generated GLSL code: **Before** ``` layout(std140) uniform _probe_block { ProbeBlock probe_block; }; ``` **After** ``` layout(std140) uniform probe_block { ProbeBlock _probe_block; }; ``` Some tweaks had to be done to the Eevee-shaders to make sure that the macro unrolling is done correctly and could be compiled using legacy opengl drivers. Fix: #106278 Fix: #106555 (and others)
Jeroen Bakker added this to the 3.5 milestone 2023-04-04 10:46:48 +02:00
Jeroen Bakker added the
Interest
OpenGL
Module
EEVEE & Viewport
labels 2023-04-04 10:46:48 +02:00
Jeroen Bakker self-assigned this 2023-04-04 10:46:48 +02:00
Jeroen Bakker added 1 commit 2023-04-04 10:46:52 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
39d83d3eb7
Fix 106278: HD5500 Crashes When Switching to Eevee.
After investigating the crash logs it looked like the macro
unrolling wasn't working on Windows systems with these GPUs.

Macro unrolling was changed in order to cross compile to Metal and
in the future to Vulkan. The macro unrolling in OpenGL can be removed
by using a different naming scema.

This PR removes the macro unrolling by changing the generated GLSL
code:

**Before**
```
layout(std140) uniform _probe_block
{
  ProbeBlock probe_block;
};
```

**After**
```
layout(std140) uniform probe_block
{
  ProbeBlock _probe_block;
};
```

**TODO**

- [ ] Let users validate if this fixes the issue, or that more work is
  required.
- [ ] Check if pre OpenGL 4.3 is still working. Those platforms don't
  support explicit binding.
Jeroen Bakker requested review from Clément Foucault 2023-04-04 10:47:32 +02:00
Jeroen Bakker added this to the EEVEE & Viewport project 2023-04-04 10:47:37 +02:00
Author
Member

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR106535) when ready.
Clément Foucault approved these changes 2023-04-04 10:53:40 +02:00
Clément Foucault left a comment
Member

Needs testing, but it looks complete to me.

Needs testing, but it looks complete to me.
Hans Goudey changed title from Fix 106278: HD5500 Crashes When Switching to Eevee. to Fix 106278: HD5500 Crashes When Switching to Eevee 2023-04-04 13:51:31 +02:00
Jeroen Bakker added 1 commit 2023-04-04 13:51:49 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
c61b3fc7bf
Fix macros in legacy eevee.
Jeroen Bakker requested review from Clément Foucault 2023-04-04 13:52:15 +02:00
Author
Member

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR106535) when ready.
Jeroen Bakker added 2 commits 2023-04-04 15:08:44 +02:00
Author
Member

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR106535) when ready.
Jeroen Bakker added 2 commits 2023-04-04 15:14:39 +02:00
Author
Member

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR106535) when ready.
Jeroen Bakker merged commit ce9be92adf into main 2023-04-06 08:03:38 +02:00
Jeroen Bakker deleted branch opengl-hd5500-macro-unrolling 2023-04-06 08:03:41 +02:00
Author
Member

Note that this change breaks MacOS/AMD (eevee doesn't crash, but doesn't show anything) so this needs to be investigated before continuing)

Note that this change breaks MacOS/AMD (eevee doesn't crash, but doesn't show anything) so this needs to be investigated before continuing)
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
Asset Browser Project
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 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#106535
No description provided.