mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Removed world cell from places where split multable access is not needed (#5167)
Fixes #5109.
This commit is contained in:
parent
49ff42cc69
commit
cdbabb7053
5 changed files with 1 additions and 6 deletions
|
@ -217,7 +217,6 @@ pub struct ShadowPipeline {
|
|||
// TODO: this pattern for initializing the shaders / pipeline isn't ideal. this should be handled by the asset system
|
||||
impl FromWorld for ShadowPipeline {
|
||||
fn from_world(world: &mut World) -> Self {
|
||||
let world = world.cell();
|
||||
let render_device = world.resource::<RenderDevice>();
|
||||
|
||||
let view_layout = render_device.create_bind_group_layout(&BindGroupLayoutDescriptor {
|
||||
|
|
|
@ -38,7 +38,6 @@ pub struct SpritePipeline {
|
|||
|
||||
impl FromWorld for SpritePipeline {
|
||||
fn from_world(world: &mut World) -> Self {
|
||||
let world = world.cell();
|
||||
let render_device = world.resource::<RenderDevice>();
|
||||
|
||||
let view_layout = render_device.create_bind_group_layout(&BindGroupLayoutDescriptor {
|
||||
|
|
|
@ -10,7 +10,6 @@ pub struct UiPipeline {
|
|||
|
||||
impl FromWorld for UiPipeline {
|
||||
fn from_world(world: &mut World) -> Self {
|
||||
let world = world.cell();
|
||||
let render_device = world.resource::<RenderDevice>();
|
||||
|
||||
let view_layout = render_device.create_bind_group_layout(&BindGroupLayoutDescriptor {
|
||||
|
|
|
@ -189,11 +189,10 @@ pub struct CustomPipeline {
|
|||
|
||||
impl FromWorld for CustomPipeline {
|
||||
fn from_world(world: &mut World) -> Self {
|
||||
let world = world.cell();
|
||||
let asset_server = world.resource::<AssetServer>();
|
||||
let shader = asset_server.load("shaders/animate_shader.wgsl");
|
||||
|
||||
let render_device = world.resource_mut::<RenderDevice>();
|
||||
let render_device = world.resource::<RenderDevice>();
|
||||
let time_bind_group_layout =
|
||||
render_device.create_bind_group_layout(&BindGroupLayoutDescriptor {
|
||||
label: Some("time bind group"),
|
||||
|
|
|
@ -168,7 +168,6 @@ pub struct CustomPipeline {
|
|||
|
||||
impl FromWorld for CustomPipeline {
|
||||
fn from_world(world: &mut World) -> Self {
|
||||
let world = world.cell();
|
||||
let asset_server = world.resource::<AssetServer>();
|
||||
asset_server.watch_for_changes().unwrap();
|
||||
let shader = asset_server.load("shaders/instancing.wgsl");
|
||||
|
|
Loading…
Reference in a new issue