@@ -18,7 +18,7 @@ use crate::{
18
18
float:: Float ,
19
19
integer:: Integer ,
20
20
vector:: { Vector , VectorTypeRef } ,
21
- Sampler ,
21
+ Sampler , VectorFromVector ,
22
22
} ;
23
23
24
24
/// Re-export of primitive types to ensure the `Image` proc macro always points
@@ -124,10 +124,8 @@ impl<
124
124
/// Fetch a single texel with a sampler set at compile time
125
125
#[ crate :: macros:: gpu_only]
126
126
#[ doc( alias = "OpImageFetch" ) ]
127
- pub fn fetch < I , C , const N : usize > (
128
- & self ,
129
- coordinate : C ,
130
- ) -> <<C >:: VectorTypeLib as VectorTypeRef < SampledType , 4 > >:: Vector
127
+ pub fn fetch < I , C , const N : usize > ( & self , coordinate : C ) -> VectorFromVector ! ( C , SampledType , 4 )
128
+ //<<C>::VectorTypeLib as VectorTypeRef<SampledType, 4>>::Vector
131
129
where
132
130
I : Integer ,
133
131
C : ImageCoordinate < I , DIM , ARRAYED > + Vector < I , N > ,
@@ -168,7 +166,7 @@ impl<
168
166
sampler : Sampler ,
169
167
coordinate : C ,
170
168
component : u32 ,
171
- ) -> < C :: VectorTypeLib as VectorTypeRef < SampledType , 4 > > :: Vector
169
+ ) -> VectorFromVector ! ( C , SampledType , 4 )
172
170
where
173
171
Self : HasGather ,
174
172
F : Float ,
@@ -201,7 +199,7 @@ impl<
201
199
& self ,
202
200
sampler : Sampler ,
203
201
coord : C ,
204
- ) -> < C :: VectorTypeLib as VectorTypeRef < SampledType , 4 > > :: Vector
202
+ ) -> VectorFromVector ! ( C , SampledType , 4 )
205
203
where
206
204
F : Float ,
207
205
C : ImageCoordinate < F , DIM , ARRAYED > + Vector < F , N > ,
@@ -234,7 +232,7 @@ impl<
234
232
sampler : Sampler ,
235
233
coord : C ,
236
234
bias : f32 ,
237
- ) -> < C :: VectorTypeLib as VectorTypeRef < SampledType , 4 > > :: Vector
235
+ ) -> VectorFromVector ! ( C , SampledType , 4 )
238
236
where
239
237
F : Float ,
240
238
C : ImageCoordinate < F , DIM , ARRAYED > + Vector < F , N > ,
@@ -269,7 +267,7 @@ impl<
269
267
sampler : Sampler ,
270
268
coordinate : C ,
271
269
lod : f32 ,
272
- ) -> < C :: VectorTypeLib as VectorTypeRef < SampledType , 4 > > :: Vector
270
+ ) -> VectorFromVector ! ( C , SampledType , 4 )
273
271
where
274
272
F : Float ,
275
273
C : ImageCoordinate < F , DIM , ARRAYED > + Vector < F , N > ,
@@ -304,7 +302,7 @@ impl<
304
302
coordinate : C ,
305
303
gradient_dx : impl ImageCoordinate < F , DIM , { Arrayed :: False as u32 } > ,
306
304
gradient_dy : impl ImageCoordinate < F , DIM , { Arrayed :: False as u32 } > ,
307
- ) -> < C :: VectorTypeLib as VectorTypeRef < SampledType , 4 > > :: Vector
305
+ ) -> VectorFromVector ! ( C , SampledType , 4 )
308
306
where
309
307
F : Float ,
310
308
C : ImageCoordinate < F , DIM , ARRAYED > + Vector < F , N > ,
@@ -463,7 +461,7 @@ impl<
463
461
& self ,
464
462
sampler : Sampler ,
465
463
project_coordinate : C ,
466
- ) -> < C :: VectorTypeLib as VectorTypeRef < SampledType , 4 > > :: Vector
464
+ ) -> VectorFromVector ! ( C , SampledType , 4 )
467
465
where
468
466
F : Float ,
469
467
C : ImageCoordinate < F , DIM , { Arrayed :: True as u32 } > + Vector < F , N > ,
@@ -495,7 +493,7 @@ impl<
495
493
sampler : Sampler ,
496
494
project_coordinate : C ,
497
495
lod : f32 ,
498
- ) -> < C :: VectorTypeLib as VectorTypeRef < SampledType , 4 > > :: Vector
496
+ ) -> VectorFromVector ! ( C , SampledType , 4 )
499
497
where
500
498
F : Float ,
501
499
C : ImageCoordinate < F , DIM , { Arrayed :: True as u32 } > + Vector < F , N > ,
@@ -530,7 +528,7 @@ impl<
530
528
project_coordinate : C ,
531
529
gradient_dx : impl ImageCoordinate < F , DIM , { Arrayed :: False as u32 } > ,
532
530
gradient_dy : impl ImageCoordinate < F , DIM , { Arrayed :: False as u32 } > ,
533
- ) -> < C :: VectorTypeLib as VectorTypeRef < SampledType , 4 > > :: Vector
531
+ ) -> VectorFromVector ! ( C , SampledType , 4 )
534
532
where
535
533
F : Float ,
536
534
C : ImageCoordinate < F , DIM , { Arrayed :: True as u32 } > + Vector < F , N > ,
@@ -677,10 +675,7 @@ impl<
677
675
/// Read a texel from an image without a sampler.
678
676
#[ crate :: macros:: gpu_only]
679
677
#[ doc( alias = "OpImageRead" ) ]
680
- pub fn read < I , C , const N : usize > (
681
- & self ,
682
- coordinate : C ,
683
- ) -> <C :: VectorTypeLib as VectorTypeRef < SampledType , 4 > >:: Vector
678
+ pub fn read < I , C , const N : usize > ( & self , coordinate : C ) -> VectorFromVector ! ( C , SampledType , 4 )
684
679
where
685
680
I : Integer ,
686
681
C : ImageCoordinate < I , DIM , ARRAYED > + Vector < I , N > ,
@@ -737,10 +732,7 @@ impl<
737
732
/// Read a texel from an image without a sampler.
738
733
#[ crate :: macros:: gpu_only]
739
734
#[ doc( alias = "OpImageRead" ) ]
740
- pub fn read < I , C , const N : usize > (
741
- & self ,
742
- coordinate : C ,
743
- ) -> <C :: VectorTypeLib as VectorTypeRef < SampledType , 4 > >:: Vector
735
+ pub fn read < I , C , const N : usize > ( & self , coordinate : C ) -> VectorFromVector ! ( C , SampledType , 4 )
744
736
where
745
737
I : Integer ,
746
738
C : ImageCoordinate < I , DIM , ARRAYED > + Vector < I , N > ,
@@ -809,7 +801,7 @@ impl<
809
801
pub fn read_subpass < I , C , const N : usize > (
810
802
& self ,
811
803
coordinate : C ,
812
- ) -> < C :: VectorTypeLib as VectorTypeRef < SampledType , 4 > > :: Vector
804
+ ) -> VectorFromVector ! ( C , SampledType , 4 )
813
805
where
814
806
I : Integer ,
815
807
C : ImageCoordinateSubpassData < I , ARRAYED > + Vector < I , N > ,
@@ -872,7 +864,7 @@ impl<
872
864
& self ,
873
865
sampler : Sampler ,
874
866
coord : C ,
875
- ) -> < C :: VectorTypeLib as VectorTypeRef < SampledType , 2 > > :: Vector
867
+ ) -> VectorFromVector ! ( C , SampledType , 2 )
876
868
where
877
869
Self : HasQueryLevels ,
878
870
C : ImageCoordinate < f32 , DIM , { Arrayed :: False as u32 } > + Vector < f32 , N > ,
@@ -1023,7 +1015,7 @@ impl<
1023
1015
pub unsafe fn sample < F , C , const N : usize > (
1024
1016
& self ,
1025
1017
coord : C ,
1026
- ) -> < C :: VectorTypeLib as VectorTypeRef < SampledType , 4 > > :: Vector
1018
+ ) -> VectorFromVector ! ( C , SampledType , 4 )
1027
1019
where
1028
1020
F : Float ,
1029
1021
C : ImageCoordinate < F , DIM , ARRAYED > + Vector < F , N > ,
@@ -1052,7 +1044,7 @@ impl<
1052
1044
& self ,
1053
1045
coord : C ,
1054
1046
lod : f32 ,
1055
- ) -> < C :: VectorTypeLib as VectorTypeRef < SampledType , 4 > > :: Vector
1047
+ ) -> VectorFromVector ! ( C , SampledType , 4 )
1056
1048
where
1057
1049
F : Float ,
1058
1050
C : ImageCoordinate < F , DIM , ARRAYED > + Vector < F , N > ,
0 commit comments