You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go's GC doesn't recognize allocated memory for GPU. For example, an object handling a GPU texture (*ebiten.Image), and GC recognizes the memory usage of the object as only a struct size. Thus, image objects don't pressure GC, and this tends to cause memory bloat on GPU, even though too many (no-longer-referred) images are created. This is a serious problem especially in some devices that have unified memory for CPU and GPU.
At least, we want a way to know texture memory usages. Let's add an API to DebugInfo
typeDebugInfostruct {
...// TotalGPUImageMemoryUsageInBytes is the total image memory usage for GPU in bytes.// TotalGPUImageMemoryUsageInBytes is approximately the total memory usage for GPU.TotalGPUImageMemoryUsageInBytesint64
}
Operating System
What feature would you like to be added?
Go's GC doesn't recognize allocated memory for GPU. For example, an object handling a GPU texture (
*ebiten.Image
), and GC recognizes the memory usage of the object as only a struct size. Thus, image objects don't pressure GC, and this tends to cause memory bloat on GPU, even though too many (no-longer-referred) images are created. This is a serious problem especially in some devices that have unified memory for CPU and GPU.At least, we want a way to know texture memory usages. Let's add an API to
DebugInfo
/CC @wasedaigo
Why is this needed?
In order to get hints to improve memory usages. Especially this matters in some special devices that have unified memory for CPU and GPU.
The text was updated successfully, but these errors were encountered: