Shadow caustics not available on macOS with AMD GPU #104013

Closed
opened 2023-01-19 23:47:04 +01:00 by Andy Kelly · 14 comments

System Information
Operating system: macOS 13.1
Processor: 2.6GHz Intel Core i7
Graphics card: AMD Radeon Pro 5500M 8 GB
Memory: 16GB 2667MHz DDR4

Blender Version
Broken: 3.4.1

Short description of error
Blender/macOS crashes to login screen when enabling smooth shading on an object with "Cast Shadow Caustics" enabled.

Exact steps for others to reproduce the error
Create a scene with:

  • A light with "Shadow Caustics" enabled
  • An object with "Cast Shadow Caustics" enabled and a transmissive material applied
  • An object with "Receive Shadow Caustics" enabled

Set render engine to Cycles and device to GPU compute (crash does not occur with CPU compute).
Switch viewport mode to Rendered.
Select the cast shadow caustics object and enable smooth shading.

macOS will hang before crashing to a login screen.

system.log reports:

sessionlogoutd[4795]: DEAD_PROCESS: 3681 console

Console.app also lists a crash report for WindowServer (example crash report is attached).

Caustics-Crash-on-Shade-Smooth.blend WindowServer-2023-01-19-171731.ips

**System Information** Operating system: macOS 13.1 Processor: 2.6GHz Intel Core i7 Graphics card: AMD Radeon Pro 5500M 8 GB Memory: 16GB 2667MHz DDR4 **Blender Version** Broken: 3.4.1 **Short description of error** Blender/macOS crashes to login screen when enabling smooth shading on an object with "Cast Shadow Caustics" enabled. **Exact steps for others to reproduce the error** Create a scene with: - A light with "Shadow Caustics" enabled - An object with "Cast Shadow Caustics" enabled and a transmissive material applied - An object with "Receive Shadow Caustics" enabled Set render engine to Cycles and device to GPU compute (crash does not occur with CPU compute). Switch viewport mode to Rendered. Select the cast shadow caustics object and enable smooth shading. macOS will hang before crashing to a login screen. system.log reports: sessionlogoutd[4795]: DEAD_PROCESS: 3681 console Console.app also lists a crash report for WindowServer (example crash report is attached). [Caustics-Crash-on-Shade-Smooth.blend](https://archive.blender.org/developer/F14177358/Caustics-Crash-on-Shade-Smooth.blend) [WindowServer-2023-01-19-171731.ips](https://archive.blender.org/developer/F14177365/WindowServer-2023-01-19-171731.ips)
Author

Added subscriber: @andykelly

Added subscriber: @andykelly

Added subscriber: @iss

Added subscriber: @iss

Can't reproduce on
Operating system: macOS-13.0.1-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro 5700 XT OpenGL Engine ATI Technologies Inc. 4.1 ATI-4.9.48

Can't reproduce on Operating system: macOS-13.0.1-x86_64-i386-64bit 64 Bits Graphics card: AMD Radeon Pro 5700 XT OpenGL Engine ATI Technologies Inc. 4.1 ATI-4.9.48
Philipp Oeser removed the
Interest
Render & Cycles
label 2023-02-09 14:04:24 +01:00

Confirm. Same computer, same setup, same crash.

Confirm. Same computer, same setup, same crash.
Member

Hi, can someone check whether crash occurs in 3.5-beta build?: https://builder.blender.org/download/daily/

Hi, can someone check whether crash occurs in 3.5-beta build?: https://builder.blender.org/download/daily/
Pratik Borhade added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-03-15 14:49:33 +01:00
Member

Hi, can someone check whether crash occurs in 3.5-beta build?: https://builder.blender.org/download/daily/

Any updates?

> Hi, can someone check whether crash occurs in 3.5-beta build?: https://builder.blender.org/download/daily/ Any updates?

Hi, can someone check whether crash occurs in 3.5-beta build?: https://builder.blender.org/download/daily/

Any updates?

still nicely crashing

> > Hi, can someone check whether crash occurs in 3.5-beta build?: https://builder.blender.org/download/daily/ > > Any updates? still nicely crashing

CommandBuffer_Failed: cycles_metal_prefix_sum

Hi, can someone check whether crash occurs in 3.5-beta build?: https://builder.blender.org/download/daily/

Any updates?

CommandBuffer_Failed: cycles_metal_prefix_sum > > Hi, can someone check whether crash occurs in 3.5-beta build?: https://builder.blender.org/download/daily/ > > Any updates?
Pratik Borhade added
Status
Needs Triage
and removed
Status
Needs Information from User
labels 2023-04-06 17:25:16 +02:00

Unlike #107605, I can reproduce this in a local build and it has the following call stack:

dispatch_release (@dispatch_release:6)
__121-[_MTLBinaryArchive(MTLBinaryArchiveInternal) newArchiverIdWithFunctionId:descriptor:bitcode:srcArchiverId:functionType:]_block_invoke (@__121-[_MTLBinaryArchive(MTLBinaryArchiveInternal) newArchiverIdWithFunctionId:descriptor:bitcode:srcArchiverId:functionType:]_block_invoke:140)
_dispatch_client_callout (@_dispatch_client_callout:8)
_dispatch_lane_barrier_sync_invoke_and_complete (@_dispatch_lane_barrier_sync_invoke_and_complete:17)
-[_MTLBinaryArchive(MTLBinaryArchiveInternal) newArchiverIdWithFunctionId:descriptor:bitcode:srcArchiverId:functionType:] (@-[_MTLBinaryArchive(MTLBinaryArchiveInternal) newArchiverIdWithFunctionId:descriptor:bitcode:srcArchiverId:functionType:]:50)
-[MTLCompiler addExtraDataToAirntBinaryArchive:functionId:cachedData:] (@-[MTLCompiler addExtraDataToAirntBinaryArchive:functionId:cachedData:]:42)
-[MTLCompiler compileFunctionRequestInternal:frameworkLinking:linkDataSize:reflectionOnly:completionHandler:] (@-[MTLCompiler compileFunctionRequestInternal:frameworkLinking:linkDataSize:reflectionOnly:completionHandler:]:1033)
void AGX::Compiler::compileProgram<AGX::ComputeProgramKey>(AGX::ComputeProgramKey const&, MTLCompileFunctionRequestData*, void (AGCDeserializedReply const&, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, MTLCompilerError, NSString*, unsigned long long) block_pointer) (@void AGX::Compiler::compileProgram<AGX::ComputeProgramKey>(AGX::ComputeProgramKey const&, MTLCompileFunctionRequestData*, void (AGCDeserializedReply const&, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, MTLCompilerError, NSString*, unsigned long long) block_pointer):145)
AGX::UserCommonShaderFactory<AGX::G13::Encoders, AGX::G13::Classes, AGX::G13::ObjClasses>::createComputeProgramVariant(MTLComputePipelineDescriptor*, AGXG13GFamilyDevice*, unsigned long, AGXG13GFamilyBinaryArchive*, NSArray*, AGX::G13::ComputeProgram*, NSObject<OS_dispatch_data>*, bool, void (AGX::G13::ComputeProgramVariant*, NSMutableDictionary*, MTLCompilerError, NSString*) block_pointer) (@AGX::UserCommonShaderFactory<AGX::G13::Encoders, AGX::G13::Classes, AGX::G13::ObjClasses>::createComputeProgramVariant(MTLComputePipelineDescriptor*, AGXG13GFamilyDevice*, unsigned long, AGXG13GFamilyBinaryArchive*, NSArray*, AGX::G13::ComputeProgram*, NSObject<OS_dispatch_data>*, bool, void (AGX::G13::ComputeProgramVariant*, NSMutableDictionary*, MTLCompilerError, NSString*) block_pointer):247)
-[AGXG13GFamilyBinaryArchive addComputePipelineFunctionsWithDescriptor:options:error:] (@-[AGXG13GFamilyBinaryArchive addComputePipelineFunctionsWithDescriptor:options:error:]:185)
ccl::MetalKernelPipeline::compile()::$_2::operator()() const::'lambda'()::operator()() const (/Users/germanocavalcante/blender-git/blender/intern/cycles/device/metal/kernel.mm:708)
ccl::MetalKernelPipeline::compile()::$_2::operator()() const (/Users/germanocavalcante/blender-git/blender/intern/cycles/device/metal/kernel.mm:718)
ccl::MetalKernelPipeline::compile() (/Users/germanocavalcante/blender-git/blender/intern/cycles/device/metal/kernel.mm:769)
ccl::ShaderCache::compile_thread_func(int) (/Users/germanocavalcante/blender-git/blender/intern/cycles/device/metal/kernel.mm:208)
ccl::ShaderCache::load_kernel(ccl::DeviceKernel, ccl::MetalDevice*, ccl::MetalPipelineType)::$_1::operator()() const (/Users/germanocavalcante/blender-git/blender/intern/cycles/device/metal/kernel.mm:301)
decltype(std::__1::forward<ccl::ShaderCache::load_kernel(ccl::DeviceKernel, ccl::MetalDevice*, ccl::MetalPipelineType)::$_1>(fp)()) std::__1::__invoke<ccl::ShaderCache::load_kernel(ccl::DeviceKernel, ccl::MetalDevice*, ccl::MetalPipelineType)::$_1>(ccl::ShaderCache::load_kernel(ccl::DeviceKernel, ccl::MetalDevice*, ccl::MetalPipelineType)::$_1&&) (/Users/germanocavalcante/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/include/c++/v1/type_traits:3694)
void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, ccl::ShaderCache::load_kernel(ccl::DeviceKernel, ccl::MetalDevice*, ccl::MetalPipelineType)::$_1>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, ccl::ShaderCache::load_kernel(ccl::DeviceKernel, ccl::MetalDevice*, ccl::MetalPipelineType)::$_1>&, std::__1::__tuple_indices<>) (/Users/germanocavalcante/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/include/c++/v1/thread:286)
void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, ccl::ShaderCache::load_kernel(ccl::DeviceKernel, ccl::MetalDevice*, ccl::MetalPipelineType)::$_1>>(void*) (/Users/germanocavalcante/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/include/c++/v1/thread:297)
_pthread_start (@_pthread_start:40)

Tested using Metal CPU+GPU


System Information
Operating system: macOS-13.3.1-arm64-arm-64bit 64 Bits
Graphics card: Metal API Apple M1 1.2

Unlike #107605, I can reproduce this in a local build and it has the following call stack: ``` dispatch_release (@dispatch_release:6) __121-[_MTLBinaryArchive(MTLBinaryArchiveInternal) newArchiverIdWithFunctionId:descriptor:bitcode:srcArchiverId:functionType:]_block_invoke (@__121-[_MTLBinaryArchive(MTLBinaryArchiveInternal) newArchiverIdWithFunctionId:descriptor:bitcode:srcArchiverId:functionType:]_block_invoke:140) _dispatch_client_callout (@_dispatch_client_callout:8) _dispatch_lane_barrier_sync_invoke_and_complete (@_dispatch_lane_barrier_sync_invoke_and_complete:17) -[_MTLBinaryArchive(MTLBinaryArchiveInternal) newArchiverIdWithFunctionId:descriptor:bitcode:srcArchiverId:functionType:] (@-[_MTLBinaryArchive(MTLBinaryArchiveInternal) newArchiverIdWithFunctionId:descriptor:bitcode:srcArchiverId:functionType:]:50) -[MTLCompiler addExtraDataToAirntBinaryArchive:functionId:cachedData:] (@-[MTLCompiler addExtraDataToAirntBinaryArchive:functionId:cachedData:]:42) -[MTLCompiler compileFunctionRequestInternal:frameworkLinking:linkDataSize:reflectionOnly:completionHandler:] (@-[MTLCompiler compileFunctionRequestInternal:frameworkLinking:linkDataSize:reflectionOnly:completionHandler:]:1033) void AGX::Compiler::compileProgram<AGX::ComputeProgramKey>(AGX::ComputeProgramKey const&, MTLCompileFunctionRequestData*, void (AGCDeserializedReply const&, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, MTLCompilerError, NSString*, unsigned long long) block_pointer) (@void AGX::Compiler::compileProgram<AGX::ComputeProgramKey>(AGX::ComputeProgramKey const&, MTLCompileFunctionRequestData*, void (AGCDeserializedReply const&, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, MTLCompilerError, NSString*, unsigned long long) block_pointer):145) AGX::UserCommonShaderFactory<AGX::G13::Encoders, AGX::G13::Classes, AGX::G13::ObjClasses>::createComputeProgramVariant(MTLComputePipelineDescriptor*, AGXG13GFamilyDevice*, unsigned long, AGXG13GFamilyBinaryArchive*, NSArray*, AGX::G13::ComputeProgram*, NSObject<OS_dispatch_data>*, bool, void (AGX::G13::ComputeProgramVariant*, NSMutableDictionary*, MTLCompilerError, NSString*) block_pointer) (@AGX::UserCommonShaderFactory<AGX::G13::Encoders, AGX::G13::Classes, AGX::G13::ObjClasses>::createComputeProgramVariant(MTLComputePipelineDescriptor*, AGXG13GFamilyDevice*, unsigned long, AGXG13GFamilyBinaryArchive*, NSArray*, AGX::G13::ComputeProgram*, NSObject<OS_dispatch_data>*, bool, void (AGX::G13::ComputeProgramVariant*, NSMutableDictionary*, MTLCompilerError, NSString*) block_pointer):247) -[AGXG13GFamilyBinaryArchive addComputePipelineFunctionsWithDescriptor:options:error:] (@-[AGXG13GFamilyBinaryArchive addComputePipelineFunctionsWithDescriptor:options:error:]:185) ccl::MetalKernelPipeline::compile()::$_2::operator()() const::'lambda'()::operator()() const (/Users/germanocavalcante/blender-git/blender/intern/cycles/device/metal/kernel.mm:708) ccl::MetalKernelPipeline::compile()::$_2::operator()() const (/Users/germanocavalcante/blender-git/blender/intern/cycles/device/metal/kernel.mm:718) ccl::MetalKernelPipeline::compile() (/Users/germanocavalcante/blender-git/blender/intern/cycles/device/metal/kernel.mm:769) ccl::ShaderCache::compile_thread_func(int) (/Users/germanocavalcante/blender-git/blender/intern/cycles/device/metal/kernel.mm:208) ccl::ShaderCache::load_kernel(ccl::DeviceKernel, ccl::MetalDevice*, ccl::MetalPipelineType)::$_1::operator()() const (/Users/germanocavalcante/blender-git/blender/intern/cycles/device/metal/kernel.mm:301) decltype(std::__1::forward<ccl::ShaderCache::load_kernel(ccl::DeviceKernel, ccl::MetalDevice*, ccl::MetalPipelineType)::$_1>(fp)()) std::__1::__invoke<ccl::ShaderCache::load_kernel(ccl::DeviceKernel, ccl::MetalDevice*, ccl::MetalPipelineType)::$_1>(ccl::ShaderCache::load_kernel(ccl::DeviceKernel, ccl::MetalDevice*, ccl::MetalPipelineType)::$_1&&) (/Users/germanocavalcante/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/include/c++/v1/type_traits:3694) void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, ccl::ShaderCache::load_kernel(ccl::DeviceKernel, ccl::MetalDevice*, ccl::MetalPipelineType)::$_1>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, ccl::ShaderCache::load_kernel(ccl::DeviceKernel, ccl::MetalDevice*, ccl::MetalPipelineType)::$_1>&, std::__1::__tuple_indices<>) (/Users/germanocavalcante/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/include/c++/v1/thread:286) void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, ccl::ShaderCache::load_kernel(ccl::DeviceKernel, ccl::MetalDevice*, ccl::MetalPipelineType)::$_1>>(void*) (/Users/germanocavalcante/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/include/c++/v1/thread:297) _pthread_start (@_pthread_start:40) ``` Tested using Metal CPU+GPU --- **System Information** Operating system: macOS-13.3.1-arm64-arm-64bit 64 Bits Graphics card: Metal API Apple M1 1.2

@Michael-Jones can you check this report?

@Michael-Jones can you check this report?

I will disable shadow caustics on Metal + AMD now, since we are not expecting a fix soon. I expect this is similar to the light tree problem, where compilation ends up taking too long for reasons internal to the compiler, and we which was already disabled.

I will disable shadow caustics on Metal + AMD now, since we are not expecting a fix soon. I expect this is similar to the light tree problem, where compilation ends up taking too long for reasons internal to the compiler, and we which was already disabled.
Brecht Van Lommel added
Severity
Normal
Type
Bug
and removed
Severity
High
Type
Report
labels 2023-06-15 16:19:37 +02:00
Member

Guess this is because shadow caustics are not supported for AMD GPUs yet: https://docs.blender.org/manual/en/latest/render/cycles/gpu_rendering.html#metal-apple-macos
In that case, disabling caustics is the solution for now: 0ab58864f3

@brecht ^

Guess this is because shadow caustics are not supported for AMD GPUs yet: https://docs.blender.org/manual/en/latest/render/cycles/gpu_rendering.html#metal-apple-macos In that case, disabling caustics is the solution for now: 0ab58864f3c5f462b327f4234e08b2df3d5c2c0a @brecht ^
Brecht Van Lommel changed title from Crash to login screen on macOS Ventura when enabling caustics and smooth shading. to Shadow caustics not available on macOS with AMD GPU 2023-10-03 16:34:04 +02:00

@PratikPB2123 not sure what you are replying to exactly, we did disable shadow caustics on AMD. They should work on Apple silicon and it seems they do, but there was some kind of cache invalidation problem in the other issue?

@PratikPB2123 not sure what you are replying to exactly, we did disable shadow caustics on AMD. They should work on Apple silicon and it seems they do, but there was some kind of cache invalidation problem in the other issue?

Closing this as we are no longer planning to fix this. macOS AMD support is end of life and various features will remain missing.

Closing this as we are no longer planning to fix this. macOS AMD support is end of life and various features will remain missing.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2024-06-14 15:33:51 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
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 & 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
Asset System
Module
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & 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
6 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#104013
No description provided.