Skip to content

Commit eb07d16

Browse files
Revert rendering-related associated type name changes (#11027)
# Objective > Can anyone explain to me the reasoning of renaming all the types named Query to Data. I'm talking about this PR #10779 It doesn't make sense to me that a bunch of types that are used to run queries aren't named Query anymore. Like ViewQuery on the ViewNode is the type of the Query. I don't really understand the point of the rename, it just seems like it hides the fact that a query will run based on those types. [@IceSentry](https://discord.com/channels/691052431525675048/692572690833473578/1184946251431694387) ## Solution Revert several renames in #10779. ## Changelog - `ViewNode::ViewData` is now `ViewNode::ViewQuery` again. ## Migration Guide - This PR amends the migration guide in #10779 --------- Co-authored-by: atlas dostal <[email protected]>
1 parent 8afb3ce commit eb07d16

File tree

34 files changed

+130
-130
lines changed

34 files changed

+130
-130
lines changed

crates/bevy_core_pipeline/src/bloom/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl Plugin for BloomPlugin {
113113
#[derive(Default)]
114114
struct BloomNode;
115115
impl ViewNode for BloomNode {
116-
type ViewData = (
116+
type ViewQuery = (
117117
&'static ExtractedCamera,
118118
&'static ViewTarget,
119119
&'static BloomTexture,
@@ -140,7 +140,7 @@ impl ViewNode for BloomNode {
140140
bloom_settings,
141141
upsampling_pipeline_ids,
142142
downsampling_pipeline_ids,
143-
): QueryItem<Self::ViewData>,
143+
): QueryItem<Self::ViewQuery>,
144144
world: &World,
145145
) -> Result<(), NodeRunError> {
146146
let downsampling_pipeline_res = world.resource::<BloomDownsamplingPipeline>();

crates/bevy_core_pipeline/src/bloom/settings.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,12 @@ pub enum BloomCompositeMode {
182182
}
183183

184184
impl ExtractComponent for BloomSettings {
185-
type Data = (&'static Self, &'static Camera);
185+
type QueryData = (&'static Self, &'static Camera);
186186

187-
type Filter = ();
187+
type QueryFilter = ();
188188
type Out = (Self, BloomUniforms);
189189

190-
fn extract_component((settings, camera): QueryItem<'_, Self::Data>) -> Option<Self::Out> {
190+
fn extract_component((settings, camera): QueryItem<'_, Self::QueryData>) -> Option<Self::Out> {
191191
match (
192192
camera.physical_viewport_rect(),
193193
camera.physical_viewport_size(),

crates/bevy_core_pipeline/src/contrast_adaptive_sharpening/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ pub struct CASUniform {
7777
}
7878

7979
impl ExtractComponent for ContrastAdaptiveSharpeningSettings {
80-
type Data = &'static Self;
81-
type Filter = With<Camera>;
80+
type QueryData = &'static Self;
81+
type QueryFilter = With<Camera>;
8282
type Out = (DenoiseCAS, CASUniform);
8383

84-
fn extract_component(item: QueryItem<Self::Data>) -> Option<Self::Out> {
84+
fn extract_component(item: QueryItem<Self::QueryData>) -> Option<Self::Out> {
8585
if !item.enabled || item.sharpening_strength == 0.0 {
8686
return None;
8787
}

crates/bevy_core_pipeline/src/core_3d/main_opaque_pass_3d_node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use super::AlphaMask3d;
2020
#[derive(Default)]
2121
pub struct MainOpaquePass3dNode;
2222
impl ViewNode for MainOpaquePass3dNode {
23-
type ViewData = (
23+
type ViewQuery = (
2424
&'static ExtractedCamera,
2525
&'static RenderPhase<Opaque3d>,
2626
&'static RenderPhase<AlphaMask3d>,
@@ -44,7 +44,7 @@ impl ViewNode for MainOpaquePass3dNode {
4444
skybox_pipeline,
4545
skybox_bind_group,
4646
view_uniform_offset,
47-
): QueryItem<Self::ViewData>,
47+
): QueryItem<Self::ViewQuery>,
4848
world: &World,
4949
) -> Result<(), NodeRunError> {
5050
// Run the opaque pass, sorted front-to-back

crates/bevy_core_pipeline/src/core_3d/main_transmissive_pass_3d_node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use std::ops::Range;
1818
pub struct MainTransmissivePass3dNode;
1919

2020
impl ViewNode for MainTransmissivePass3dNode {
21-
type ViewData = (
21+
type ViewQuery = (
2222
&'static ExtractedCamera,
2323
&'static Camera3d,
2424
&'static RenderPhase<Transmissive3d>,
@@ -32,7 +32,7 @@ impl ViewNode for MainTransmissivePass3dNode {
3232
graph: &mut RenderGraphContext,
3333
render_context: &mut RenderContext,
3434
(camera, camera_3d, transmissive_phase, target, transmission, depth): QueryItem<
35-
Self::ViewData,
35+
Self::ViewQuery,
3636
>,
3737
world: &World,
3838
) -> Result<(), NodeRunError> {

crates/bevy_core_pipeline/src/core_3d/main_transparent_pass_3d_node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use bevy_utils::tracing::info_span;
1616
pub struct MainTransparentPass3dNode;
1717

1818
impl ViewNode for MainTransparentPass3dNode {
19-
type ViewData = (
19+
type ViewQuery = (
2020
&'static ExtractedCamera,
2121
&'static RenderPhase<Transparent3d>,
2222
&'static ViewTarget,
@@ -26,7 +26,7 @@ impl ViewNode for MainTransparentPass3dNode {
2626
&self,
2727
graph: &mut RenderGraphContext,
2828
render_context: &mut RenderContext,
29-
(camera, transparent_phase, target, depth): QueryItem<Self::ViewData>,
29+
(camera, transparent_phase, target, depth): QueryItem<Self::ViewQuery>,
3030
world: &World,
3131
) -> Result<(), NodeRunError> {
3232
let view_entity = graph.view_entity();

crates/bevy_core_pipeline/src/deferred/copy_lighting_id.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ impl CopyDeferredLightingIdNode {
6161
}
6262

6363
impl ViewNode for CopyDeferredLightingIdNode {
64-
type ViewData = (
64+
type ViewQuery = (
6565
&'static ViewTarget,
6666
&'static ViewPrepassTextures,
6767
&'static DeferredLightingIdDepthTexture,
@@ -72,7 +72,7 @@ impl ViewNode for CopyDeferredLightingIdNode {
7272
_graph: &mut RenderGraphContext,
7373
render_context: &mut RenderContext,
7474
(_view_target, view_prepass_textures, deferred_lighting_id_depth_texture): QueryItem<
75-
Self::ViewData,
75+
Self::ViewQuery,
7676
>,
7777
world: &World,
7878
) -> Result<(), NodeRunError> {

crates/bevy_core_pipeline/src/deferred/node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use super::{AlphaMask3dDeferred, Opaque3dDeferred};
2626
pub struct DeferredGBufferPrepassNode;
2727

2828
impl ViewNode for DeferredGBufferPrepassNode {
29-
type ViewData = (
29+
type ViewQuery = (
3030
&'static ExtractedCamera,
3131
&'static RenderPhase<Opaque3dDeferred>,
3232
&'static RenderPhase<AlphaMask3dDeferred>,
@@ -44,7 +44,7 @@ impl ViewNode for DeferredGBufferPrepassNode {
4444
alpha_mask_deferred_phase,
4545
view_depth_texture,
4646
view_prepass_textures,
47-
): QueryItem<Self::ViewData>,
47+
): QueryItem<Self::ViewQuery>,
4848
world: &World,
4949
) -> Result<(), NodeRunError> {
5050
let view_entity = graph.view_entity();

crates/bevy_core_pipeline/src/fxaa/node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub struct FxaaNode {
2020
}
2121

2222
impl ViewNode for FxaaNode {
23-
type ViewData = (
23+
type ViewQuery = (
2424
&'static ViewTarget,
2525
&'static CameraFxaaPipeline,
2626
&'static Fxaa,
@@ -30,7 +30,7 @@ impl ViewNode for FxaaNode {
3030
&self,
3131
_graph: &mut RenderGraphContext,
3232
render_context: &mut RenderContext,
33-
(target, pipeline, fxaa): QueryItem<Self::ViewData>,
33+
(target, pipeline, fxaa): QueryItem<Self::ViewQuery>,
3434
world: &World,
3535
) -> Result<(), NodeRunError> {
3636
let pipeline_cache = world.resource::<PipelineCache>();

crates/bevy_core_pipeline/src/prepass/node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use super::{AlphaMask3dPrepass, DeferredPrepass, Opaque3dPrepass, ViewPrepassTex
2222
pub struct PrepassNode;
2323

2424
impl ViewNode for PrepassNode {
25-
type ViewData = (
25+
type ViewQuery = (
2626
&'static ExtractedCamera,
2727
&'static RenderPhase<Opaque3dPrepass>,
2828
&'static RenderPhase<AlphaMask3dPrepass>,
@@ -42,7 +42,7 @@ impl ViewNode for PrepassNode {
4242
view_depth_texture,
4343
view_prepass_textures,
4444
deferred_prepass,
45-
): QueryItem<Self::ViewData>,
45+
): QueryItem<Self::ViewQuery>,
4646
world: &World,
4747
) -> Result<(), NodeRunError> {
4848
let view_entity = graph.view_entity();

0 commit comments

Comments
 (0)