Skip to content

Commit

Permalink
renamed GPU* to Gpu*
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtkuehnert committed Dec 21, 2022
1 parent 059606a commit dd55779
Show file tree
Hide file tree
Showing 51 changed files with 189 additions and 189 deletions.
10 changes: 5 additions & 5 deletions crates/bevy_core_pipeline/src/bloom/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use bevy_render::{
render_graph::{Node, NodeRunError, RenderGraph, RenderGraphContext, SlotInfo, SlotType},
render_phase::TrackedRenderPass,
render_resource::*,
renderer::{GPUContext, GPUDevice},
renderer::{GpuContext, GpuDevice},
texture::{CachedTexture, TextureCache},
view::ViewTarget,
RenderApp, RenderStage,
Expand Down Expand Up @@ -200,7 +200,7 @@ impl Node for BloomNode {
fn run(
&self,
graph: &mut RenderGraphContext,
gpu_context: &mut GPUContext,
gpu_context: &mut GpuContext,
world: &World,
) -> Result<(), NodeRunError> {
#[cfg(feature = "trace")]
Expand Down Expand Up @@ -350,7 +350,7 @@ struct BloomPipelines {

impl FromWorld for BloomPipelines {
fn from_world(world: &mut World) -> Self {
let gpu_device = world.resource::<GPUDevice>();
let gpu_device = world.resource::<GpuDevice>();

let sampler = gpu_device.create_sampler(&SamplerDescriptor {
min_filter: FilterMode::Linear,
Expand Down Expand Up @@ -563,7 +563,7 @@ impl BloomTextures {
fn prepare_bloom_textures(
mut commands: Commands,
mut texture_cache: ResMut<TextureCache>,
gpu_device: Res<GPUDevice>,
gpu_device: Res<GpuDevice>,
views: Query<(Entity, &ExtractedCamera), With<BloomUniform>>,
) {
let mut texture_as = HashMap::default();
Expand Down Expand Up @@ -633,7 +633,7 @@ struct BloomBindGroups {

fn queue_bloom_bind_groups(
mut commands: Commands,
gpu_device: Res<GPUDevice>,
gpu_device: Res<GpuDevice>,
pipelines: Res<BloomPipelines>,
uniforms: Res<ComponentUniforms<BloomUniform>>,
views: Query<(Entity, &ViewTarget, &BloomTextures)>,
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_core_pipeline/src/core_2d/main_pass_2d_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use bevy_render::{
render_graph::{Node, NodeRunError, RenderGraphContext, SlotInfo, SlotType},
render_phase::{DrawFunctions, RenderPhase, TrackedRenderPass},
render_resource::{LoadOp, Operations, RenderPassDescriptor},
renderer::GPUContext,
renderer::GpuContext,
view::{ExtractedView, ViewTarget},
};
#[cfg(feature = "trace")]
Expand Down Expand Up @@ -48,7 +48,7 @@ impl Node for MainPass2dNode {
fn run(
&self,
graph: &mut RenderGraphContext,
gpu_context: &mut GPUContext,
gpu_context: &mut GpuContext,
world: &World,
) -> Result<(), NodeRunError> {
let view_entity = graph.get_input_entity(Self::IN_VIEW)?;
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_core_pipeline/src/core_3d/main_pass_3d_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use bevy_render::{
render_graph::{Node, NodeRunError, RenderGraphContext, SlotInfo, SlotType},
render_phase::{DrawFunctions, RenderPhase, TrackedRenderPass},
render_resource::{LoadOp, Operations, RenderPassDepthStencilAttachment, RenderPassDescriptor},
renderer::GPUContext,
renderer::GpuContext,
view::{ExtractedView, ViewDepthTexture, ViewTarget},
};
#[cfg(feature = "trace")]
Expand Down Expand Up @@ -51,7 +51,7 @@ impl Node for MainPass3dNode {
fn run(
&self,
graph: &mut RenderGraphContext,
gpu_context: &mut GPUContext,
gpu_context: &mut GpuContext,
world: &World,
) -> Result<(), NodeRunError> {
let view_entity = graph.get_input_entity(Self::IN_VIEW)?;
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_core_pipeline/src/core_3d/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use bevy_render::{
CachedRenderPipelineId, Extent3d, TextureDescriptor, TextureDimension, TextureFormat,
TextureUsages,
},
renderer::GPUDevice,
renderer::GpuDevice,
texture::TextureCache,
view::ViewDepthTexture,
Extract, RenderApp, RenderStage,
Expand Down Expand Up @@ -257,7 +257,7 @@ pub fn prepare_core_3d_depth_textures(
mut commands: Commands,
mut texture_cache: ResMut<TextureCache>,
msaa: Res<Msaa>,
gpu_device: Res<GPUDevice>,
gpu_device: Res<GpuDevice>,
views_3d: Query<
(Entity, &ExtractedCamera),
(
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_core_pipeline/src/fxaa/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use bevy_render::{
prelude::Camera,
render_graph::RenderGraph,
render_resource::*,
renderer::GPUDevice,
renderer::GpuDevice,
texture::BevyDefault,
view::{ExtractedView, ViewTarget},
RenderApp, RenderStage,
Expand Down Expand Up @@ -153,7 +153,7 @@ pub struct FxaaPipeline {
impl FromWorld for FxaaPipeline {
fn from_world(render_world: &mut World) -> Self {
let texture_bind_group = render_world
.resource::<GPUDevice>()
.resource::<GpuDevice>()
.create_bind_group_layout(&BindGroupLayoutDescriptor {
label: Some("fxaa_texture_bind_group_layout"),
entries: &[
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_core_pipeline/src/fxaa/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use bevy_render::{
PipelineCache, RenderPassColorAttachment, RenderPassDescriptor, SamplerDescriptor,
TextureViewId,
},
renderer::GPUContext,
renderer::GpuContext,
view::{ExtractedView, ViewTarget},
};
use bevy_utils::default;
Expand Down Expand Up @@ -50,7 +50,7 @@ impl Node for FxaaNode {
fn run(
&self,
graph: &mut RenderGraphContext,
gpu_context: &mut GPUContext,
gpu_context: &mut GpuContext,
world: &World,
) -> Result<(), NodeRunError> {
let view_entity = graph.get_input_entity(Self::IN_VIEW)?;
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_core_pipeline/src/tonemapping/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use bevy_ecs::query::QueryItem;
use bevy_reflect::{Reflect, TypeUuid};
use bevy_render::camera::Camera;
use bevy_render::extract_component::{ExtractComponent, ExtractComponentPlugin};
use bevy_render::renderer::GPUDevice;
use bevy_render::renderer::GpuDevice;
use bevy_render::view::ViewTarget;
use bevy_render::{render_resource::*, RenderApp, RenderStage};

Expand Down Expand Up @@ -92,7 +92,7 @@ impl SpecializedRenderPipeline for TonemappingPipeline {
impl FromWorld for TonemappingPipeline {
fn from_world(render_world: &mut World) -> Self {
let tonemap_texture_bind_group = render_world
.resource::<GPUDevice>()
.resource::<GpuDevice>()
.create_bind_group_layout(&BindGroupLayoutDescriptor {
label: Some("tonemapping_hdr_texture_bind_group_layout"),
entries: &[
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_core_pipeline/src/tonemapping/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use bevy_render::{
PipelineCache, RenderPassColorAttachment, RenderPassDescriptor, SamplerDescriptor,
TextureViewId,
},
renderer::GPUContext,
renderer::GpuContext,
view::{ExtractedView, ViewTarget},
};

Expand Down Expand Up @@ -42,7 +42,7 @@ impl Node for TonemappingNode {
fn run(
&self,
graph: &mut RenderGraphContext,
gpu_context: &mut GPUContext,
gpu_context: &mut GpuContext,
world: &World,
) -> Result<(), NodeRunError> {
let view_entity = graph.get_input_entity(Self::IN_VIEW)?;
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_core_pipeline/src/upscaling/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use bevy_app::prelude::*;
use bevy_asset::{load_internal_asset, HandleUntyped};
use bevy_ecs::prelude::*;
use bevy_reflect::TypeUuid;
use bevy_render::renderer::GPUDevice;
use bevy_render::renderer::GpuDevice;
use bevy_render::view::ViewTarget;
use bevy_render::{render_resource::*, RenderApp, RenderStage};

Expand Down Expand Up @@ -41,7 +41,7 @@ pub struct UpscalingPipeline {

impl FromWorld for UpscalingPipeline {
fn from_world(render_world: &mut World) -> Self {
let gpu_device = render_world.resource::<GPUDevice>();
let gpu_device = render_world.resource::<GpuDevice>();

let texture_bind_group = gpu_device.create_bind_group_layout(&BindGroupLayoutDescriptor {
label: Some("upscaling_texture_bind_group_layout"),
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_core_pipeline/src/upscaling/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use bevy_render::{
PipelineCache, RenderPassColorAttachment, RenderPassDescriptor, SamplerDescriptor,
TextureViewId,
},
renderer::GPUContext,
renderer::GpuContext,
view::{ExtractedView, ViewTarget},
};

Expand Down Expand Up @@ -43,7 +43,7 @@ impl Node for UpscalingNode {
fn run(
&self,
graph: &mut RenderGraphContext,
gpu_context: &mut GPUContext,
gpu_context: &mut GpuContext,
world: &World,
) -> Result<(), NodeRunError> {
let view_entity = graph.get_input_entity(Self::IN_VIEW)?;
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_gltf/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use bevy_render::{
prelude::SpatialBundle,
primitives::{Aabb, Frustum},
render_resource::{AddressMode, Face, FilterMode, PrimitiveTopology, SamplerDescriptor},
renderer::GPUDevice,
renderer::GpuDevice,
texture::{CompressedImageFormats, Image, ImageSampler, ImageType, TextureError},
view::VisibleEntities,
};
Expand Down Expand Up @@ -93,7 +93,7 @@ impl AssetLoader for GltfLoader {

impl FromWorld for GltfLoader {
fn from_world(world: &mut World) -> Self {
let supported_compressed_formats = match world.get_resource::<GPUDevice>() {
let supported_compressed_formats = match world.get_resource::<GpuDevice>() {
Some(gpu_device) => CompressedImageFormats::from_features(gpu_device.features()),

None => CompressedImageFormats::all(),
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_internal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ pub mod pbr {
#[cfg(feature = "bevy_render")]
pub mod render {
//! Cameras, meshes, textures, shaders, and pipelines.
//! Use [`GPUDevice::features`](crate::render::renderer::GPUDevice::features),
//! [`GPUDevice::limits`](crate::render::renderer::GPUDevice::limits), and the
//! Use [`GPUDevice::features`](crate::render::renderer::GpuDevice::features),
//! [`GPUDevice::limits`](crate::render::renderer::GpuDevice::limits), and the
//! [`WgpuAdapterInfo`](crate::render::render_resource::WgpuAdapterInfo) resource to
//! get runtime information about the actual adapter, backend, features, and limits.
pub use bevy_render::*;
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_pbr/src/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use bevy_render::{
extract_resource::ExtractResource,
primitives::{Aabb, CubemapFrusta, Frustum, Plane, Sphere},
render_resource::BufferBindingType,
renderer::GPUDevice,
renderer::GpuDevice,
view::{ComputedVisibility, RenderLayers, VisibleEntities},
};
use bevy_transform::{components::GlobalTransform, prelude::Transform};
Expand Down Expand Up @@ -863,7 +863,7 @@ pub(crate) fn assign_lights_to_clusters(
mut lights: Local<Vec<PointLightAssignmentData>>,
mut cluster_aabb_spheres: Local<Vec<Option<Sphere>>>,
mut max_point_lights_warning_emitted: Local<bool>,
gpu_device: Option<Res<GPUDevice>>,
gpu_device: Option<Res<GpuDevice>>,
) {
let gpu_device = match gpu_device {
Some(gpu_device) => gpu_device,
Expand Down
8 changes: 4 additions & 4 deletions crates/bevy_pbr/src/material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use bevy_render::{
PipelineCache, RenderPipelineDescriptor, Shader, ShaderRef, SpecializedMeshPipeline,
SpecializedMeshPipelineError, SpecializedMeshPipelines,
},
renderer::GPUDevice,
renderer::GpuDevice,
texture::FallbackImage,
view::{ExtractedView, Msaa, VisibleEntities},
Extract, RenderApp, RenderStage,
Expand Down Expand Up @@ -266,7 +266,7 @@ where
impl<M: Material> FromWorld for MaterialPipeline<M> {
fn from_world(world: &mut World) -> Self {
let asset_server = world.resource::<AssetServer>();
let gpu_device = world.resource::<GPUDevice>();
let gpu_device = world.resource::<GpuDevice>();

MaterialPipeline {
mesh_pipeline: world.resource::<MeshPipeline>().clone(),
Expand Down Expand Up @@ -522,7 +522,7 @@ fn prepare_materials<M: Material>(
mut prepare_next_frame: Local<PrepareNextFrameMaterials<M>>,
mut extracted_assets: ResMut<ExtractedMaterials<M>>,
mut render_materials: ResMut<RenderMaterials<M>>,
gpu_device: Res<GPUDevice>,
gpu_device: Res<GpuDevice>,
images: Res<RenderAssets<Image>>,
fallback_image: Res<FallbackImage>,
pipeline: Res<MaterialPipeline<M>>,
Expand Down Expand Up @@ -557,7 +557,7 @@ fn prepare_materials<M: Material>(

fn prepare_material<M: Material>(
material: &M,
gpu_device: &GPUDevice,
gpu_device: &GpuDevice,
images: &RenderAssets<Image>,
fallback_image: &FallbackImage,
pipeline: &MaterialPipeline<M>,
Expand Down
22 changes: 11 additions & 11 deletions crates/bevy_pbr/src/render/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use bevy_render::{
TrackedRenderPass,
},
render_resource::*,
renderer::{GPUContext, GPUDevice, GPUQueue},
renderer::{GpuContext, GpuDevice, GpuQueue},
texture::*,
view::{
ComputedVisibility, ExtractedView, ViewUniform, ViewUniformOffset, ViewUniforms,
Expand Down Expand Up @@ -141,7 +141,7 @@ impl GpuPointLights {
}
}

fn write_buffer(&mut self, gpu_device: &GPUDevice, gpu_queue: &GPUQueue) {
fn write_buffer(&mut self, gpu_device: &GpuDevice, gpu_queue: &GpuQueue) {
match self {
GpuPointLights::Uniform(buffer) => buffer.write_buffer(gpu_device, gpu_queue),
GpuPointLights::Storage(buffer) => buffer.write_buffer(gpu_device, gpu_queue),
Expand Down Expand Up @@ -226,7 +226,7 @@ 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 gpu_device = world.resource::<GPUDevice>();
let gpu_device = world.resource::<GpuDevice>();

let view_layout = gpu_device.create_bind_group_layout(&BindGroupLayoutDescriptor {
entries: &[
Expand Down Expand Up @@ -672,7 +672,7 @@ impl FromWorld for GlobalLightMeta {
fn from_world(world: &mut World) -> Self {
Self::new(
world
.resource::<GPUDevice>()
.resource::<GpuDevice>()
.get_supported_read_only_binding_type(CLUSTERED_FORWARD_STORAGE_BUFFER_COUNT),
)
}
Expand Down Expand Up @@ -759,8 +759,8 @@ pub(crate) fn spot_light_projection_matrix(angle: f32) -> Mat4 {
pub fn prepare_lights(
mut commands: Commands,
mut texture_cache: ResMut<TextureCache>,
gpu_device: Res<GPUDevice>,
gpu_queue: Res<GPUQueue>,
gpu_device: Res<GpuDevice>,
gpu_queue: Res<GpuQueue>,
mut global_light_meta: ResMut<GlobalLightMeta>,
mut light_meta: ResMut<LightMeta>,
views: Query<
Expand Down Expand Up @@ -1470,7 +1470,7 @@ impl ViewClusterBindings {
self.n_indices += 1;
}

pub fn write_buffers(&mut self, gpu_device: &GPUDevice, gpu_queue: &GPUQueue) {
pub fn write_buffers(&mut self, gpu_device: &GpuDevice, gpu_queue: &GpuQueue) {
match &mut self.buffers {
ViewClusterBuffers::Uniform {
cluster_light_index_lists,
Expand Down Expand Up @@ -1536,8 +1536,8 @@ impl ViewClusterBindings {

pub fn prepare_clusters(
mut commands: Commands,
gpu_device: Res<GPUDevice>,
gpu_queue: Res<GPUQueue>,
gpu_device: Res<GpuDevice>,
gpu_queue: Res<GpuQueue>,
mesh_pipeline: Res<MeshPipeline>,
global_light_meta: Res<GlobalLightMeta>,
views: Query<
Expand Down Expand Up @@ -1602,7 +1602,7 @@ pub fn prepare_clusters(
}

pub fn queue_shadow_view_bind_group(
gpu_device: Res<GPUDevice>,
gpu_device: Res<GpuDevice>,
shadow_pipeline: Res<ShadowPipeline>,
mut light_meta: ResMut<LightMeta>,
view_uniforms: Res<ViewUniforms>,
Expand Down Expand Up @@ -1757,7 +1757,7 @@ impl Node for ShadowPassNode {
fn run(
&self,
graph: &mut RenderGraphContext,
gpu_context: &mut GPUContext,
gpu_context: &mut GpuContext,
world: &World,
) -> Result<(), NodeRunError> {
let view_entity = graph.get_input_entity(Self::IN_VIEW)?;
Expand Down
Loading

0 comments on commit dd55779

Please sign in to comment.