Posts

Post not yet marked as solved
0 Replies
932 Views
Clang 13 documentation https://clang.llvm.org/docs/ReleaseNotes.html indicates support of [[clang::musttail]] attributes to enforce TCO. Any attempt to use this in xcode13 is is failing on the attribute: warning: unknown attribute 'musttail' ignored [-Wunknown-attributes] [[clang::musttail]] Can I get a confirmation this is actually supported? Clang version in xCode13b4 is reported as: Apple clang version 13.0.0 (clang-1300.0.27.3)
Posted
by jrb.
Last updated
.
Post not yet marked as solved
5 Replies
1.2k Views
Let my iMacPro update itself to macOS 10.13.4.Now none of the instrument tools work for iOS. E.g. using Time Profiler -- tool thinks it's working, app runs, but nothing but a ticking timeline and zero reported stats. MetalSystemTrace does the same. Have tried devices iOS9 -> iOS11 and iPhone6 -> iPhoneX. I'm completely dead in the water.I haven't bothered putting in a Radar, as "Tools don't work" doesn't get much attention.Hints on how to shake this loose? How do you force xCode to do whatever setup it performs when you first launch a new version?cheers - j
Posted
by jrb.
Last updated
.
Post not yet marked as solved
1 Replies
700 Views
What is the current state-of-the-art for diagnosing Metal command buffer failure? We've got a case that *only* happens on iPhoneX.Querying the error results, all we get are the undocumented"Execution of the command buffer was aborted due to an error during execution. Discarded (victim of GPU error/recovery) (IOAF code 5)"Which isn't very actionable.Cheers - j
Posted
by jrb.
Last updated
.
Post not yet marked as solved
6 Replies
1.7k Views
What are the rules for the alignment of structs within structs in Metal? I cannot find it documented anywhere in the shading language specification. And do structs have any minimum size & alignment constraints? (I need to generate memory layouts before the shaders are compiled, so using the reflection API is not an option).e.g. I have the followingstruct S0{ float4x4 A; float4x4 B; float3x3 C; float4 D;};struct M0{ float A;};struct N0{ float A;};struct Uniforms{ N0 nor0; M0 mut0; S0 su;};What would the expected alignments be? Should I assume they follow standard C++ behaviour? e.g. offsetof(Uniforms, N0) == 0offsetof(Uniforms, M0) == 4offsetof(Uniforms, S0) == 16Thx - j
Posted
by jrb.
Last updated
.
Post not yet marked as solved
0 Replies
520 Views
"The scissor rectangle must lie entirely within the current attachment. Fragments that lie outside the scissor rectangle are discarded.The default value is (0, 0, width, height), where width and height are the x and y dimensions of the attachment, respectively."I have an attachment of 1333 x 750. I try to set a scissor ofscissor const MTLScissorRect & 0x000000016e9aa2a8x NSUInteger 0y NSUInteger 0width NSUInteger 1333height NSUInteger 750The validation layer fails with:/BuildRoot/Library/Caches/com.apple.xbs/Sources/Metal/Metal-85.83/ToolsLayers/Debug/MTLDebugRenderCommandEncoder.mm:2029: failed assertion `(rect.y(0) + rect.height(750))(750) must be <= 749'Either the validation or the docs are incorrect - which is it?
Posted
by jrb.
Last updated
.