Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for very large meshes & plots by always picking the largest available GPU buffer size #5053

Merged
merged 2 commits into from
Feb 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions crates/re_renderer/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ pub struct DeviceCaps {
/// Since this has a direct effect on the image sizes & screen resolution a user can use, we always pick the highest possible.
pub max_texture_dimension2d: u32,

/// Maximum buffer size in bytes.
///
/// Since this has a direct effect on how much data a user can wrangle on the gpu, we always pick the highest possible.
pub max_buffer_size: u64,

/// Wgpu backend type.
///
/// Prefer using `tier` and other properties of this struct for distinguishing between abilities.
Expand Down Expand Up @@ -132,6 +137,7 @@ impl DeviceCaps {
Self {
tier,
max_texture_dimension2d: adapter.limits().max_texture_dimension_2d,
max_buffer_size: adapter.limits().max_buffer_size,
backend_type,
}
}
Expand All @@ -140,6 +146,7 @@ impl DeviceCaps {
pub fn limits(&self) -> wgpu::Limits {
wgpu::Limits {
max_texture_dimension_2d: self.max_texture_dimension2d,
max_buffer_size: self.max_buffer_size,
..wgpu::Limits::downlevel_webgl2_defaults()
}
}
Expand Down
Loading