File tree 3 files changed +9
-2
lines changed 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -35,5 +35,6 @@ void main() {
35
35
const vec4 from_input_array = in_array[1 ];
36
36
const float a = array_2d[0 ][0 ];
37
37
const float b = array_toomanyd[0 ][0 ][0 ][0 ][0 ][0 ][0 ];
38
+ const LightScatteringParams light_scattering_params;
38
39
out_array[0 ] = vec4 (2.0 );
39
40
}
Original file line number Diff line number Diff line change @@ -2861,7 +2861,12 @@ fn compaction_preserves_spans() {
2861
2861
var x: array<i32,1>;
2862
2862
var y = x[1.0];
2863
2863
}
2864
- "# ; // ^^^ correct error span: 108..114
2864
+ @compute @workgroup_size(1)
2865
+ fn main() {
2866
+ f();
2867
+ }
2868
+ "# ;
2869
+ // The error span should be on `x[1.0]`, which is at characters 108..114.
2865
2870
let mut module = naga:: front:: wgsl:: parse_str ( source) . expect ( "source ought to parse" ) ;
2866
2871
naga:: compact:: compact ( & mut module) ;
2867
2872
let err = naga:: valid:: Validator :: new (
@@ -2878,7 +2883,7 @@ fn compaction_preserves_spans() {
2878
2883
// The first span is the whole function.
2879
2884
let _ = spans. next ( ) . expect ( "error should have at least one span" ) ;
2880
2885
2881
- // The second span is the assignment destination .
2886
+ // The second span is the invalid indexing expression .
2882
2887
let dest_span = spans
2883
2888
. next ( )
2884
2889
. expect ( "error should have at least two spans" )
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ fn main_1() {
43
43
var from_input_array : vec4 <f32 >;
44
44
var a_1 : f32 ;
45
45
var b : f32 ;
46
+ var light_scattering_params : LightScatteringParams ;
46
47
47
48
let _e17 = in_array_2 [1 ];
48
49
from_input_array = _e17 ;
You can’t perform that action at this time.
0 commit comments