@@ -39,6 +39,39 @@ Bottom level categories:
39
39
40
40
## Unreleased
41
41
42
+ ### Major Changes
43
+
44
+ #### Querying shader compilation errors
45
+
46
+ Wgpu now supports querying [ shader compilation info] ( https://www.w3.org/TR/webgpu/#dom-gpushadermodule-getcompilationinfo ) .
47
+
48
+ This allows you to get more structured information about compilation errors, warnings and info:
49
+ ``` rust
50
+ ...
51
+ let lighting_shader = ctx . device. create_shader_module (include_wgsl! (" lighting.wgsl" ));
52
+ let compilation_info = lighting_shader . get_compilation_info (). await ;
53
+ for message in compilation_info
54
+ . messages
55
+ . iter ()
56
+ . filter (| m | m . message_type == wgpu :: CompilationMessageType :: Error )
57
+ {
58
+ let line = message . location. map (| l | l . line_number). unwrap_or (1 );
59
+ println! (" Compile error at line {line}" );
60
+ }
61
+ ```
62
+
63
+ By @stefnotch in [ #5410 ] ( https://github.com/gfx-rs/wgpu/pull/5410 )
64
+
65
+
66
+
67
+ ### New features
68
+
69
+ #### General
70
+
71
+ #### Naga
72
+
73
+ ### Bug Fixes
74
+
42
75
## v0.20.0 (2024-04-28)
43
76
44
77
### Major Changes
@@ -73,27 +106,6 @@ Due to a specification change `write_timestamp` is no longer supported on WebGPU
73
106
74
107
By @wumpf in [ #5188 ] ( https://github.com/gfx-rs/wgpu/pull/5188 )
75
108
76
- #### Querying shader compilation errors
77
-
78
- Wgpu now supports querying [ shader compilation info] ( https://www.w3.org/TR/webgpu/#dom-gpushadermodule-getcompilationinfo ) .
79
-
80
- This allows you to get more structured information about compilation errors, warnings and info:
81
- ``` rust
82
- ...
83
- let lighting_shader = ctx . device. create_shader_module (include_wgsl! (" lighting.wgsl" ));
84
- let compilation_info = lighting_shader . get_compilation_info (). await ;
85
- for message in compilation_info
86
- . messages
87
- . iter ()
88
- . filter (| m | m . message_type == wgpu :: CompilationMessageType :: Error )
89
- {
90
- let line = message . location. map (| l | l . line_number). unwrap_or (1 );
91
- println! (" Compile error at line {line}" );
92
- }
93
- ```
94
-
95
- By @stefnotch in [ #5410 ] ( https://github.com/gfx-rs/wgpu/pull/5410 )
96
-
97
109
98
110
#### Wgsl const evaluation for many more built-ins
99
111
0 commit comments