nir: Add support for 16-bit types (half float, int16 and uint16)

v2: Renamed glsl_half_float_type() to glsl_float16_t_type().
    (Jason Ekstrand)

Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Eduardo Lima <elima@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Eduardo Lima Mitev
2017-07-01 07:54:50 +02:00
committed by Jose Maria Casanova Crespo
parent 52b10c7f20
commit 5165e222d1
5 changed files with 47 additions and 0 deletions

View File

@@ -147,10 +147,13 @@ split_var_copy_instr(nir_intrinsic_instr *old_copy,
break;
case GLSL_TYPE_UINT:
case GLSL_TYPE_UINT16:
case GLSL_TYPE_UINT64:
case GLSL_TYPE_INT:
case GLSL_TYPE_INT16:
case GLSL_TYPE_INT64:
case GLSL_TYPE_FLOAT:
case GLSL_TYPE_FLOAT16:
case GLSL_TYPE_DOUBLE:
case GLSL_TYPE_BOOL:
if (glsl_type_is_matrix(src_tail->type)) {
@@ -229,6 +232,7 @@ split_var_copies_block(nir_block *block, struct split_var_copies_state *state)
ralloc_steal(state->dead_ctx, instr);
break;
case GLSL_TYPE_FLOAT:
case GLSL_TYPE_FLOAT16:
case GLSL_TYPE_DOUBLE:
if (glsl_type_is_matrix(src_tail->type)) {
split_var_copy_instr(intrinsic, dest_head, src_head,
@@ -239,6 +243,8 @@ split_var_copies_block(nir_block *block, struct split_var_copies_state *state)
break;
case GLSL_TYPE_INT:
case GLSL_TYPE_UINT:
case GLSL_TYPE_INT16:
case GLSL_TYPE_UINT16:
case GLSL_TYPE_INT64:
case GLSL_TYPE_UINT64:
case GLSL_TYPE_BOOL: