File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -673,9 +673,6 @@ impl Global {
673
673
bgl. exclusive_pipeline
674
674
. set ( binding_model:: ExclusivePipeline :: None )
675
675
. unwrap ( ) ;
676
-
677
- let bgl = Arc :: new ( bgl) ;
678
-
679
676
Ok ( bgl)
680
677
} ) ;
681
678
Original file line number Diff line number Diff line change @@ -1659,7 +1659,7 @@ impl<A: HalApi> Device<A> {
1659
1659
label : & crate :: Label ,
1660
1660
entry_map : bgl:: EntryMap ,
1661
1661
origin : bgl:: Origin ,
1662
- ) -> Result < BindGroupLayout < A > , binding_model:: CreateBindGroupLayoutError > {
1662
+ ) -> Result < Arc < BindGroupLayout < A > > , binding_model:: CreateBindGroupLayoutError > {
1663
1663
#[ derive( PartialEq ) ]
1664
1664
enum WritableStorage {
1665
1665
Yes ,
@@ -1858,15 +1858,19 @@ impl<A: HalApi> Device<A> {
1858
1858
. validate ( & self . limits )
1859
1859
. map_err ( binding_model:: CreateBindGroupLayoutError :: TooManyBindings ) ?;
1860
1860
1861
- Ok ( BindGroupLayout {
1861
+ let bgl = BindGroupLayout {
1862
1862
raw : Some ( raw) ,
1863
1863
device : self . clone ( ) ,
1864
1864
entries : entry_map,
1865
1865
origin,
1866
1866
exclusive_pipeline : OnceCell :: new ( ) ,
1867
1867
binding_count_validator : count_validator,
1868
1868
label : label. to_string ( ) ,
1869
- } )
1869
+ } ;
1870
+
1871
+ let bgl = Arc :: new ( bgl) ;
1872
+
1873
+ Ok ( bgl)
1870
1874
}
1871
1875
1872
1876
pub ( crate ) fn create_buffer_binding < ' a > (
@@ -2607,7 +2611,6 @@ impl<A: HalApi> Device<A> {
2607
2611
bgl:: Origin :: Derived ,
2608
2612
) {
2609
2613
Ok ( bgl) => {
2610
- let bgl = Arc :: new ( bgl) ;
2611
2614
e. insert ( bgl. clone ( ) ) ;
2612
2615
Ok ( bgl)
2613
2616
}
You can’t perform that action at this time.
0 commit comments