Skip to content

Commit

Permalink
Compare threadgroups
Browse files Browse the repository at this point in the history
  • Loading branch information
gadirom committed Jul 26, 2022
1 parent c77484e commit 802816f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/MetalBuilder/MetalPasses/ComputePass.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ final class ComputePass: MetalPass{
size = MTLSize(width: buf.count, height: 1, depth: 1)
}
let w = computePiplineState.threadExecutionWidth
let h = min(size.height, computePiplineState.maxTotalThreadsPerThreadgroup)
let h = min(size.height, computePiplineState.maxTotalThreadsPerThreadgroup / w)

threadsPerThreadGroup = MTLSize(width: w, height: h, depth: 1)
threadGroupsPerGrid = MTLSize(
Expand Down

0 comments on commit 802816f

Please sign in to comment.