Only bevy_render should depend directly on wgpu (#3393)

# Objective

- Only bevy_render should depend directly on wgpu
- This helps to make sure bevy_render re-exports everything needed from wgpu

## Solution

- Remove bevy_pbr, bevy_sprite and bevy_ui dependency on wgpu


Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
This commit is contained in:
François 2021-12-20 20:50:52 +00:00
parent 1ef028d2af
commit c61fbcb7db
7 changed files with 9 additions and 12 deletions

View file

@ -29,4 +29,3 @@ thiserror = "1.0"
anyhow = "1.0.4"
base64 = "0.13.0"
percent-encoding = "2.1"
wgpu = "0.12.0"

View file

@ -14,6 +14,9 @@ use bevy_render::{
color::Color,
mesh::{Indices, Mesh, VertexAttributeValues},
primitives::{Aabb, Frustum},
render_resource::{
AddressMode, FilterMode, PrimitiveTopology, SamplerDescriptor, TextureFormat,
},
texture::{Image, ImageType, TextureError},
view::VisibleEntities,
};
@ -30,7 +33,6 @@ use gltf::{
};
use std::{collections::VecDeque, path::Path};
use thiserror::Error;
use wgpu::{AddressMode, FilterMode, PrimitiveTopology, SamplerDescriptor, TextureFormat};
use crate::{Gltf, GltfNode};

View file

@ -33,10 +33,10 @@ pub use wgpu::{
Limits as WgpuLimits, LoadOp, MultisampleState, Operations, Origin3d, PipelineLayout,
PipelineLayoutDescriptor, PolygonMode, PrimitiveState, PrimitiveTopology,
RenderPassColorAttachment, RenderPassDepthStencilAttachment, RenderPassDescriptor,
RenderPipelineDescriptor as RawRenderPipelineDescriptor, SamplerDescriptor, ShaderModule,
ShaderModuleDescriptor, ShaderSource, ShaderStages, StencilFaceState, StencilOperation,
StencilState, StorageTextureAccess, TextureAspect, TextureDescriptor, TextureDimension,
TextureFormat, TextureSampleType, TextureUsages, TextureViewDescriptor, TextureViewDimension,
VertexAttribute, VertexBufferLayout as RawVertexBufferLayout, VertexFormat,
VertexState as RawVertexState, VertexStepMode,
RenderPipelineDescriptor as RawRenderPipelineDescriptor, SamplerBindingType, SamplerDescriptor,
ShaderModule, ShaderModuleDescriptor, ShaderSource, ShaderStages, StencilFaceState,
StencilOperation, StencilState, StorageTextureAccess, TextureAspect, TextureDescriptor,
TextureDimension, TextureFormat, TextureSampleType, TextureUsages, TextureViewDescriptor,
TextureViewDimension, VertexAttribute, VertexBufferLayout as RawVertexBufferLayout,
VertexFormat, VertexState as RawVertexState, VertexStepMode,
};

View file

@ -31,4 +31,3 @@ guillotiere = "0.6.0"
thiserror = "1.0"
rectangle-pack = "0.4"
serde = { version = "1", features = ["derive"] }
wgpu = "0.12.0"

View file

@ -26,7 +26,6 @@ use bevy_transform::components::GlobalTransform;
use bevy_utils::HashMap;
use bytemuck::{Pod, Zeroable};
use crevice::std140::AsStd140;
use wgpu::SamplerBindingType;
pub struct SpritePipeline {
view_layout: BindGroupLayout,

View file

@ -33,4 +33,3 @@ serde = { version = "1", features = ["derive"] }
smallvec = { version = "1.6", features = ["union", "const_generics"] }
bytemuck = { version = "1.5", features = ["derive"] }
crevice = { path = "../crevice", version = "0.8.0", features = ["glam"] }
wgpu = "0.12.0"

View file

@ -4,7 +4,6 @@ use bevy_render::{
};
use crevice::std140::AsStd140;
use wgpu::SamplerBindingType;
pub struct UiPipeline {
pub view_layout: BindGroupLayout,