Skip to content

Commit

Permalink
Add compute_size
Browse files Browse the repository at this point in the history
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
  • Loading branch information
sagudev committed Oct 27, 2024
1 parent 8e5ff49 commit 16bfeea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1829,6 +1829,10 @@ pub fn bytes_per_type(pixel_type: u32) -> usize {
}
}

pub fn compute_size(width: i32, height: i32, format: u32, pixel_type: u32) -> usize {
width as usize * height as usize * components_per_format(format) * bytes_per_type(pixel_type)
}

pub const ACTIVE_ATOMIC_COUNTER_BUFFERS: u32 = 0x92D9;

pub const ACTIVE_ATTRIBUTES: u32 = 0x8B89;
Expand Down

0 comments on commit 16bfeea

Please sign in to comment.