@@ -426,7 +426,7 @@ impl Node for MipGenerationNode {
426426 } ;
427427 let Some ( mip_generation_pipelines) = mip_generation_bind_groups
428428 . pipelines
429- . get ( & gpu_image. texture_format )
429+ . get ( & gpu_image. texture_descriptor . format )
430430 else {
431431 continue ;
432432 } ;
@@ -458,8 +458,8 @@ impl Node for MipGenerationNode {
458458 & [ ] ,
459459 ) ;
460460 compute_pass_1. dispatch_workgroups (
461- gpu_image. size . width . div_ceil ( 64 ) ,
462- gpu_image. size . height . div_ceil ( 64 ) ,
461+ gpu_image. texture_descriptor . size . width . div_ceil ( 64 ) ,
462+ gpu_image. texture_descriptor . size . height . div_ceil ( 64 ) ,
463463 1 ,
464464 ) ;
465465 pass_span. end ( & mut compute_pass_1) ;
@@ -482,8 +482,8 @@ impl Node for MipGenerationNode {
482482 & [ ] ,
483483 ) ;
484484 compute_pass_2. dispatch_workgroups (
485- gpu_image. size . width . div_ceil ( 256 ) ,
486- gpu_image. size . height . div_ceil ( 256 ) ,
485+ gpu_image. texture_descriptor . size . width . div_ceil ( 256 ) ,
486+ gpu_image. texture_descriptor . size . height . div_ceil ( 256 ) ,
487487 1 ,
488488 ) ;
489489 pass_span. end ( & mut compute_pass_2) ;
@@ -538,7 +538,7 @@ fn prepare_mip_generator_pipelines(
538538 & pipeline_cache,
539539 & downsample_shaders,
540540 & mut mip_generation_pipelines. pipelines ,
541- gpu_image. texture_format ,
541+ gpu_image. texture_descriptor . format ,
542542 mip_generation_job,
543543 combine_downsampling_bind_groups,
544544 ) else {
@@ -786,7 +786,7 @@ fn create_downsampling_bind_groups(
786786 label : Some ( "mip generation input texture view, pass 2" ) ,
787787 format : Some ( gpu_image. texture . format ( ) ) ,
788788 dimension : Some ( TextureViewDimension :: D2 ) ,
789- base_mip_level : gpu_image. mip_level_count . min ( 6 ) ,
789+ base_mip_level : gpu_image. texture_descriptor . mip_level_count . min ( 6 ) ,
790790 mip_level_count : Some ( 1 ) ,
791791 ..default ( )
792792 } ) ;
@@ -892,10 +892,10 @@ fn create_downsampling_constants_buffer(
892892 gpu_image : & GpuImage ,
893893) -> UniformBuffer < DownsamplingConstants > {
894894 let downsampling_constants = DownsamplingConstants {
895- mips : gpu_image. mip_level_count ,
895+ mips : gpu_image. texture_descriptor . mip_level_count ,
896896 inverse_input_size : vec2 (
897- 1.0 / gpu_image. size . width as f32 ,
898- 1.0 / gpu_image. size . height as f32 ,
897+ 1.0 / gpu_image. texture_descriptor . size . width as f32 ,
898+ 1.0 / gpu_image. texture_descriptor . size . height as f32 ,
899899 ) ,
900900 _padding : 0 ,
901901 } ;
@@ -914,13 +914,13 @@ fn get_mip_storage_view(
914914) -> TextureView {
915915 // If `level` represents an actual mip level of the image, return a view to
916916 // it.
917- if level < gpu_image. mip_level_count {
917+ if level < gpu_image. texture_descriptor . mip_level_count {
918918 return gpu_image. texture . create_view ( & TextureViewDescriptor {
919919 label : Some ( & * format ! (
920920 "mip downsampling storage view {}/{}" ,
921- level, gpu_image. mip_level_count
921+ level, gpu_image. texture_descriptor . mip_level_count
922922 ) ) ,
923- format : Some ( gpu_image. texture_format ) ,
923+ format : Some ( gpu_image. texture_descriptor . format ) ,
924924 dimension : Some ( TextureViewDimension :: D2 ) ,
925925 aspect : TextureAspect :: All ,
926926 base_mip_level : level,
@@ -936,7 +936,7 @@ fn get_mip_storage_view(
936936 let dummy_texture = render_device. create_texture ( & TextureDescriptor {
937937 label : Some ( & * format ! (
938938 "mip downsampling dummy storage view {}/{}" ,
939- level, gpu_image. mip_level_count
939+ level, gpu_image. texture_descriptor . mip_level_count
940940 ) ) ,
941941 size : Extent3d {
942942 width : 1 ,
@@ -946,7 +946,7 @@ fn get_mip_storage_view(
946946 mip_level_count : 1 ,
947947 sample_count : 1 ,
948948 dimension : TextureDimension :: D2 ,
949- format : gpu_image. texture_format ,
949+ format : gpu_image. texture_descriptor . format ,
950950 usage : TextureUsages :: STORAGE_BINDING | TextureUsages :: TEXTURE_BINDING ,
951951 view_formats : & [ ] ,
952952 } ) ;
0 commit comments