From a562e49ec515831da4c0b685694a10b679cf7ca8 Mon Sep 17 00:00:00 2001 From: Lily Lyons Date: Sun, 3 Dec 2023 00:44:54 -0800 Subject: [PATCH] fix(tilemap): :bug: fix collision shader on native I don't know how I missed this, but the collision shader still expected there to be a bind group when we weren't passing one! --- crates/graphics/src/collision/shader.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/crates/graphics/src/collision/shader.rs b/crates/graphics/src/collision/shader.rs index a6153cfd..d367292c 100644 --- a/crates/graphics/src/collision/shader.rs +++ b/crates/graphics/src/collision/shader.rs @@ -72,12 +72,20 @@ pub fn create_render_pipeline( "Tilemap Collision Render Pipeline Layout (uniforms)" }; + let collision_bgl: &wgpu::BindGroupLayout = &bind_group_layouts.collision; + let bind_group_layout_slice = std::slice::from_ref(&collision_bgl); + let bind_group_layouts: &[&wgpu::BindGroupLayout] = if push_constants_supported { + &[] + } else { + bind_group_layout_slice + }; + let pipeline_layout = render_state .device .create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: Some(label), - bind_group_layouts: &[&bind_group_layouts.collision], + bind_group_layouts, push_constant_ranges, });