Hi Brecht<div>(and anyone that can help),<div><br></div><div>I&#39;m trying to help Jens to pinpoint what is wrong with the combo: OSX + ATI + OpenCL.</div><div>There are at least three problems there:</div><div><br></div>

<div>(1) camera is always in Z 0.</div><div><a href="http://www.pasteall.org/blend/10154">http://www.pasteall.org/blend/10154</a></div><div>(CPU matches blender camera, GPU matches blender camera but with Z = 0)</div><div>

<br></div><div>(2) the viewport &#39;crashes&#39; for a lot of combinations of widthxheight@tiles.</div><div>Sometimes reducing the tiles fixes it, sometimes changing the width, sometimes the height, sometimes praying ... ;)</div>

<div><a href="http://www.pasteall.org/pic/show.php?id=22109">http://www.pasteall.org/pic/show.php?id=22109</a></div><div><br></div><div>(3) full shader may not be working [I&#39;m not sure about this, but let&#39;s assuming the &quot;AO&quot; render is good for now]</div>

<div><br></div><div>To test the (1) camera Z I tried your suggestion:</div><div>---------------------------------------------------------------------</div><div>(in kernel_path.h):</div><div>L = make_float4(ray.D.x, ray.D.y, ray.D.z, 1.0f);</div>

<div><br></div><div>This produces the same result in CPU and OCL (and seems correct):</div><div><a href="http://www.pasteall.org/pic/show.php?id=22108">http://www.pasteall.org/pic/show.php?id=22108</a></div><div><br></div>

<div>All matrixes seem indeed correct, so I could use some direction on where to look next.</div><div><br></div><div><br></div><div>To pinpoint the (2) I was trying to play with the tile code (tile.cpp).</div><div>----------------------------------------------------------------------------------------------</div>

<div>In some cases I have a &quot;broken viewport&quot; (see image above). For example, a 820x772@818 image renders in the 3dview fine, while a 820x772@820 fails.</div><div>By only changing the tile size I go from a good to a bad image. (Which in this case changes a lot given that the former makes 2 tiles (2x410x772) while the latter makes one (1x820x772)).</div>

<div><br></div><div>With the same file, same windows size, same everything, I apply this patch:</div><div>(in tile.cpp)</div><div>state.tiles.push_back(Tile(0, 0, image_w, image_h));</div><div>/* ... comment all the following lines until: state.width</div>

<div><br></div></div><div>Now both 818 and 820 tile sizes break the viewport. It&#39;s a shame that they both break, but at least is consistent. Now, what does it tell us?</div><div><br></div><div><br></div><div>I remember running into a strange bug between ATIxNVIDIA (on windows back then) that may be related. In short ATI would never consider the 0,0 defined by the glViewport as the 0,0 for glCopy and SubCopy operations: <a href="http://projects.blender.org/tracker/?func=detail&amp;aid=18004&amp;group_id=9&amp;atid=127">http://projects.blender.org/tracker/?func=detail&amp;aid=18004&amp;group_id=9&amp;atid=127</a> It may be related.</div>

<div><br></div><div>If anyone has any suggestions on what to look further, we are short in ideas here,</div><div>Thanks,</div><div>Dalai</div>