aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/TODO
blob: b2baa130786087319cbd0b45d7eac690d5f105a4 (plain)
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
- Handle currently unsupported constant expression types
  - ir_unop_sign
  - ir_unop_exp2
  - ir_unop_log2
  - ir_unop_u2f
  - ir_unop_trunc
  - ir_unop_ceil
  - ir_unop_floor
  - ir_unop_sin
  - ir_unop_cos
  - ir_binop_min
  - ir_binop_max
  - ir_binop_pow

- Handle constant expressions of (struct == struct)

- Handle constant expressions of (struct != struct)

- Add support to ir_constant for array constants Arrays can only be
  - declared 'const' in GLSL 1.20+.  This is because there are no
    array constructors in GLSL 1.10, and any variable declared as
    'const' must have an initializer.

- Handle constant expressions of (array == array)

- Handle constant expressions of (array != array)

- Treat built-in functions with constant parameters as constant expressions.
  - Rewrite all built-in functions return a single expression.
  - Modify the HIR generator for functions to automatically inline built-in
    functions durning translation.
  - Care must be taken to handle both the 1.10 rules and the 1.20+ rules.  In
    1.10, built-in functions cannot be constant expressions.

- Detect code paths in non-void functions that don't reach a return statement

- Handle over-riding built-in functions
  - Is the overload per-compilation unit or per-linked shader?

- Handle redeclaration of built-in variables
  - Handle addition of qualifiers such as 'invariant' or 'centroid'.
  - Handle resizing of arrays.
  - Other?  We'll have to look at the spec.

- Improve handling of constants and their initializers.  Constant initializers
  should never generate any code.  This is trival for scalar constants.  It is
  also trivial for arrays, matrices, and vectors that are accessed with
  constant index values.  For others it is more complicated.  Perhaps these
  cases should be silently converted to uniforms?

1.30 features:

- Implement AST-to-HIR conversion of bit-shift operators.

- Implement AST-to-HIR conversion of bit-wise {&,|,^,!} operators.

- Implement AST-to-HIR conversion of switch-statements
  - switch
  - case
  - Update break to correcly handle mixed nexting of switch-statements
    and loops.

- Handle currently unsupported constant expression types
  - ir_unop_bit_not
  - ir_binop_mod
  - ir_binop_lshift
  - ir_binop_rshift
  - ir_binop_bit_and
  - ir_binop_bit_xor
  - ir_binop_bit_or

- Implement support for 1.30 style shadow compares which only return a float
  instead of a vec4.