SyncToGPUBuff syncs all modified Value regions from CPU to GPU device memory, for given buff
(bt BuffTypes)
| 289 | |
| 290 | // SyncToGPUBuff syncs all modified Value regions from CPU to GPU device memory, for given buff |
| 291 | func (mm *Memory) SyncToGPUBuff(bt BuffTypes) { |
| 292 | switch bt { |
| 293 | case StorageBuff: |
| 294 | for i, stb := range mm.StorageBuffs { |
| 295 | mods := mm.Vars.ModRegsStorage(i, stb) |
| 296 | if len(mods) > 0 { |
| 297 | mm.TransferRegsToGPU(mods) |
| 298 | } |
| 299 | } |
| 300 | case TextureBuff: |
| 301 | mm.SyncValuesTextures(mm.Buffs[bt]) |
| 302 | default: |
| 303 | mods := mm.Vars.ModRegs(bt) |
| 304 | if len(mods) > 0 { |
| 305 | mm.TransferRegsToGPU(mods) |
| 306 | } |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | // SyncRegionValueName returns memory region for syncing given value |
| 311 | // from GPU device memory to CPU host memory, |
no test coverage detected