i965: Move brw_reg_type_is_floating_point to brw_reg_type.h
authorMatt Turner <mattst88@gmail.com>
Thu, 24 Aug 2017 23:04:26 +0000 (16:04 -0700)
committerMatt Turner <mattst88@gmail.com>
Fri, 20 Oct 2017 22:00:16 +0000 (15:00 -0700)
I'm going to call this from brw_inst.h, and I don't want to have to
include all of brw_reg.h.

Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
src/intel/compiler/brw_reg.h
src/intel/compiler/brw_reg_type.h

index 441dfb2447164c02b160afd27c0dbce8c860b794..d68d64f0037dda45037f6bd7d8f25a004ba15e98 100644 (file)
@@ -289,19 +289,6 @@ type_sz(unsigned type)
    }
 }
 
-static inline bool
-brw_reg_type_is_floating_point(enum brw_reg_type type)
-{
-   switch (type) {
-   case BRW_REGISTER_TYPE_F:
-   case BRW_REGISTER_TYPE_HF:
-   case BRW_REGISTER_TYPE_DF:
-      return true;
-   default:
-      return false;
-   }
-}
-
 static inline enum brw_reg_type
 get_exec_type(const enum brw_reg_type type)
 {
index 87d9fe31e867f652f039f8c18b4a75472bf3422b..0b40906d924b211a74993b604d5c7f4dd569da29 100644 (file)
@@ -24,6 +24,8 @@
 #ifndef BRW_REG_TYPE_H
 #define BRW_REG_TYPE_H
 
+#include <stdbool.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -65,6 +67,19 @@ enum PACKED brw_reg_type {
    BRW_REGISTER_TYPE_LAST = BRW_REGISTER_TYPE_UV
 };
 
+static inline bool
+brw_reg_type_is_floating_point(enum brw_reg_type type)
+{
+   switch (type) {
+   case BRW_REGISTER_TYPE_DF:
+   case BRW_REGISTER_TYPE_F:
+   case BRW_REGISTER_TYPE_HF:
+      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);