dep: update glslang
This commit is contained in:
parent
7c03a7e3fe
commit
742a1c8658
6
Cargo.lock
generated
6
Cargo.lock
generated
|
@ -1151,14 +1151,14 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "glslang"
|
||||
version = "0.5.3"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6e058f69c0b36dc2ce7e5243f440d186ae65ab7aa9e76cd4c5b953ea4b43286d"
|
||||
checksum = "ca195de172c94a69ab142424542f421cf8f7f14555ebbd82c6e8089a8cb318f7"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"glslang-sys",
|
||||
"once_cell",
|
||||
"rustc-hash 2.0.0",
|
||||
"smartstring",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ keywords = ["shader", "retroarch", "SPIR-V"]
|
|||
description = "RetroArch shaders for all."
|
||||
|
||||
[dependencies]
|
||||
glslang = "0.5"
|
||||
glslang = "0.6.0"
|
||||
bytemuck = "1.13.0"
|
||||
|
||||
thiserror = "1.0.37"
|
||||
|
|
|
@ -29,11 +29,17 @@ pub(crate) fn compile_spirv(source: &ShaderSource) -> Result<SpirvCompilation, S
|
|||
};
|
||||
|
||||
let vertex = glslang::ShaderSource::from(source.vertex.as_str());
|
||||
let vertex = ShaderInput::new(&vertex, glslang::ShaderStage::Vertex, &options, None)?;
|
||||
let vertex = ShaderInput::new(&vertex, glslang::ShaderStage::Vertex, &options, None, None)?;
|
||||
let vertex = compiler.create_shader(vertex)?;
|
||||
|
||||
let fragment = glslang::ShaderSource::from(source.fragment.as_str());
|
||||
let fragment = ShaderInput::new(&fragment, glslang::ShaderStage::Fragment, &options, None)?;
|
||||
let fragment = ShaderInput::new(
|
||||
&fragment,
|
||||
glslang::ShaderStage::Fragment,
|
||||
&options,
|
||||
None,
|
||||
None,
|
||||
)?;
|
||||
let fragment = compiler.create_shader(fragment)?;
|
||||
|
||||
let vertex = vertex.compile()?;
|
||||
|
|
|
@ -5,8 +5,8 @@ use std::marker::PhantomData;
|
|||
use image::error::{LimitError, LimitErrorKind};
|
||||
use image::DynamicImage;
|
||||
use librashader_pack::{TextureBuffer, TextureData};
|
||||
use std::path::Path;
|
||||
use librashader_presets::TextureMeta;
|
||||
use std::path::Path;
|
||||
|
||||
/// An uncompressed raw image ready to upload to GPU buffers.
|
||||
pub struct Image<P: PixelFormat = RGBA8> {
|
||||
|
@ -122,10 +122,10 @@ pub struct LoadedTexture<P: PixelFormat = RGBA8> {
|
|||
/// The loaded image data
|
||||
pub image: Image<P>,
|
||||
/// Meta information about the texture
|
||||
pub meta: TextureMeta
|
||||
pub meta: TextureMeta,
|
||||
}
|
||||
|
||||
impl <P: PixelFormat> LoadedTexture<P> {
|
||||
impl<P: PixelFormat> LoadedTexture<P> {
|
||||
/// Load the texture with the given UV direction and subpixel ordering.
|
||||
pub fn from_texture(texture: TextureData, direction: UVDirection) -> Result<Self, ImageError> {
|
||||
Ok(LoadedTexture {
|
||||
|
@ -135,7 +135,6 @@ impl <P: PixelFormat> LoadedTexture<P> {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// load-bearing #[inline(always)], without it llvm will not vectorize.
|
||||
#[inline(always)]
|
||||
fn swizzle_pixels(pixels: &mut Vec<u8>, swizzle: &'static [usize; 32]) {
|
||||
|
|
Loading…
Reference in a new issue