GPU: upload_buf keeps its own doc comment

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bflatastic
2026-10-16 17:33:50 +07:00
co-authored by Claude Opus 5.5
parent 77a8d6ae73
commit 45eacf1b17
+2 -2
View File
@@ -917,14 +917,14 @@ impl GpuContext {
Some(g)
}
/// Upload a (layer cache) buffer, reusing the texture while the same `Arc` is alive: static
/// layers upload once, not every frame.
/// Entries in the layer upload cache.
#[cfg(test)]
pub(crate) fn upload_entries(&self) -> usize {
self.uploads.lock().map(|u| u.map.len()).unwrap_or_default()
}
/// Upload a (layer cache) buffer, reusing the texture while the same `Arc` is alive: static
/// layers upload once, not every frame.
pub(crate) fn upload_buf(&self, buf: &Arc<Buf>) -> Option<GpuImage> {
let key = Arc::as_ptr(buf) as usize;
if let Ok(mut u) = self.uploads.lock() {