From e2fdf9442c00647dd21a0dc69fbc3ddcc8ff1845 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 24 Oct 2023 20:50:48 -0700 Subject: [PATCH] fix requested gpu features --- src/setup.rs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/setup.rs b/src/setup.rs index 9252eb5..0905289 100644 --- a/src/setup.rs +++ b/src/setup.rs @@ -1,21 +1,22 @@ use crate::instruction::TimedInstruction; use crate::run::RunInstruction; -fn optional_features() -> wgpu::Features { - wgpu::Features::empty() +fn optional_features()->wgpu::Features{ + wgpu::Features::TEXTURE_COMPRESSION_ASTC + |wgpu::Features::TEXTURE_COMPRESSION_ETC2 } -fn required_features() -> wgpu::Features { - wgpu::Features::empty() +fn required_features()->wgpu::Features{ + wgpu::Features::TEXTURE_COMPRESSION_BC } -fn required_downlevel_capabilities() -> wgpu::DownlevelCapabilities { - wgpu::DownlevelCapabilities { - flags: wgpu::DownlevelFlags::empty(), - shader_model: wgpu::ShaderModel::Sm5, +fn required_downlevel_capabilities()->wgpu::DownlevelCapabilities{ + wgpu::DownlevelCapabilities{ + flags:wgpu::DownlevelFlags::empty(), + shader_model:wgpu::ShaderModel::Sm5, ..wgpu::DownlevelCapabilities::default() } } -pub fn required_limits() -> wgpu::Limits { - wgpu::Limits::downlevel_webgl2_defaults() // These downlevel limits will allow the code to run on all possible hardware +pub fn required_limits()->wgpu::Limits{ + wgpu::Limits::default() } struct SetupContextPartial1{