Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Removed world cell from places where split multable access is not needed #5167

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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