Posts

Post not yet marked as solved
3 Replies
1k Views
I updated my MBP 16" into macOS 12 beta and downloaded Xcode 13 & hybrid rendering sample. (https://developer.apple.com/documentation/metal/rendering_reflections_in_real_time_using_ray-tracing?language=objc) I run the sample but Xcode tells me GPU timeout has been occurred. 2021-06-10 01:50:53.303115+0900 HybridRendering[2259:105212] Execution of the command buffer was aborted due to an error during execution. Caused GPU Timeout Error (00000002:kIOAccelCommandBufferCallbackErrorTimeout) 2021-06-10 01:50:53.303324+0900 HybridRendering[2259:105212] Execution of the command buffer was aborted due to an error during execution. Caused GPU Timeout Error (00000002:kIOAccelCommandBufferCallbackErrorTimeout) Error Domain=MTLCommandBufferErrorDomain Code=2 "Caused GPU Timeout Error (00000002:kIOAccelCommandBufferCallbackErrorTimeout)" UserInfo={NSLocalizedDescription=Caused GPU Timeout Error (00000002:kIOAccelCommandBufferCallbackErrorTimeout), MTLCommandBufferEncoderInfoErrorKey=( "<errorState: MTLCommandEncoderErrorStateCompleted, label: ThinGBufferRenderEncoder, debugSignposts: (null)>", "<errorState: MTLCommandEncoderErrorStateAffected, label: RaytracedReflectionsComputeEncoder, debugSignposts: (null)>", "<errorState: MTLCommandEncoderErrorStateAffected, label: (null), debugSignposts: (null)>", "<errorState: MTLCommandEncoderErrorStatePending, label: ForwardPassRenderEncoder, debugSignposts: (null)>" )} It seems the intersection code in AAPLShaders.metal occurs the timeout error... ... auto intersection = inter.intersect( r, accelerationStructure, 0xFF ); ... I have troubles on Radeon Pro 5500M however Intel GPU and M1 MacBook Air doesn't. Is there any workarounds to run on Radeon? Thanks!
Posted
by Prin_E.
Last updated
.
Post not yet marked as solved
0 Replies
474 Views
I’m using constant address space MTLBuffer to implement instanced rendering using -[MTLRenderCommandEncoder drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:]. When I tested on the NVIDIA GPU (Geforce GT 650M) the buffer’s contents was truncated over 64KB in the shader program. However the content was not truncated on AMD or Intel GPUs. (I tested on Intel HD Graphics 4000, Intel UHD 630, Radeon Pro 5500M) I found a specification on Metal Feature Set Tables document “Maximum function memory allocation for a buffer in the constant address space” is 64KB in GPUFamilyMac1/2. It looks like why the buffer is truncated on NVIDIA GPU. When I target my app to Intel Mac, should I always limit constant address space buffer size maximum to 64KB even if running on AMD or Intel GPU? When I use device address space instead of constant address space, Is there any performance difference between constant and device address space? (I heard that there's constant buffer cache on DirectX GPUs) Thanks!
Posted
by Prin_E.
Last updated
.
Post marked as solved
2 Replies
606 Views
macOS 11.0.1, Xcode 12.2(12B45b) Hi, I downloaded a "Deferred lighting" sample (https://developer.apple.com/documentation/metal/rendering_a_scene_with_deferred_lighting_in_objective-c?language=objc) and I encountered a problem Signing for "MSL20Shaders" requires a development team. Select a development team in the Signing & Capabilities editor. I set developer team on DeferredLighting-macOS/iOS targets but I couldn't find singing & capabilities option on MSL20/23Shaders. I think these don't need signing because there are metal shader library. Let me know if anything is missing 😭
Posted
by Prin_E.
Last updated
.
Post not yet marked as solved
1 Replies
629 Views
I have encountered a problem sampling the array of depth2d like this code.fragment half4 shadow_preview_frag(pv_out v [[stage_in]], array&lt;depth2d,2&gt; shadowMap [[texture(0)]]) { half4 color = half4(1.0, 1.0, 1.0, 1.0); float depth = shadowMap[0].sample(s, v.uv); color = color * depth; color.a = 1.0; return color; }The depth textures are shadow map. (depth-only pass) I use array of depth textures in the deferred lighting.When I run the application on Intel UHD Graphics 630, I get an weird color output.The black background appears, some kind of afterimages and noises appears on the rendered area.Intel HD Graphics 4000, Geforce GT 650M, Radeon Pro 5500M works very fine.Does anyone experience the similar problem? I tried to find the solution for few days but I couldn't figure it out :-(MacBook Pro 16 inch, Core i9 2.4GHz, Intel UHD Graphics 630/Radeon Pro 5500M, macOS 10.15.2, Xcode 11.3.1
Posted
by Prin_E.
Last updated
.