@@ -95,7 +95,7 @@ pub enum GpuPointLights {
95
95
buffer : UniformVec < [ GpuPointLight ; MAX_POINT_LIGHTS ] > ,
96
96
} ,
97
97
Storage {
98
- buffer : StorageVec < GpuPointLight > ,
98
+ buffer : StorageBuffer < ( ) , GpuPointLight > ,
99
99
} ,
100
100
}
101
101
@@ -116,7 +116,7 @@ impl GpuPointLights {
116
116
117
117
fn storage ( ) -> Self {
118
118
Self :: Storage {
119
- buffer : StorageVec :: default ( ) ,
119
+ buffer : StorageBuffer :: default ( ) ,
120
120
}
121
121
}
122
122
@@ -986,8 +986,8 @@ enum ViewClusterBuffers {
986
986
cluster_offsets_and_counts : UniformVec < [ UVec4 ; ViewClusterBindings :: MAX_UNIFORM_ITEMS ] > ,
987
987
} ,
988
988
Storage {
989
- cluster_light_index_lists : StorageVec < u32 > ,
990
- cluster_offsets_and_counts : StorageVec < UVec2 > ,
989
+ cluster_light_index_lists : StorageBuffer < ( ) , u32 > ,
990
+ cluster_offsets_and_counts : StorageBuffer < ( ) , UVec2 > ,
991
991
} ,
992
992
}
993
993
@@ -1009,8 +1009,8 @@ impl ViewClusterBuffers {
1009
1009
1010
1010
fn storage ( ) -> Self {
1011
1011
ViewClusterBuffers :: Storage {
1012
- cluster_light_index_lists : StorageVec :: default ( ) ,
1013
- cluster_offsets_and_counts : StorageVec :: default ( ) ,
1012
+ cluster_light_index_lists : StorageBuffer :: default ( ) ,
1013
+ cluster_offsets_and_counts : StorageBuffer :: default ( ) ,
1014
1014
}
1015
1015
}
1016
1016
}
@@ -1049,6 +1049,7 @@ impl ViewClusterBindings {
1049
1049
ViewClusterBuffers :: Storage {
1050
1050
cluster_light_index_lists,
1051
1051
cluster_offsets_and_counts,
1052
+ ..
1052
1053
} => {
1053
1054
cluster_light_index_lists. clear ( ) ;
1054
1055
cluster_offsets_and_counts. clear ( ) ;
@@ -1059,8 +1060,8 @@ impl ViewClusterBindings {
1059
1060
pub fn push_offset_and_count ( & mut self , offset : usize , count : usize ) {
1060
1061
match & mut self . buffers {
1061
1062
ViewClusterBuffers :: Uniform {
1062
- cluster_light_index_lists : _,
1063
1063
cluster_offsets_and_counts,
1064
+ ..
1064
1065
} => {
1065
1066
let array_index = self . n_offsets >> 2 ; // >> 2 is equivalent to / 4
1066
1067
if array_index >= Self :: MAX_UNIFORM_ITEMS {
@@ -1073,8 +1074,8 @@ impl ViewClusterBindings {
1073
1074
cluster_offsets_and_counts. get_mut ( 0 ) [ array_index] [ component] = packed;
1074
1075
}
1075
1076
ViewClusterBuffers :: Storage {
1076
- cluster_light_index_lists : _,
1077
1077
cluster_offsets_and_counts,
1078
+ ..
1078
1079
} => {
1079
1080
cluster_offsets_and_counts. push ( UVec2 :: new ( offset as u32 , count as u32 ) ) ;
1080
1081
}
@@ -1091,7 +1092,7 @@ impl ViewClusterBindings {
1091
1092
match & mut self . buffers {
1092
1093
ViewClusterBuffers :: Uniform {
1093
1094
cluster_light_index_lists,
1094
- cluster_offsets_and_counts : _ ,
1095
+ ..
1095
1096
} => {
1096
1097
let array_index = self . n_indices >> 4 ; // >> 4 is equivalent to / 16
1097
1098
let component = ( self . n_indices >> 2 ) & ( ( 1 << 2 ) - 1 ) ;
@@ -1103,7 +1104,7 @@ impl ViewClusterBindings {
1103
1104
}
1104
1105
ViewClusterBuffers :: Storage {
1105
1106
cluster_light_index_lists,
1106
- cluster_offsets_and_counts : _ ,
1107
+ ..
1107
1108
} => {
1108
1109
cluster_light_index_lists. push ( index as u32 ) ;
1109
1110
}
@@ -1135,24 +1136,24 @@ impl ViewClusterBindings {
1135
1136
match & self . buffers {
1136
1137
ViewClusterBuffers :: Uniform {
1137
1138
cluster_light_index_lists,
1138
- cluster_offsets_and_counts : _ ,
1139
+ ..
1139
1140
} => cluster_light_index_lists. binding ( ) ,
1140
1141
ViewClusterBuffers :: Storage {
1141
1142
cluster_light_index_lists,
1142
- cluster_offsets_and_counts : _ ,
1143
+ ..
1143
1144
} => cluster_light_index_lists. binding ( ) ,
1144
1145
}
1145
1146
}
1146
1147
1147
1148
pub fn offsets_and_counts_binding ( & self ) -> Option < BindingResource > {
1148
1149
match & self . buffers {
1149
1150
ViewClusterBuffers :: Uniform {
1150
- cluster_light_index_lists : _,
1151
1151
cluster_offsets_and_counts,
1152
+ ..
1152
1153
} => cluster_offsets_and_counts. binding ( ) ,
1153
1154
ViewClusterBuffers :: Storage {
1154
- cluster_light_index_lists : _,
1155
1155
cluster_offsets_and_counts,
1156
+ ..
1156
1157
} => cluster_offsets_and_counts. binding ( ) ,
1157
1158
}
1158
1159
}
0 commit comments