Make egui_wgpu::RenderPass Send and Sync (#1883)
* Make RenderPass Send and Sync * Add change to CHANGELOG * Make CHANGELOG formatting match egui * Add test
This commit is contained in:
parent
cb0d5a58ab
commit
1af446b9e8
2 changed files with 10 additions and 3 deletions
|
@ -3,7 +3,8 @@ All notable changes to the `egui-wgpu` integration will be noted in this file.
|
|||
|
||||
|
||||
## Unreleased
|
||||
Enables deferred render + surface state initialization for Android ([#1634](https://github.com/emilk/egui/pull/1634))
|
||||
* Enables deferred render + surface state initialization for Android ([#1634](https://github.com/emilk/egui/pull/1634)).
|
||||
* Make `RenderPass` `Send` and `Sync` ([#1883](https://github.com/emilk/egui/pull/1883)).
|
||||
|
||||
## 0.18.0 - 2022-05-15
|
||||
First published version since moving the code into the `egui` repository from <https://github.com/LU15W1R7H/eww>.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
use std::{borrow::Cow, collections::HashMap, num::NonZeroU32};
|
||||
|
||||
use egui::{epaint::Primitive, NumExt, PaintCallbackInfo};
|
||||
use type_map::TypeMap;
|
||||
use type_map::concurrent::TypeMap;
|
||||
use wgpu;
|
||||
use wgpu::util::DeviceExt as _;
|
||||
|
||||
|
@ -133,7 +133,7 @@ pub struct RenderPass {
|
|||
next_user_texture_id: u64,
|
||||
/// Storage for use by [`egui::PaintCallback`]'s that need to store resources such as render
|
||||
/// pipelines that must have the lifetime of the renderpass.
|
||||
pub paint_callback_resources: type_map::TypeMap,
|
||||
pub paint_callback_resources: TypeMap,
|
||||
}
|
||||
|
||||
impl RenderPass {
|
||||
|
@ -807,3 +807,9 @@ impl ScissorRect {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn render_pass_impl_send_sync() {
|
||||
fn assert_send_sync<T: Send + Sync>() {}
|
||||
assert_send_sync::<RenderPass>();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue