@@ -6,9 +6,10 @@ use bevy::{
66 extract_component:: { ComponentUniforms , DynamicUniformIndex } ,
77 render_resource:: {
88 binding_types:: { sampler, texture_2d, uniform_buffer} ,
9- BindGroupEntries , BindGroupLayout , BindGroupLayoutEntries , CachedRenderPipelineId ,
10- FragmentState , PipelineCache , RenderPassDescriptor , RenderPipeline ,
11- RenderPipelineDescriptor , Sampler , SamplerDescriptor , ShaderType , StoreOp ,
9+ BindGroupEntries , BindGroupLayoutDescriptor , BindGroupLayoutEntries ,
10+ CachedRenderPipelineId , FragmentState , PipelineCache , RenderPassDescriptor ,
11+ RenderPipeline , RenderPipelineDescriptor , Sampler , SamplerDescriptor , ShaderType ,
12+ StoreOp ,
1213 } ,
1314 renderer:: { RenderContext , RenderDevice } ,
1415 texture:: CachedTexture ,
@@ -27,7 +28,6 @@ use super::{DrawMode, OutlineViewUniform, COMPOSE_OUTPUT_SHADER_HANDLE};
2728
2829#[ derive( Clone , Component , ShaderType ) ]
2930pub ( crate ) struct ComposeOutputUniform {
30- #[ align( 16 ) ]
3131 pub volume_offset : f32 ,
3232 pub volume_colour : Vec4 ,
3333}
@@ -48,7 +48,7 @@ pub(crate) fn prepare_compose_output_uniform(
4848
4949#[ derive( Clone , Resource ) ]
5050pub ( crate ) struct ComposeOutputPipeline {
51- pub ( crate ) layout : BindGroupLayout ,
51+ pub ( crate ) layout : BindGroupLayoutDescriptor ,
5252 pub ( crate ) sampler : Sampler ,
5353 pub ( crate ) pipeline_cache : HashMap < ViewPipelineKey , CachedRenderPipelineId > ,
5454}
@@ -57,7 +57,7 @@ impl FromWorld for ComposeOutputPipeline {
5757 fn from_world ( world : & mut World ) -> Self {
5858 let render_device = world. resource :: < RenderDevice > ( ) ;
5959
60- let layout = render_device . create_bind_group_layout (
60+ let layout = BindGroupLayoutDescriptor :: new (
6161 "outline_flood_compose_output_bind_group_layout" ,
6262 & BindGroupLayoutEntries :: sequential (
6363 ShaderStages :: FRAGMENT ,
@@ -193,6 +193,7 @@ impl<'w> ComposeOutputPass<'w> {
193193 view_entity : Entity ,
194194 render_entity : Entity ,
195195 input : & CachedTexture ,
196+ pipeline_cache : & PipelineCache ,
196197 bounds : & URect ,
197198 ) {
198199 let view_dynamic_index = self
@@ -210,7 +211,7 @@ impl<'w> ComposeOutputPass<'w> {
210211
211212 let bind_group = render_context. render_device ( ) . create_bind_group (
212213 "outline_flood_compose_output_bind_group" ,
213- & self . pipeline . layout ,
214+ & pipeline_cache . get_bind_group_layout ( & self . pipeline . layout ) ,
214215 & BindGroupEntries :: sequential ( (
215216 & input. default_view ,
216217 & self . pipeline . sampler ,
0 commit comments