Removed world cell from places where split multable access is not needed (#5167)
Fixes #5109.
This commit is contained in:
parent
49ff42cc69
commit
cdbabb7053
@ -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
|
// TODO: this pattern for initializing the shaders / pipeline isn't ideal. this should be handled by the asset system
|
||||||
impl FromWorld for ShadowPipeline {
|
impl FromWorld for ShadowPipeline {
|
||||||
fn from_world(world: &mut World) -> Self {
|
fn from_world(world: &mut World) -> Self {
|
||||||
let world = world.cell();
|
|
||||||
let render_device = world.resource::<RenderDevice>();
|
let render_device = world.resource::<RenderDevice>();
|
||||||
|
|
||||||
let view_layout = render_device.create_bind_group_layout(&BindGroupLayoutDescriptor {
|
let view_layout = render_device.create_bind_group_layout(&BindGroupLayoutDescriptor {
|
||||||
|
|||||||
@ -38,7 +38,6 @@ pub struct SpritePipeline {
|
|||||||
|
|
||||||
impl FromWorld for SpritePipeline {
|
impl FromWorld for SpritePipeline {
|
||||||
fn from_world(world: &mut World) -> Self {
|
fn from_world(world: &mut World) -> Self {
|
||||||
let world = world.cell();
|
|
||||||
let render_device = world.resource::<RenderDevice>();
|
let render_device = world.resource::<RenderDevice>();
|
||||||
|
|
||||||
let view_layout = render_device.create_bind_group_layout(&BindGroupLayoutDescriptor {
|
let view_layout = render_device.create_bind_group_layout(&BindGroupLayoutDescriptor {
|
||||||
|
|||||||
@ -10,7 +10,6 @@ pub struct UiPipeline {
|
|||||||
|
|
||||||
impl FromWorld for UiPipeline {
|
impl FromWorld for UiPipeline {
|
||||||
fn from_world(world: &mut World) -> Self {
|
fn from_world(world: &mut World) -> Self {
|
||||||
let world = world.cell();
|
|
||||||
let render_device = world.resource::<RenderDevice>();
|
let render_device = world.resource::<RenderDevice>();
|
||||||
|
|
||||||
let view_layout = render_device.create_bind_group_layout(&BindGroupLayoutDescriptor {
|
let view_layout = render_device.create_bind_group_layout(&BindGroupLayoutDescriptor {
|
||||||
|
|||||||
@ -189,11 +189,10 @@ pub struct CustomPipeline {
|
|||||||
|
|
||||||
impl FromWorld for CustomPipeline {
|
impl FromWorld for CustomPipeline {
|
||||||
fn from_world(world: &mut World) -> Self {
|
fn from_world(world: &mut World) -> Self {
|
||||||
let world = world.cell();
|
|
||||||
let asset_server = world.resource::<AssetServer>();
|
let asset_server = world.resource::<AssetServer>();
|
||||||
let shader = asset_server.load("shaders/animate_shader.wgsl");
|
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 =
|
let time_bind_group_layout =
|
||||||
render_device.create_bind_group_layout(&BindGroupLayoutDescriptor {
|
render_device.create_bind_group_layout(&BindGroupLayoutDescriptor {
|
||||||
label: Some("time bind group"),
|
label: Some("time bind group"),
|
||||||
|
|||||||
@ -168,7 +168,6 @@ pub struct CustomPipeline {
|
|||||||
|
|
||||||
impl FromWorld for CustomPipeline {
|
impl FromWorld for CustomPipeline {
|
||||||
fn from_world(world: &mut World) -> Self {
|
fn from_world(world: &mut World) -> Self {
|
||||||
let world = world.cell();
|
|
||||||
let asset_server = world.resource::<AssetServer>();
|
let asset_server = world.resource::<AssetServer>();
|
||||||
asset_server.watch_for_changes().unwrap();
|
asset_server.watch_for_changes().unwrap();
|
||||||
let shader = asset_server.load("shaders/instancing.wgsl");
|
let shader = asset_server.load("shaders/instancing.wgsl");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user