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 <jmcasanova@igalia.com> Signed-off-by: Eduardo Lima <elima@igalia.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user