d3d11: default to -O3 for compiling shaders
This commit is contained in:
parent
3d0bdd0eac
commit
cc97be6a0c
|
@ -2,9 +2,7 @@ use crate::error;
|
||||||
use crate::error::assume_d3d11_init;
|
use crate::error::assume_d3d11_init;
|
||||||
use std::slice;
|
use std::slice;
|
||||||
use windows::core::PCSTR;
|
use windows::core::PCSTR;
|
||||||
use windows::Win32::Graphics::Direct3D::Fxc::{
|
use windows::Win32::Graphics::Direct3D::Fxc::{D3DCompile, D3DCOMPILE_DEBUG, D3DCOMPILE_OPTIMIZATION_LEVEL3, D3DCOMPILE_SKIP_OPTIMIZATION};
|
||||||
D3DCompile, D3DCOMPILE_DEBUG, D3DCOMPILE_SKIP_OPTIMIZATION,
|
|
||||||
};
|
|
||||||
use windows::Win32::Graphics::Direct3D::ID3DBlob;
|
use windows::Win32::Graphics::Direct3D::ID3DBlob;
|
||||||
use windows::Win32::Graphics::Direct3D11::*;
|
use windows::Win32::Graphics::Direct3D11::*;
|
||||||
use windows::Win32::Graphics::Dxgi::Common::*;
|
use windows::Win32::Graphics::Dxgi::Common::*;
|
||||||
|
@ -119,7 +117,7 @@ pub fn d3d_compile_shader(source: &[u8], entry: &[u8], version: &[u8]) -> error:
|
||||||
if cfg!(feature = "debug-shader") {
|
if cfg!(feature = "debug-shader") {
|
||||||
D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION
|
D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION
|
||||||
} else {
|
} else {
|
||||||
0
|
D3DCOMPILE_OPTIMIZATION_LEVEL3
|
||||||
},
|
},
|
||||||
0,
|
0,
|
||||||
&mut blob,
|
&mut blob,
|
||||||
|
|
Loading…
Reference in a new issue