glsl: handle int16 and uint16 types and add instructions for mediump

v2: add more changes to ir_validate.cpp

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
This commit is contained in:
Marek Olšák
2020-05-08 22:16:42 -04:00
committed by Marge Bot
parent 9c14a87839
commit a052a9c277
12 changed files with 445 additions and 73 deletions

View File

@@ -495,6 +495,8 @@ void ir_print_visitor::visit(ir_constant *ir)
if (i != 0)
fprintf(f, " ");
switch (ir->type->base_type) {
case GLSL_TYPE_UINT16:fprintf(f, "%u", ir->value.u16[i]); break;
case GLSL_TYPE_INT16: fprintf(f, "%d", ir->value.i16[i]); break;
case GLSL_TYPE_UINT: fprintf(f, "%u", ir->value.u[i]); break;
case GLSL_TYPE_INT: fprintf(f, "%d", ir->value.i[i]); break;
case GLSL_TYPE_FLOAT: