i965: split EU defines to brw_eu_defines.h
[mesa.git] / src / mesa / drivers / dri / i965 / brw_inst.h
index bcb6786bbadc8208e47532e2608f53a214a2079c..a0b8fb66dd6eae1aebdef3d571683ecb30a374fe 100644 (file)
 #ifndef BRW_INST_H
 #define BRW_INST_H
 
+#include <assert.h>
 #include <stdint.h>
 
-#include "brw_context.h"
+#include "brw_eu_defines.h"
+#include "common/gen_device_info.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -570,7 +572,10 @@ brw_inst_imm_ud(const struct gen_device_info *devinfo, const brw_inst *insn)
 static inline float
 brw_inst_imm_f(const struct gen_device_info *devinfo, const brw_inst *insn)
 {
-   fi_type ft;
+   union {
+      float f;
+      uint32_t u;
+   } ft;
    (void) devinfo;
    ft.u = brw_inst_bits(insn, 127, 96);
    return ft.f;
@@ -608,7 +613,10 @@ static inline void
 brw_inst_set_imm_f(const struct gen_device_info *devinfo,
                    brw_inst *insn, float value)
 {
-   fi_type ft;
+   union {
+      float f;
+      uint32_t u;
+   } ft;
    (void) devinfo;
    ft.f = value;
    brw_inst_set_bits(insn, 127, 96, ft.u);