Skip to content

Commit 08efa72

Browse files
Wumpfteoxoy
authored andcommitted
move shader compilation error query out of 0.20 changelog - it didn't get released with it
1 parent 90e7060 commit 08efa72

File tree

1 file changed

+33
-21
lines changed

1 file changed

+33
-21
lines changed

CHANGELOG.md

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,39 @@ Bottom level categories:
3939

4040
## Unreleased
4141

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+
4275
## v0.20.0 (2024-04-28)
4376

4477
### Major Changes
@@ -73,27 +106,6 @@ Due to a specification change `write_timestamp` is no longer supported on WebGPU
73106

74107
By @wumpf in [#5188](https://github.com/gfx-rs/wgpu/pull/5188)
75108

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-
97109

98110
#### Wgsl const evaluation for many more built-ins
99111

0 commit comments

Comments
 (0)