projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
44e1aff
)
intel/compiler: add a brw_reg_type_is_integer helper
author
Iago Toral Quiroga
<itoral@igalia.com>
Tue, 20 Nov 2018 13:04:26 +0000
(14:04 +0100)
committer
Juan A. Suarez Romero
<jasuarez@igalia.com>
Thu, 18 Apr 2019 09:05:18 +0000
(11:05 +0200)
v2:
- Fixed typo: meant BRW_REGISTER_TYPE_UB instead BRW_REGISTER_TYPE_UV
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (v1)
src/intel/compiler/brw_reg_type.h
patch
|
blob
|
history
diff --git
a/src/intel/compiler/brw_reg_type.h
b/src/intel/compiler/brw_reg_type.h
index ffbec90d3fe4ab57d0975a63bd8ec134f6b39405..086770d2e035758734d81f4d66bf3439740ebddd 100644
(file)
--- a/
src/intel/compiler/brw_reg_type.h
+++ b/
src/intel/compiler/brw_reg_type.h
@@
-82,6
+82,24
@@
brw_reg_type_is_floating_point(enum brw_reg_type type)
}
}
+static inline bool
+brw_reg_type_is_integer(enum brw_reg_type type)
+{
+ switch (type) {
+ case BRW_REGISTER_TYPE_Q:
+ case BRW_REGISTER_TYPE_UQ:
+ case BRW_REGISTER_TYPE_D:
+ case BRW_REGISTER_TYPE_UD:
+ case BRW_REGISTER_TYPE_W:
+ case BRW_REGISTER_TYPE_UW:
+ case BRW_REGISTER_TYPE_B:
+ case BRW_REGISTER_TYPE_UB:
+ return true;
+ default:
+ return false;
+ }
+}
+
unsigned
brw_reg_type_to_hw_type(const struct gen_device_info *devinfo,
enum brw_reg_file file, enum brw_reg_type type);