summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir.h
diff options
context:
space:
mode:
authorEduardo Lima Mitev <[email protected]>2017-07-01 07:54:50 +0200
committerJose Maria Casanova Crespo <[email protected]>2017-12-06 08:57:18 +0100
commit5165e222d15a546a550a3165dce05eac81f94482 (patch)
tree2f9333a49c43e534cec2eddc05ca6ee46a72eba3 /src/compiler/nir/nir.h
parent52b10c7f20cf1613e47d5320339e61029549c420 (diff)
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 <[email protected]> Signed-off-by: Eduardo Lima <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r--src/compiler/nir/nir.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 189c17d1625..2abf2ddd843 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -719,6 +719,12 @@ nir_get_nir_type_for_glsl_base_type(enum glsl_base_type base_type)
case GLSL_TYPE_INT:
return nir_type_int32;
break;
+ case GLSL_TYPE_UINT16:
+ return nir_type_uint16;
+ break;
+ case GLSL_TYPE_INT16:
+ return nir_type_int16;
+ break;
case GLSL_TYPE_UINT64:
return nir_type_uint64;
break;
@@ -728,6 +734,9 @@ nir_get_nir_type_for_glsl_base_type(enum glsl_base_type base_type)
case GLSL_TYPE_FLOAT:
return nir_type_float32;
break;
+ case GLSL_TYPE_FLOAT16:
+ return nir_type_float16;
+ break;
case GLSL_TYPE_DOUBLE:
return nir_type_float64;
break;