summaryrefslogtreecommitdiffstats
path: root/src/gpu.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu.rs')
-rw-r--r--src/gpu.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gpu.rs b/src/gpu.rs
index edcc073..ab15356 100644
--- a/src/gpu.rs
+++ b/src/gpu.rs
@@ -176,16 +176,16 @@ pub fn destroy_fence(client: &VkClient, fence: vk::Fence) {
}
/// Refresh all texture inputs from TSV shared images.
-/// Handles format detection and texture recreation internally.
+/// Rebuilds the bind group if any texture was resized. Returns true if rebind occurred.
pub fn refresh_textures(
- pools: &mut crate::uniform::ResourcePools,
+ cache: &mut crate::uniform::UniformCache,
device: &wgpu::Device,
client: &mut VkClient,
fence: vk::Fence,
) -> bool {
let mut needs_rebind = false;
- for texture in pools.textures_mut() {
+ for texture in cache.textures_mut() {
let tsv_name = match texture.tsv_name() {
Some(n) => n.to_string(),
None => continue,
@@ -233,6 +233,10 @@ pub fn refresh_textures(
}
}
+ if needs_rebind {
+ cache.rebuild_bind_group(device);
+ }
+
needs_rebind
}