From d54fed364de5dee6ce4c6127fcb745368f0ef230 Mon Sep 17 00:00:00 2001 From: Elabajaba Date: Sat, 22 Jul 2023 00:00:04 -0400 Subject: [PATCH] Revert "Fix UI corruption for AMD gpus with Vulkan (#9169)" --- crates/bevy_ui/src/render/mod.rs | 7 +------ crates/bevy_ui/src/render/pipeline.rs | 3 +-- crates/bevy_ui/src/render/render_pass.rs | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/crates/bevy_ui/src/render/mod.rs b/crates/bevy_ui/src/render/mod.rs index f54ae28cb36fd..fba6ba1af1533 100644 --- a/crates/bevy_ui/src/render/mod.rs +++ b/crates/bevy_ui/src/render/mod.rs @@ -3,7 +3,6 @@ mod render_pass; use bevy_core_pipeline::{core_2d::Camera2d, core_3d::Camera3d}; use bevy_hierarchy::Parent; -use bevy_render::view::Msaa; use bevy_render::{ExtractSchedule, Render}; use bevy_window::{PrimaryWindow, Window}; pub use pipeline::*; @@ -802,7 +801,6 @@ pub fn queue_uinodes( ui_batches: Query<(Entity, &UiBatch)>, mut views: Query<(&ExtractedView, &mut RenderPhase)>, events: Res, - msaa: Res, ) { // If an image has changed, the GpuImage has (probably) changed for event in &events.images { @@ -828,10 +826,7 @@ pub fn queue_uinodes( let pipeline = pipelines.specialize( &pipeline_cache, &ui_pipeline, - UiPipelineKey { - hdr: view.hdr, - msaa_samples: msaa.samples(), - }, + UiPipelineKey { hdr: view.hdr }, ); for (entity, batch) in &ui_batches { image_bind_groups diff --git a/crates/bevy_ui/src/render/pipeline.rs b/crates/bevy_ui/src/render/pipeline.rs index a61a4a68a752d..f6b4b0cc3c1ea 100644 --- a/crates/bevy_ui/src/render/pipeline.rs +++ b/crates/bevy_ui/src/render/pipeline.rs @@ -62,7 +62,6 @@ impl FromWorld for UiPipeline { #[derive(Clone, Copy, Hash, PartialEq, Eq)] pub struct UiPipelineKey { pub hdr: bool, - pub msaa_samples: u32, } impl SpecializedRenderPipeline for UiPipeline { @@ -118,7 +117,7 @@ impl SpecializedRenderPipeline for UiPipeline { }, depth_stencil: None, multisample: MultisampleState { - count: key.msaa_samples, + count: 1, mask: !0, alpha_to_coverage_enabled: false, }, diff --git a/crates/bevy_ui/src/render/render_pass.rs b/crates/bevy_ui/src/render/render_pass.rs index d31088a5d890a..90e7b6059cecc 100644 --- a/crates/bevy_ui/src/render/render_pass.rs +++ b/crates/bevy_ui/src/render/render_pass.rs @@ -72,7 +72,7 @@ impl Node for UiPassNode { }; let mut render_pass = render_context.begin_tracked_render_pass(RenderPassDescriptor { label: Some("ui_pass"), - color_attachments: &[Some(target.get_color_attachment(Operations { + color_attachments: &[Some(target.get_unsampled_color_attachment(Operations { load: LoadOp::Load, store: true, }))],