Page MenuHome

Cycles: Allow Intel GPUs under Metal
ClosedPublic

Authored by Morteza Mostajab (mmostajab) on Oct 14 2022, 5:29 PM.

Details

Summary

Known Issues:

  • Command buffer failures when using binary archives (binary archives is disabled for Intel GPUs as a workaround)
  • Wrong texture sampler being applied (to be addressed in the future)

Ref T92212

Diff Detail

Repository
rB Blender
Branch
master
Build Status
Buildable 24261
Build 24261: arc lint + arc unit

Event Timeline

Morteza Mostajab (mmostajab) requested review of this revision.Oct 14 2022, 5:29 PM
Morteza Mostajab (mmostajab) created this revision.

Thanks.

I see there is a workaround for the binary archives in the patch, But what is the impact of the texture sampler issue for users?

I see there is a workaround for the binary archives in the patch, But what is the impact of the texture sampler issue for users?

Impact of texture sampler issue on the final image is not visible, but when comes to comparing images pixel-by-pixel it is easily detected. Checked out the map, and shading on the chair below map.

Classroom rendered on Intel UHD 630:

Classroom rendered on Apple M1 Max:

Classroom rendered on AMD Radeon 5500M:

We have an Intel specific workaround for it, but it is not very clean.

Thanks, looks good to commit then.

But can you clarify what exactly is different, is it not respecting the texture interpolation mode (nearest, bilinear, bicubic)?

This revision is now accepted and ready to land.Oct 17 2022, 12:03 PM

Thanks, looks good to commit then.

But can you clarify what exactly is different, is it not respecting the texture interpolation mode (nearest, bilinear, bicubic)?

There is a compiler bug on Intel, causing the sampler index 0 (sid=0) always to be taken in ccl_gpu_tex_object_read_2D and ccl_gpu_tex_object_read_3D. We have a fix for it that I will commit.

  • Cycles: Workaround for intel MSL compiler issue that picks sampler

index 0, no matter what is the sid value

This caused a build error on the buildbot:
https://builder.blender.org/admin/#/builders/31/builds/7069/steps/6/logs/stdio

Is this feature only available in the macOS 13 beta SDK?
https://developer.apple.com/documentation/metal/mtllibraryoptimizationlevel

Upgrading our buildbot machines would wait at least until macOS 13 is out of beta.

Yes, that feature is only supported by macOS 13 SDK. But we are guarding it with if(@available(macos 13.0, *)). I wonder why it gets compiled on older SDKs. I will try to check it.

Is this feature only available in the macOS 13 beta SDK?
https://developer.apple.com/documentation/metal/mtllibraryoptimizationlevel

Upgrading our buildbot machines would wait at least until macOS 13 is out of beta.

You should be able to install the Xcode 14 beta on machine running macOS < 13.

I guess Xcode 14.1 stable will be released soon now that macOS 13 is out, I'll wait a bit for that.

We upgraded all the buildbot workers to Xcode 14.1 now, so the next daily build should have Intel GPU rendering support.