Right now the GLSL compiler eats precision qualifiers and detects basic parsing errors but it does not anything with them beyond that. This series adds:
1. Default precision values for the types specified in the spec (patches 1-2) 2. Proper tracking of precision statements for each scope (patch 3) 3. Inclusion of precision information in ir_variable considering type qualifiers and default precision statements (patch 4) 4. Compile-time errors when no precision qualifier is used for float, integer and sampler types and no default precision qualifier is set (patch 4) 5. Link-time checks for uniform/global variables (patch 5). This fixes a small set of dEQP tests that check this behavior. Patch 6 disallows precision qualifiers on structs, since that is not valid. Notice that this does not implement all the necessary bits to fully incorporate precision information into the IR, it only adds the stuff we need to handle copile-time and link-time errors. The missing stuff would involve including precision information in ir_rvalue, expresions, etc but this can be added later. I ran series this against piglit and deqp and observed no regressions. Iago Toral Quiroga (6): glsl: Add API to put default precision qualifiers in the symbol table glsl: Add default precision qualifiers to the symbol table glsl: Add user-defined default precision qualifiers to the symbol table glsl: Add precision information to ir_variable glsl: Add link time checks for GLSL precision qualifiers glsl: Precision qualifiers are not allowed on structs src/glsl/ast_to_hir.cpp | 317 ++++++++++++++++++++++++++++++++--------- src/glsl/glsl_parser.yy | 12 ++ src/glsl/glsl_symbol_table.cpp | 24 ++++ src/glsl/glsl_symbol_table.h | 2 + src/glsl/glsl_types.cpp | 4 + src/glsl/glsl_types.h | 12 ++ src/glsl/ir.h | 13 ++ src/glsl/linker.cpp | 48 +++++-- 8 files changed, 353 insertions(+), 79 deletions(-) -- 1.9.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev