aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/compiler/brw_shader.cpp
diff options
context:
space:
mode:
authorJose Maria Casanova Crespo <[email protected]>2017-07-01 08:06:45 +0200
committerJose Maria Casanova Crespo <[email protected]>2017-12-06 08:57:18 +0100
commit75a88d85671e03f6913dcc8bd288515e8ee8a99b (patch)
treea178806cd04c2116f2c35ca244eb147ca7640c61 /src/intel/compiler/brw_shader.cpp
parent2d28ca70005968c7becb4e598b97e72c8e4890a2 (diff)
i965: Support for 16-bit base types in helper functions
v2: Fixed calculation of scalar size for 16-bit types. (Jason Ekstrand) v3: Fix coding style (Topi Pohjolainen) 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/intel/compiler/brw_shader.cpp')
-rw-r--r--src/intel/compiler/brw_shader.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_shader.cpp b/src/intel/compiler/brw_shader.cpp
index ba61481a0af..aa9e5f3d284 100644
--- a/src/intel/compiler/brw_shader.cpp
+++ b/src/intel/compiler/brw_shader.cpp
@@ -34,14 +34,20 @@ enum brw_reg_type
brw_type_for_base_type(const struct glsl_type *type)
{
switch (type->base_type) {
+ case GLSL_TYPE_FLOAT16:
+ return BRW_REGISTER_TYPE_HF;
case GLSL_TYPE_FLOAT:
return BRW_REGISTER_TYPE_F;
case GLSL_TYPE_INT:
case GLSL_TYPE_BOOL:
case GLSL_TYPE_SUBROUTINE:
return BRW_REGISTER_TYPE_D;
+ case GLSL_TYPE_INT16:
+ return BRW_REGISTER_TYPE_W;
case GLSL_TYPE_UINT:
return BRW_REGISTER_TYPE_UD;
+ case GLSL_TYPE_UINT16:
+ return BRW_REGISTER_TYPE_UW;
case GLSL_TYPE_ARRAY:
return brw_type_for_base_type(type->fields.array);
case GLSL_TYPE_STRUCT: