File: spv.coopmat_Error.comp

package info (click to toggle)
glslang 16.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 51,720 kB
  • sloc: cpp: 92,305; yacc: 4,320; sh: 603; python: 305; ansic: 94; javascript: 74; makefile: 17
file content (83 lines) | stat: -rw-r--r-- 2,157 bytes parent folder | download | duplicates (4)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#version 450 core
#extension GL_KHR_memory_scope_semantics : enable
#extension GL_NV_cooperative_matrix : enable
#extension GL_EXT_shader_explicit_arithmetic_types_float16 : enable

layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in;

float<16> ftemplate16;

fcoopmatNV fnoparams;

fcoopmatNV<8, gl_ScopeSubgroup, 8, 8> fbadbits;

fcoopmatNV<16, gl_ScopeSubgroup, 8> fbadnumparams;

int X = 8;

fcoopmatNV<16, gl_ScopeSubgroup, 8, X> fbadparam;

layout(constant_id = 0) int Y = 1;

shared fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sharedmat;

layout(set = 0, binding = 0) buffer InvBlock {
    fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> bufmat;
} invblock;

void main()
{
    fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> f32_16_8;
    fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> f16_16_8;

    // invalid implicit conversions
    f32_16_8 = f16_16_8;
    f32_16_8 = f16_16_8 + f16_16_8;

    fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> f16_8_8;

    // mismatching dimensions
    f16_16_8 = f16_8_8;

    fcoopmatNV<16, gl_ScopeSubgroup, 8, Y> f16_8_Y;
    fcoopmatNV<16, gl_ScopeSubgroup, 8, (Y+1)> f16_8_Y1;

    // mismatching dimensions with specialization constants
    f16_8_Y = f16_8_Y1;

    // wrong arguments for constructor
    f16_8_8 = fcoopmatNV<16, gl_ScopeSubgroup, 8, 8>(1, 1);

    // can't construct from a builtin type
    mat4 m4;
    fcoopmatNV<32, gl_ScopeSubgroup, 4, 4> f32_4_4 = fcoopmatNV<32, gl_ScopeSubgroup, 4, 4>(m4);

    // only support a single array subscript
    f16_16_8[0][0];

    // don't support scalar component selection
    f16_16_8.x;

    f16_16_8 * f16_16_8;

    f16_16_8 + 1.0;
    f16_16_8 - 1.0;
    f16_16_8 / 1.0;
    f16_16_8 += 1.0;
    f16_16_8 -= 1.0;
    f16_16_8 /= 1.0;

    f16_16_8*2.0;
    2.0*f16_16_8;
    f32_16_8*float16_t(2.0);
    float16_t(2.0)*f32_16_8;

    transpose(f16_8_8);

    //Buf[] argument needs be in Shared/StorageBuffer storage classes
    float16_t larr[16];
    fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> lvar;
    coopMatLoadNV(lvar, larr, 1, 2, false);
    coopMatStoreNV(lvar, larr, 1, 2, false);

}