Skip to content

Commit

Permalink
Removed world cell from places where split multable access is not nee…
Browse files Browse the repository at this point in the history
  • Loading branch information
SarthakSingh31 authored and james7132 committed Oct 28, 2022
1 parent 54a04c7 commit 43525fb
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion crates/bevy_pbr/src/render/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion crates/bevy_sprite/src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion crates/bevy_ui/src/render/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions examples/shader/animate_shader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
1 change: 0 additions & 1 deletion examples/shader/shader_instancing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 43525fb

Please sign in to comment.