stuff
This commit is contained in:
@@ -2,6 +2,7 @@ use std::sync::Arc;
|
||||
use std::time::SystemTime;
|
||||
|
||||
use cgmath::{Matrix4, SquareMatrix};
|
||||
use dds::get_block_size;
|
||||
use vulkano::{buffer::{BufferUsage, CpuAccessibleBuffer}, command_buffer::{CommandBuffer, SubpassContents}, image::{ImageLayout, ImageUsage, MipmapsCount, immutable::SubImage}};
|
||||
use vulkano::command_buffer::{AutoCommandBuffer, AutoCommandBufferBuilder, DynamicState};
|
||||
use vulkano::descriptor::DescriptorSet;
|
||||
@@ -467,11 +468,7 @@ impl VulkanRenderer {
|
||||
|
||||
let mut offset = 0;
|
||||
|
||||
let block_bytes = match format {
|
||||
Format::BC1_RGBUnormBlock => 8,
|
||||
Format::BC5UnormBlock => 16,
|
||||
f => panic!(format!("Unknown texture format {:?}!", f))
|
||||
};
|
||||
let block_bytes = get_block_size(format).expect(&format!("Unknown texture format {:?}!", format));
|
||||
|
||||
for i in 0..image_view.mipmap_levels() {
|
||||
let mip_size = dimensions.to_image_dimensions().mipmap_dimensions(i).unwrap().width_height_depth();
|
||||
|
||||
Reference in New Issue
Block a user