Bump bitflags to v2 (#44)

This commit is contained in:
daxpedda
2023-06-03 20:42:28 +02:00
committed by GitHub
parent b940b1d71a
commit 777c5c1cdd
7 changed files with 10 additions and 1 deletions

View File

@@ -16,7 +16,7 @@ edition = "2018"
implicit-link = []
[dependencies]
bitflags = "1"
bitflags = "2"
libloading = { version = "0.7", optional = true }
[dependencies.winapi]

View File

@@ -20,6 +20,7 @@ pub enum CmdListType {
}
bitflags! {
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ClearFlags: u32 {
const DEPTH = d3d12::D3D12_CLEAR_FLAG_DEPTH;
const STENCIL = d3d12::D3D12_CLEAR_FLAG_STENCIL;

View File

@@ -21,6 +21,7 @@ pub enum DescriptorHeapType {
}
bitflags! {
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct DescriptorHeapFlags: u32 {
const SHADER_VISIBLE = d3d12::D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE;
}
@@ -253,6 +254,7 @@ pub enum RootSignatureVersion {
}
bitflags! {
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct RootSignatureFlags: u32 {
const ALLOW_IA_INPUT_LAYOUT = d3d12::D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT;
const DENY_VS_ROOT_ACCESS = d3d12::D3D12_ROOT_SIGNATURE_FLAG_DENY_VERTEX_SHADER_ROOT_ACCESS;

View File

@@ -10,6 +10,7 @@ use winapi::{
};
bitflags! {
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct FactoryCreationFlags: u32 {
const DEBUG = dxgi1_3::DXGI_CREATE_FACTORY_DEBUG;
}
@@ -336,6 +337,7 @@ impl FactoryMedia {
}
bitflags! {
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct SwapChainPresentFlags: u32 {
const DXGI_PRESENT_DO_NOT_SEQUENCE = dxgi::DXGI_PRESENT_DO_NOT_SEQUENCE;
const DXGI_PRESENT_TEST = dxgi::DXGI_PRESENT_TEST;

View File

@@ -30,6 +30,7 @@ pub enum MemoryPool {
}
bitflags! {
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct HeapFlags: u32 {
const NONE = d3d12::D3D12_HEAP_FLAG_NONE;
const SHARED = d3d12::D3D12_HEAP_FLAG_SHARED;

View File

@@ -5,12 +5,14 @@ use std::{ffi, ops::Deref, ptr};
use winapi::um::{d3d12, d3dcompiler};
bitflags! {
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct PipelineStateFlags: u32 {
const TOOL_DEBUG = d3d12::D3D12_PIPELINE_STATE_FLAG_TOOL_DEBUG;
}
}
bitflags! {
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ShaderCompileFlags: u32 {
const DEBUG = d3dcompiler::D3DCOMPILE_DEBUG;
const SKIP_VALIDATION = d3dcompiler::D3DCOMPILE_SKIP_VALIDATION;

View File

@@ -9,6 +9,7 @@ pub enum Priority {
}
bitflags! {
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct CommandQueueFlags: u32 {
const DISABLE_GPU_TIMEOUT = d3d12::D3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUT;
}