Skip to content

Upgrade vello to version 0.5.0 and wgpu to version 25 #2890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mTvare6
Copy link
Collaborator

@mTvare6 mTvare6 commented Jul 16, 2025

@TrueDoctor
Copy link
Member

image Yeah, vello rendering is completely broken

Copy link

github-actions bot commented Jul 17, 2025

Performance Benchmark Results

compile_demo_art_iai::compile_group::compile_to_proto with_setup_0:load_from_name(isometric-fountain)
Instructions: 26,724,981 (master) -> 25,416,692 (HEAD) : $$\color{lime}-4.90\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     329,199|    314,603          -4.43%
D1mw                     104,440|     98,772          -5.43%
DLmr                      32,708|     29,358         -10.24%
DLmw                      44,975|     49,446          +9.94%
Dr                     6,483,261|  6,150,965          -5.13%
Dw                     4,584,981|  4,354,158          -5.03%
EstimatedCycles       42,096,665| 40,148,349          -4.63%
I1mr                      53,044|     45,861         -13.54%
ILmr                         874|        849          -2.86%
Ir                    26,724,981| 25,416,692          -4.90%
L1hits                37,306,540| 35,462,579          -4.94%
LLhits                   408,126|    379,583          -6.99%
RamHits                   78,557|     79,653          +1.40%
TotalRW               37,793,223| 35,921,815          -4.95%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_1:load_from_name(painted-dreams)
Instructions: 13,659,291 (master) -> 13,136,360 (HEAD) : $$\color{lime}-3.83\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     162,187|    157,299          -3.01%
D1mw                      51,273|     50,379          -1.74%
DLmr                         803|        500         -37.73%
DLmw                      16,427|     15,775          -3.97%
Dr                     3,315,096|  3,181,385          -4.03%
Dw                     2,334,112|  2,242,364          -3.93%
EstimatedCycles       20,800,427| 19,990,031          -3.90%
I1mr                      24,807|     22,265         -10.25%
ILmr                         732|        730          -0.27%
Ir                    13,659,291| 13,136,360          -3.83%
L1hits                19,070,232| 18,330,166          -3.88%
LLhits                   220,305|    212,938          -3.34%
RamHits                   17,962|     17,005          -5.33%
TotalRW               19,308,499| 18,560,109          -3.88%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_2:load_from_name(procedural-string-lights)
Instructions: 2,265,794 (master) -> 2,206,882 (HEAD) : $$\color{lime}-2.60\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                      23,616|     22,758          -3.63%
D1mw                      10,909|     10,844          -0.60%
DLmr                          20|         16         -20.00%
DLmw                       1,962|      1,288         -34.35%
Dr                       523,641|    510,132          -2.58%
Dw                       382,670|    372,515          -2.65%
EstimatedCycles        3,413,065|  3,303,897          -3.20%
I1mr                       5,465|      4,885         -10.61%
ILmr                         718|        710          -1.11%
Ir                     2,265,794|  2,206,882          -2.60%
L1hits                 3,132,115|  3,051,042          -2.59%
LLhits                    37,290|     36,473          -2.19%
RamHits                    2,700|      2,014         -25.41%
TotalRW                3,172,105|  3,089,529          -2.60%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_3:load_from_name(parametric-dunescape)
Instructions: 14,822,198 (master) -> 14,462,252 (HEAD) : $$\color{lime}-2.43\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     192,286|    186,720          -2.89%
D1mw                      67,462|     65,760          -2.52%
DLmr                          73|         54         -26.03%
DLmw                      18,146|     17,309          -4.61%
Dr                     3,566,481|  3,465,637          -2.83%
Dw                     2,550,976|  2,481,699          -2.72%
EstimatedCycles       22,633,933| 22,045,440          -2.60%
I1mr                      20,774|     19,938          -4.02%
ILmr                         854|        843          -1.29%
Ir                    14,822,198| 14,462,252          -2.43%
L1hits                20,659,133| 20,137,170          -2.53%
LLhits                   261,449|    254,212          -2.77%
RamHits                   19,073|     18,206          -4.55%
TotalRW               20,939,655| 20,409,588          -2.53%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_4:load_from_name(red-dress)
Instructions: 32,236,970 (master) -> 30,724,221 (HEAD) : $$\color{lime}-4.69\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     409,947|    392,875          -4.16%
D1mw                     135,537|    129,503          -4.45%
DLmr                      46,366|     42,373          -8.61%
DLmw                      63,034|     57,127          -9.37%
Dr                     7,756,150|  7,378,854          -4.86%
Dw                     5,501,022|  5,233,730          -4.86%
EstimatedCycles       51,217,926| 48,635,485          -5.04%
I1mr                      58,362|     49,562         -15.08%
ILmr                         880|        864          -1.82%
Ir                    32,236,970| 30,724,221          -4.69%
L1hits                44,890,296| 42,764,865          -4.73%
LLhits                   493,566|    471,576          -4.46%
RamHits                  110,280|    100,364          -8.99%
TotalRW               45,494,142| 43,336,805          -4.74%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_5:load_from_name(valley-of-spires)
Instructions: 20,278,588 (master) -> 19,253,627 (HEAD) : $$\color{lime}-5.05\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     250,978|    236,869          -5.62%
D1mw                      80,681|     77,061          -4.49%
DLmr                      14,774|     12,659         -14.32%
DLmw                      31,319|     29,047          -7.25%
Dr                     4,903,729|  4,645,938          -5.26%
Dw                     3,470,431|  3,289,935          -5.20%
EstimatedCycles       31,544,292| 29,857,052          -5.35%
I1mr                      39,522|     34,283         -13.26%
ILmr                         801|        784          -2.12%
Ir                    20,278,588| 19,253,627          -5.05%
L1hits                28,281,567| 26,841,287          -5.09%
LLhits                   324,287|    305,723          -5.72%
RamHits                   46,894|     42,490          -9.39%
TotalRW               28,652,748| 27,189,500          -5.11%

@@ -105,12 +121,39 @@ impl WgpuExecutor {
#[cfg(target_arch = "wasm32")]
pub fn create_surface(&self, canvas: graphene_application_io::WasmSurfaceHandle) -> Result<SurfaceHandle<Surface>> {
let surface = self.context.instance.create_surface(wgpu::SurfaceTarget::Canvas(canvas.surface))?;
let size = UVec2::ZERO;
Copy link
Collaborator

@Firestar99 Firestar99 Jul 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In wasm we're rendering to a texture of size 0...

Now I don't know why, but this code sometimes works for me on FF nightly anyway. (inconsistent)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed it, but the other resolution was already set to zero, which is why I used that.

@Firestar99
Copy link
Collaborator

Firestar99 commented Jul 17, 2025

Uncaptured WebGPU error: In a set_pipeline command, caused by: Render pipeline targets are incompatible with render pass, caused by: Incompatible color attachments at indices [0]: the RenderPass uses textures with formats [Some(Rgba8Unorm)] but the RenderPipeline with 'wgpu::uti::TextureBlitter::pipeline' label uses attachments with formats [Some(Bgra8Unorm)]

let capabilities = surface.get_capabilities(&self.context.adapter);
let format = capabilities
.formats
.into_iter()
.find(|it| matches!(it, TextureFormat::Rgba8Unorm | TextureFormat::Bgra8Unorm))
.ok_or(Error::UnsupportedSurfaceFormat)?;

@mTvare6 I think you are misunderstanding what surface capabilities are. They are just reporting the many formats the surface is capable of, not what a surface "is". When you creates a texture from a surface (with surface.configure()), you chooses one of the texture formats the surface is capable of, and then the texture is of that format. And that chosen format is the one you need to give to TextureBlitter. In our case, hardcoded to Rgba8Unorm (which in theory could break if some impl doesn't support that format, but in practice all impl support Rgba8Unorm and Rgba8Srgb).

Will try to fix it

@Firestar99
Copy link
Collaborator

@TrueDoctor feel free to retest

Copy link

github-actions bot commented Jul 17, 2025

Performance Benchmark Results

compile_demo_art_iai::compile_group::compile_to_proto with_setup_0:load_from_name(isometric-fountain)
Instructions: 26,727,520 (master) -> 25,411,717 (HEAD) : $$\color{lime}-4.92\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     329,386|    314,882          -4.40%
D1mw                     104,464|     98,767          -5.45%
DLmr                      32,707|     29,357         -10.24%
DLmw                      44,949|     49,444         +10.00%
Dr                     6,483,629|  6,150,343          -5.14%
Dw                     4,585,074|  4,354,156          -5.04%
EstimatedCycles       42,099,665| 40,143,756          -4.65%
I1mr                      53,043|     45,861         -13.54%
ILmr                         873|        849          -2.75%
Ir                    26,727,520| 25,411,717          -4.92%
L1hits                37,309,330| 35,456,706          -4.97%
LLhits                   408,364|    379,860          -6.98%
RamHits                   78,529|     79,650          +1.43%
TotalRW               37,796,223| 35,916,216          -4.97%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_1:load_from_name(painted-dreams)
Instructions: 13,656,830 (master) -> 13,135,907 (HEAD) : $$\color{lime}-3.81\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     162,008|    157,360          -2.87%
D1mw                      51,267|     50,371          -1.75%
DLmr                         805|        504         -37.39%
DLmw                      16,434|     15,774          -4.02%
Dr                     3,314,764|  3,181,280          -4.03%
Dw                     2,333,971|  2,242,376          -3.92%
EstimatedCycles       20,797,023| 19,989,753          -3.88%
I1mr                      24,807|     22,264         -10.25%
ILmr                         732|        729          -0.41%
Ir                    13,656,830| 13,135,907          -3.81%
L1hits                19,067,483| 18,329,568          -3.87%
LLhits                   220,111|    212,988          -3.24%
RamHits                   17,971|     17,007          -5.36%
TotalRW               19,305,565| 18,559,563          -3.86%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_2:load_from_name(procedural-string-lights)
Instructions: 2,265,389 (master) -> 2,207,136 (HEAD) : $$\color{lime}-2.57\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                      23,653|     22,769          -3.74%
D1mw                      10,909|     10,839          -0.64%
DLmr                          20|         16         -20.00%
DLmw                       1,964|      1,290         -34.32%
Dr                       523,570|    510,209          -2.55%
Dw                       382,675|    372,565          -2.64%
EstimatedCycles        3,412,836|  3,304,362          -3.18%
I1mr                       5,466|      4,885         -10.63%
ILmr                         719|        710          -1.25%
Ir                     2,265,389|  2,207,136          -2.57%
L1hits                 3,131,606|  3,051,417          -2.56%
LLhits                    37,325|     36,477          -2.27%
RamHits                    2,703|      2,016         -25.42%
TotalRW                3,171,634|  3,089,910          -2.58%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_3:load_from_name(parametric-dunescape)
Instructions: 14,823,433 (master) -> 14,462,302 (HEAD) : $$\color{lime}-2.44\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     192,120|    186,741          -2.80%
D1mw                      67,372|     65,754          -2.40%
DLmr                          73|         54         -26.03%
DLmw                      18,142|     17,305          -4.61%
Dr                     3,566,621|  3,465,652          -2.83%
Dw                     2,550,937|  2,481,711          -2.71%
EstimatedCycles       22,634,125| 22,045,491          -2.60%
I1mr                      20,774|     19,939          -4.02%
ILmr                         854|        844          -1.17%
Ir                    14,823,433| 14,462,302          -2.44%
L1hits                20,660,725| 20,137,231          -2.53%
LLhits                   261,197|    254,231          -2.67%
RamHits                   19,069|     18,203          -4.54%
TotalRW               20,940,991| 20,409,665          -2.54%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_4:load_from_name(red-dress)
Instructions: 32,239,904 (master) -> 30,724,889 (HEAD) : $$\color{lime}-4.70\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     410,067|    392,925          -4.18%
D1mw                     135,460|    129,428          -4.45%
DLmr                      46,364|     42,371          -8.61%
DLmw                      63,035|     57,131          -9.37%
Dr                     7,756,670|  7,378,835          -4.87%
Dw                     5,501,138|  5,233,650          -4.86%
EstimatedCycles       51,221,638| 48,636,014          -5.05%
I1mr                      58,362|     49,562         -15.08%
ILmr                         880|        864          -1.82%
Ir                    32,239,904| 30,724,889          -4.70%
L1hits                44,893,823| 42,765,459          -4.74%
LLhits                   493,610|    471,549          -4.47%
RamHits                  110,279|    100,366          -8.99%
TotalRW               45,497,712| 43,337,374          -4.75%

compile_demo_art_iai::compile_group::compile_to_proto with_setup_5:load_from_name(valley-of-spires)
Instructions: 20,277,454 (master) -> 19,254,845 (HEAD) : $$\color{lime}-5.04\%$$

Detailed metrics
Baselines:                master|       HEAD
D1mr                     250,993|    236,816          -5.65%
D1mw                      80,639|     76,966          -4.55%
DLmr                      14,765|     12,662         -14.24%
DLmw                      31,320|     29,059          -7.22%
Dr                     4,903,535|  4,646,072          -5.25%
Dw                     3,470,380|  3,289,929          -5.20%
EstimatedCycles       31,542,565| 29,858,256          -5.34%
I1mr                      39,522|     34,283         -13.26%
ILmr                         801|        784          -2.12%
Ir                    20,277,454| 19,254,845          -5.04%
L1hits                28,280,215| 26,842,781          -5.08%
LLhits                   324,268|    305,560          -5.77%
RamHits                   46,886|     42,505          -9.34%
TotalRW               28,651,369| 27,190,846          -5.10%

@TrueDoctor
Copy link
Member

@TrueDoctor feel free to retest

Seems to work fine now

@Firestar99
Copy link
Collaborator

Anything blocking this from merging? Or do you want to properly retest everything before this is merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants