MCPcopy Create free account
hub / github.com/cogentcore/core / Destroy

Method Destroy

vgpu/system.go:109–135  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107}
108
109func (sy *System) Destroy() {
110 for _, ev := range sy.Events {
111 vk.DestroyEvent(sy.Device.Device, ev, nil)
112 }
113 sy.Events = nil
114 for _, sp := range sy.Semaphores {
115 vk.DestroySemaphore(sy.Device.Device, sp, nil)
116 }
117 sy.Semaphores = nil
118 for _, fc := range sy.Fences {
119 vk.DestroyFence(sy.Device.Device, fc, nil)
120 }
121 sy.Fences = nil
122 sy.CmdBuffs = nil
123 for _, pl := range sy.Pipelines {
124 pl.Destroy()
125 }
126 sy.Pipelines = nil
127 sy.CmdPool.Destroy(sy.Device.Device)
128 sy.Mem.Destroy(sy.Device.Device)
129 if sy.Compute {
130 sy.Device.Destroy()
131 } else {
132 sy.Render.Destroy()
133 }
134 sy.GPU = nil
135}
136
137// AddPipeline adds given pipeline
138func (sy *System) AddPipeline(pl *Pipeline) {

Callers 2

mainFunction · 0.95
mainFunction · 0.95

Calls 1

DestroyMethod · 0.65

Tested by

no test coverage detected