InitCompute initializes the System for compute functionality, which creates its own Compute device.
(gp *GPU, name string)
| 84 | // InitCompute initializes the System for compute functionality, |
| 85 | // which creates its own Compute device. |
| 86 | func (sy *System) InitCompute(gp *GPU, name string) error { |
| 87 | sy.GPU = gp |
| 88 | sy.Render.Sys = sy |
| 89 | sy.Name = name |
| 90 | sy.Compute = true |
| 91 | sy.Device.Init(gp, vk.QueueComputeBit) |
| 92 | sy.InitCmd() |
| 93 | sy.Mem.Init(gp, &sy.Device) |
| 94 | sy.NewFence("ComputeWait") // always have this named fence avail for wait |
| 95 | return nil |
| 96 | } |
| 97 | |
| 98 | // InitCmd initializes the command pool and buffer |
| 99 | func (sy *System) InitCmd() { |
no test coverage detected