我學習Metal
現在,並試圖瞭解以下行:爲line 1
金屬 - 線程和線程組
let threadGroupCount = MTLSizeMake(8, 8, 1) ///line 1
let threadGroups = MTLSizeMake(drawable.texture.width/threadGroupCount.width, drawable.texture.height/threadGroupCount.height, 1) ///line 2
command_encoder.dispatchThreadgroups(threadGroups, threadsPerThreadgroup: threadGroupCount) ///line 3
,什麼是3點的整數代表什麼?我的猜測是分配要在過程中使用的線程數量,但哪個是哪個?
line 1
和'line 2'之間有什麼不同?我的猜測再次是線程和線程組之間的差異。但我不確定什麼是根本區別,什麼時候使用什麼。