Can't bake textures with GPU on Macbook Pro (AMD Card)
Open, IncompletePublic

Description

System Information
OSX EI Capitan 10.11.4 (15E65), AMD Radeon R9 M370X 2048 MB

Blender Version
Broken: 2.77a abf6f08

Short description of error

When using 'GPU Compute' (in Cycles Render), the 'Render' and 'Preview' worked correctly, but when I bake the combined texture, the progress bar always stay 0% and the whole compute gets totally frozen. (Then I can only force restart it)

I also have tried baking some other kinds of texture:

Diffuse: same problem
Shadow: same problem
AO: No problem, worked correctly.

Exact steps for others to reproduce the error

Just create a simple test scene in Blender (with Cycles Render):

  1. create a ground (plane), a light ( a plane with Emission material) and a cube in the scene. Make the cube locates on the ground.
  2. Give the cube a diffuse material, (whatever color you like)
  3. Open an 'Image Editor', and create a new image (1024x1024), whatever name you like.
  4. Open a Node Editor for the cube material, create a new 'Image Texture' node, and make it choose the image we just created.
  5. With the node selected (and also the cube selected in the scene), choose 'Combined' in the 'Bake' section of the 'Render' Tab, when click the 'Bake' button, the problem will happen.

Details

Type
Bug
Sergey Sharybin (sergey) lowered the priority of this task from "Normal" to "Incomplete".Jun 1 2016, 8:57 AM

Does this still happen with latest builds from https://builder.blender.org/download/ ?

If so, are there any messages printed to the console? It also worth running Blender with --debug-cycles command line argument to make prints much more verbose to see where exactly things stuck.

Hi Sergey,
I have tested the latest build you mentioned (Hash: d852715), but the problem is still there.

Here are the console messages:

[Part 1/2]:

zhangzhengxis-MacBook-Pro:blender-2.77.0-git20160601.d852715-x86_64 zhangzhengxi$ /Applications/blender-2.77.0-git20160601.d852715-x86_64/blender.app/Contents/MacOS/blender --debug-cycles
Read new prefs: /Users/zhangzhengxi/Library/Application Support/Blender/2.77/config/userpref.blend
found bundled python: /Applications/blender-2.77.0-git20160601.d852715-x86_64/blender.app/Contents/MacOS/../Resources/2.77/python
I0601 15:43:53.642555 1973223424 blender_python.cpp:185] Debug flags initialized to:
CPU flags:

AVX2   : True
AVX    : True
SSE4.1 : True
SSE3   : True
SSE2   : True

CUDA flags:
Adaptive Compile: False
OpenCL flags:

Device type : ALL
Kernel type : DEFAULT
Debug       : False

read blend: /Users/zhangzhengxi/Work/Models/scene1/scene1-cycle.blend
I0601 15:43:58.288323 1973223424 device_cuda.cpp:1308] CUEW initialization failed: Error opening the library
I0601 15:43:58.289254 1973223424 device_opencl.cpp:3272] CLEW initialization succeeded.
I0601 15:43:58.289528 1973223424 device_opencl.cpp:278] Enumerating devices for platform Apple.
I0601 15:43:58.289624 1973223424 device_opencl.cpp:346] Ignoring device Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz, not officially supported yet.
I0601 15:43:58.289633 1973223424 device_opencl.cpp:338] Adding new device Iris Pro.
I0601 15:43:58.289639 1973223424 device_opencl.cpp:338] Adding new device AMD Radeon R9 M370X Compute Engine.

[Restored Jun 1, 2016, 4:10:07 PM]

Last login: Wed Jun 1 16:10:05 on console

[Part 2/2]:
http://i.imgur.com/Fl1UIri.jpg

Please notice that since the computer got totally frozen when this problem happened, I can't directly copy and paste the console messages at that moment.
The above [Part 1/2] are what restored in the Terminal after the computer restart.
The [Part 2/2] is the moment about 20 minutes after I clicking the 'Bake' button. You can see the time on the photo shows 3:44pm, but the real time I took this photo was about 4:09pm. (Because the compute got frozen after i clicking the 'Bake' )

Sergey Sharybin (sergey) raised the priority of this task from "Incomplete" to "Normal".Jun 1 2016, 12:07 PM

Ok, so it still happens. Will try to reproduce here on mac in the studio. At the meantime, worth sharing .blend which you used. Even if it's trivial, so to be 100% sure we're configuring everything in same exact way.

There is no solution yet? Am i the only one waiting?

I have the same Mac model and the same freeze, apparently baking causes the GPU to hang. In my case, after ~30 seconds OSX detects the freeze and then proceeds to restart the GPU and kill Blender.

Not sure if it helps, but here's the GPU crash file generated by OSX:

And the application crash:

Aaron Carlisle (Blendify) lowered the priority of this task from "Normal" to "Incomplete".Mon, Apr 17, 6:22 AM

please try a build from builder.blender.org/download