Fix 107322: MacOS/ATI Crash When Starting Eevee #109358
No reviewers
Labels
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
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
Viewport & EEVEE
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#109358
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Jeroen-Bakker/blender:macos-raytrace-infinitive-loop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When using ATI GPU on MacOS/Metal compilation of Eevee shaders crashed due to an infinitive
loop in the compiler backend. This change fixes this by using a more reliable loop that
ensures that the loop will be finite.
Thanks for the Apple developers working on finding the root cause and Michael Parking White
for the initial fix.
Fixes #107322
Fixes #107451
@blender-bot build
Some more explicit casts are needed.
@ -119,3 +119,3 @@
float prev_time, time = 0.0;
for (float iter = 0.0; time < ssray.max_time && iter < sample_count; iter++) {
for (int iter = 0; time < ssray.max_time && iter < sample_count; iter++) {
sample_count
needs to be declared as int. Better do the conversion out of the loopconst int i_sample_count = int(sample_count)
@ -122,3 +121,4 @@
for (int iter = 0; time < ssray.max_time && iter < sample_count; iter++) {
prev_time = time;
/* Gives us good precision at center and ensure we cross at least one pixel per iteration. */
time = 1.0 + iter + sqr((iter + noise) / sample_count) * ssray.max_time;
iter
needs to be explicitly converted to float here.@ -141,2 +140,3 @@
for (float iter = 1.0; !hit && (time < ssray.max_time) && (iter < max_steps); iter++) {
const int max_steps = 255;
for (int iter = 1; !hit && (time < ssray.max_time) && (iter < max_steps); iter++) {
float stride = 1.0 + iter * params.trace_quality;
iter
needs to be explicitly converted to float here.@ -214,2 +213,3 @@
for (float iter = 1.0; !hit && (time < ssray.max_time) && (iter < max_steps); iter++) {
const int max_steps = 255;
for (int iter = 1; !hit && (time < ssray.max_time) && (iter < max_steps); iter++) {
float stride = 1.0 + iter * params.trace_quality;
iter
needs to be explicitly converted to float here.@ -118,7 +118,7 @@ float search_horizon(vec3 vI,
}
float prev_time, time = 0.0;
for (float iter = 0.0; time < ssray.max_time && iter < sample_count; iter++) {
My apologies @Jeroen-Bakker , after testing the patch locally, one omission was that we also need to tag the function with no inline, though this should only be done for AMD platforms on Metal. Without this, the crash can still occur for certain material variants it appears.
I hope this is okay to include.
raytrace_lib.glsl
and
@blender-bot build
Fine to land this during Bcon4.
This PR has been tested, feedback has been addressed. We want to land this in 3.6.0 as Clement isn't available ATM we checked internally if this was ok.
Suggested comment: