From e846d78d206414fe0fb2a17e706ed186ee121a5e Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 18 Dec 2023 14:24:31 +0800 Subject: [PATCH] Expand prelude --- src/driver/shader.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/driver/shader.rs b/src/driver/shader.rs index 3c56840..6917395 100644 --- a/src/driver/shader.rs +++ b/src/driver/shader.rs @@ -7,8 +7,10 @@ use { log::{debug, error, trace, warn}, ordered_float::OrderedFloat, spirq::{ - prelude::*, - ty::ScalarType, + entry_point::EntryPoint, + ReflectConfig, + ty::{DescriptorType, ScalarType, Type}, + var::Variable, }, std::{ collections::{BTreeMap, HashMap}, @@ -981,14 +983,18 @@ impl Shader { 16 => vk::Format::R32G32B32A32_SFLOAT, _ => unimplemented!("byte_len {byte_len}"), }, - ScalarType::Integer { is_signed: true, .. } => match byte_len { + ScalarType::Integer { + is_signed: true, .. + } => match byte_len { 4 => vk::Format::R32_SINT, 8 => vk::Format::R32G32_SINT, 12 => vk::Format::R32G32B32_SINT, 16 => vk::Format::R32G32B32A32_SINT, _ => unimplemented!("byte_len {byte_len}"), }, - ScalarType::Integer { is_signed: false, ..} => match byte_len { + ScalarType::Integer { + is_signed: false, .. + } => match byte_len { 4 => vk::Format::R32_UINT, 8 => vk::Format::R32G32_UINT, 12 => vk::Format::R32G32B32_UINT,