@@ -107,7 +107,13 @@ impl super::CommandEncoder {
107107 ) ;
108108 }
109109 }
110- if let Some ( root_index) = self . pass . layout . special_constants_root_index {
110+ if let Some ( root_index) = self
111+ . pass
112+ . layout
113+ . special_constants
114+ . as_ref ( )
115+ . map ( |sc| sc. root_index )
116+ {
111117 let needs_update = match self . pass . root_elements [ root_index as usize ] {
112118 super :: RootElement :: SpecialConstantBuffer {
113119 first_vertex : other_vertex,
@@ -130,7 +136,13 @@ impl super::CommandEncoder {
130136 }
131137
132138 fn prepare_dispatch ( & mut self , count : [ u32 ; 3 ] ) {
133- if let Some ( root_index) = self . pass . layout . special_constants_root_index {
139+ if let Some ( root_index) = self
140+ . pass
141+ . layout
142+ . special_constants
143+ . as_ref ( )
144+ . map ( |sc| sc. root_index )
145+ {
134146 let needs_update = match self . pass . root_elements [ root_index as usize ] {
135147 super :: RootElement :: SpecialConstantBuffer {
136148 first_vertex,
@@ -230,7 +242,7 @@ impl super::CommandEncoder {
230242 }
231243
232244 fn reset_signature ( & mut self , layout : & super :: PipelineLayoutShared ) {
233- if let Some ( root_index) = layout. special_constants_root_index {
245+ if let Some ( root_index) = layout. special_constants . as_ref ( ) . map ( |sc| sc . root_index ) {
234246 self . pass . root_elements [ root_index as usize ] =
235247 super :: RootElement :: SpecialConstantBuffer {
236248 first_vertex : 0 ,
@@ -1214,8 +1226,9 @@ impl crate::CommandEncoder for super::CommandEncoder {
12141226 let cmd_signature = & self
12151227 . pass
12161228 . layout
1217- . special_constants_cmd_signatures
1229+ . special_constants
12181230 . as_ref ( )
1231+ . map ( |sc| & sc. cmd_signatures )
12191232 . unwrap_or_else ( || & self . shared . cmd_signatures )
12201233 . dispatch ;
12211234 unsafe {
0 commit comments