X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglsl%2FTODO;h=eb73fc2e8132871b1ca7abb07b4f9b8568ef8c6f;hb=6a829a1b724ca0d960decee217d260b4de8a5463;hp=193cfc767d87b7d03361fcc7011eecae5a340cea;hpb=29285882676388aacff123e8bdf025904abf8ea9;p=mesa.git diff --git a/src/glsl/TODO b/src/glsl/TODO index 193cfc767d8..eb73fc2e813 100644 --- a/src/glsl/TODO +++ b/src/glsl/TODO @@ -1,60 +1,4 @@ -- Implement AST-to-HIR conversion of discard instructions. - -- Handle constant expressions of (matrix {+,-,*,/} scalar) - -- Handle constant expressions of (vector {+,-,*,/} scalar) - -- Handle constant expressions of (matrix * vector) - -- Handle constant expressions of (matrix * matrix) - -- 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_dot - - 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 non-void functions that lack a return statement - -- Detect return statements with a type not matching the funciton's - return type. - -- 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. +- Detect code paths in non-void functions that don't reach a return statement - Improve handling of constants and their initializers. Constant initializers should never generate any code. This is trival for scalar constants. It is @@ -62,23 +6,10 @@ 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. +- Implement support for ir_binop_dot in opt_algebraic.cpp. Perform + transformations such as "dot(v, vec3(0.0, 1.0, 0.0))" -> v.y. -- 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 +- Track source locations throughout the IR. There are currently several + places where we cannot emit line numbers for errors (and currently emit 0:0) + because we've "lost" the line number information. This is particularly + noticeable at link time.