@@ -179,21 +179,15 @@ pub fn render_meshes_bindless_ibl(
179179 cmd_buf. set_render_pipeline ( & pipeline) ;
180180
181181 // bind view push constants
182- let slot = pipeline. get_pipeline_slot ( 0 , 0 , gfx:: DescriptorType :: PushConstants ) ;
183- if let Some ( slot) = slot {
184- cmd_buf. push_render_constants ( slot. index , 16 , 0 , gfx:: as_u8_slice ( & camera. view_projection_matrix ) ) ;
185- cmd_buf. push_render_constants ( slot. index , 4 , 16 , gfx:: as_u8_slice ( & camera. view_position ) ) ;
186- }
182+ cmd_buf. push_render_constants ( pipeline, 0 , 0 , 16 , 0 , gfx:: as_u8_slice ( & camera. view_projection_matrix ) ) ;
183+ cmd_buf. push_render_constants ( pipeline, 0 , 0 , 4 , 16 , gfx:: as_u8_slice ( & camera. view_position ) ) ;
187184
188185 // bind world buffer info with IBL indices in user_data
189186 let mut world_buffer_info = pmfx. get_world_buffer_info ( ) ;
190187 world_buffer_info. user_data [ 0 ] = ibl_data. cubemap_srv ;
191188 world_buffer_info. user_data [ 1 ] = ibl_data. lut_srv ;
192- let slot = pipeline. get_pipeline_slot ( 2 , 0 , gfx:: DescriptorType :: PushConstants ) ;
193- if let Some ( slot) = slot {
194- cmd_buf. push_render_constants (
195- slot. index , gfx:: num_32bit_constants ( & world_buffer_info) , 0 , gfx:: as_u8_slice ( & world_buffer_info) ) ;
196- }
189+ cmd_buf. push_render_constants (
190+ pipeline, 2 , 0 , gfx:: num_32bit_constants ( & world_buffer_info) , 0 , gfx:: as_u8_slice ( & world_buffer_info) ) ;
197191
198192 // bind the shader resource heap
199193 cmd_buf. set_heap ( pipeline, & pmfx. shader_heap ) ;
@@ -208,10 +202,7 @@ pub fn render_meshes_bindless_ibl(
208202
209203 // single draw calls
210204 for ( mesh, world_matrix) in & single_draw_query {
211- let slot = pipeline. get_pipeline_slot ( 1 , 0 , gfx:: DescriptorType :: PushConstants ) ;
212- if let Some ( slot) = slot {
213- cmd_buf. push_render_constants ( slot. index , 12 , 0 , & world_matrix. 0 ) ;
214- }
205+ cmd_buf. push_render_constants ( pipeline, 1 , 0 , 12 , 0 , & world_matrix. 0 ) ;
215206 cmd_buf. set_index_buffer ( & mesh. 0 . ib ) ;
216207 cmd_buf. set_vertex_buffer ( & mesh. 0 . vb , 0 ) ;
217208 cmd_buf. draw_indexed_instanced ( mesh. 0 . num_indices , 1 , 0 , 0 , 0 ) ;
0 commit comments