rev: e2b11990aa7cb7757946b5a0a9cdff3b5ac94182 scopes/testing/test_spirv_loop.sc -rw-r--r-- 579 bytes View raw Log this file
e2b11990aa7c — Leonard Ritter * SPIR-V: fixed `test_spirv_loop` and structured selection errors in validator 9 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
fn function-with-exception ()
    for k in (range 16)
        if (k == 5)
            raise;
    10

fn main ()
    #if true 1
    #elseif true 2
    #else 3
    try
        let count = (function-with-exception)
        for i j in (zip (range count) (range 16))
    except ()
        # error raised
    return;

let s =
    compile-spirv 'fragment
        typify main
        'O2
        'dump-disassembly
assert (not (empty? s))

compile-glsl 0 'fragment
    typify main
    'dump-module
    'dump-disassembly
    'no-debug-info
    #'O2

true