mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 16:24:24 +00:00
Merge #451
451: Make BindGroupLayoutBinding Serializable r=kvark a=imiklos cc @kvark @zakorgy Co-authored-by: Istvan Miklos <istvan.miklos@h-lab.eu>
This commit is contained in:
commit
881222a947
@ -16,12 +16,15 @@ use crate::{
|
||||
use arrayvec::ArrayVec;
|
||||
use rendy_descriptor::{DescriptorRanges, DescriptorSet};
|
||||
|
||||
#[cfg(feature = "serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::borrow::Borrow;
|
||||
|
||||
pub const MAX_BIND_GROUPS: usize = 4;
|
||||
|
||||
bitflags::bitflags! {
|
||||
#[repr(transparent)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
pub struct ShaderStage: u32 {
|
||||
const NONE = 0;
|
||||
const VERTEX = 1;
|
||||
@ -32,6 +35,7 @@ bitflags::bitflags! {
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
pub enum BindingType {
|
||||
UniformBuffer = 0,
|
||||
StorageBuffer = 1,
|
||||
@ -43,6 +47,7 @@ pub enum BindingType {
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Debug, Hash, PartialEq)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
pub struct BindGroupLayoutBinding {
|
||||
pub binding: u32,
|
||||
pub visibility: ShaderStage,
|
||||
|
@ -276,6 +276,7 @@ impl Default for TextureAspect {
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
pub enum TextureViewDimension {
|
||||
D1,
|
||||
D2,
|
||||
|
Loading…
Reference in New Issue
Block a user