From cc97be6a0c1166a593bbbb023f1a459bbe9ec607 Mon Sep 17 00:00:00 2001 From: chyyran Date: Fri, 27 Jan 2023 00:27:06 -0500 Subject: [PATCH] d3d11: default to -O3 for compiling shaders --- librashader-runtime-d3d11/src/util.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/librashader-runtime-d3d11/src/util.rs b/librashader-runtime-d3d11/src/util.rs index 9deb561..4362b5e 100644 --- a/librashader-runtime-d3d11/src/util.rs +++ b/librashader-runtime-d3d11/src/util.rs @@ -2,9 +2,7 @@ use crate::error; use crate::error::assume_d3d11_init; use std::slice; use windows::core::PCSTR; -use windows::Win32::Graphics::Direct3D::Fxc::{ - D3DCompile, D3DCOMPILE_DEBUG, D3DCOMPILE_SKIP_OPTIMIZATION, -}; +use windows::Win32::Graphics::Direct3D::Fxc::{D3DCompile, D3DCOMPILE_DEBUG, D3DCOMPILE_OPTIMIZATION_LEVEL3, D3DCOMPILE_SKIP_OPTIMIZATION}; use windows::Win32::Graphics::Direct3D::ID3DBlob; use windows::Win32::Graphics::Direct3D11::*; 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") { D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION } else { - 0 + D3DCOMPILE_OPTIMIZATION_LEVEL3 }, 0, &mut blob,