mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
[egui-wgpu] Device configuration is now dependent on adapter (#2951)
* [egui-wgpu] Device configuration is now dependent on adapter Additionally, renamed `backends` into `supported_backends` and improved & unified wgpu config defaults. * improve wgpu backend default * clippy fix * formatting --------- Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
@@ -108,8 +108,8 @@ impl Painter {
|
||||
support_transparent_backbuffer: bool,
|
||||
) -> Self {
|
||||
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
|
||||
backends: configuration.backends,
|
||||
dx12_shader_compiler: Default::default(), //
|
||||
backends: configuration.supported_backends,
|
||||
dx12_shader_compiler: Default::default(),
|
||||
});
|
||||
|
||||
Self {
|
||||
@@ -141,7 +141,7 @@ impl Painter {
|
||||
target_format: wgpu::TextureFormat,
|
||||
) -> Result<RenderState, wgpu::RequestDeviceError> {
|
||||
adapter
|
||||
.request_device(&self.configuration.device_descriptor, None)
|
||||
.request_device(&(*self.configuration.device_descriptor)(adapter), None)
|
||||
.await
|
||||
.map(|(device, queue)| {
|
||||
let renderer =
|
||||
|
||||
Reference in New Issue
Block a user