WebGPU and the Price of Compiling WGSL

Welcome, in the previous two posts I went looking for the WGSL limits (both in the spec , and also out of it ). In this post I want to introduce a simple WebGPU app where you can create WGSL shaders by dragging some sliders to increase their complexity. The idea is that compilation time and complexity can be known for the compute and rendering pipelines as well as in their different stages (vertex and fragment). This is important to me because I wanted to know how much it costs to increase the shader complexity and where it might be worth to start considering using buffers/textures for some of it. How long does it take to compile a 3Megabyte vertex shader? Easy to know, here is the single result of the cold timings in Chrome (140.0.7339.215) from my Intel MacBook Pro (2019): How about a…

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论