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

6 Commits

Author SHA1 Message Date
Jeroen Bakker 74d24f9643 Remove ticks from #error compile directives.
buildbot/vexp-code-patch-coordinator Build done. Details
2023-04-04 15:14:09 +02:00
Jeroen Bakker 170189ce13 Revert "Replace ` by ' to check if HD5500 is failing on those."
This reverts commit dcd285388e.
2023-04-04 15:11:41 +02:00
Jeroen Bakker dcd285388e Replace ` by ' to check if HD5500 is failing on those.
buildbot/vexp-code-patch-coordinator Build done. Details
2023-04-04 15:08:36 +02:00
Jeroen Bakker 493369bce6 Formatting. 2023-04-04 15:07:24 +02:00
Jeroen Bakker c61b3fc7bf Fix macros in legacy eevee.
buildbot/vexp-code-patch-coordinator Build done. Details
2023-04-04 13:51:25 +02:00
Jeroen Bakker 39d83d3eb7 Fix 106278: HD5500 Crashes When Switching to Eevee.
buildbot/vexp-code-patch-coordinator Build done. Details
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.
2023-04-04 10:36:25 +02:00