rev: eeadb6082f44956592d11d79c659cb265ac9d9d3 scopes/testing/test_spirv_loop.sc -rw-r--r-- 629 bytes View raw Log this file
eeadb6082f44 — Leonard Ritter * SPIR-V: fixed unstructured branch validation error for `if/elseif/else` construct 7 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
35
36
37
fn function-with-exception ()
    for k in (range 16)
        if (k == 5)
            raise;
    10

fn unconst (x) x

fn main ()
    if true 1
    elseif ((let k = (unconst 1)) == 1)
        k
    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