Since the enum is marked as packed, it'll still take only one byte.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
init();
this->file = HW_REG;
this->fixed_hw_reg = fixed_hw_reg;
- this->type = fixed_hw_reg.type;
+ this->type = (enum brw_reg_type)fixed_hw_reg.type;
}
bool
}
/** Fixed HW reg constructor. */
-fs_reg::fs_reg(enum register_file file, int reg, uint32_t type)
+fs_reg::fs_reg(enum register_file file, int reg, enum brw_reg_type type)
{
init();
this->file = file;
fs_reg(uint32_t u);
fs_reg(struct brw_reg fixed_hw_reg);
fs_reg(enum register_file file, int reg);
- fs_reg(enum register_file file, int reg, uint32_t type);
+ fs_reg(enum register_file file, int reg, enum brw_reg_type type);
fs_reg(class fs_visitor *v, const struct glsl_type *type);
bool equals(const fs_reg &r) const;
*/
int reg_offset;
/** Register type. BRW_REGISTER_TYPE_* */
- uint8_t type;
+ enum brw_reg_type type;
bool negate;
bool abs;
struct brw_reg fixed_hw_reg;
}
-int
+enum brw_reg_type
brw_type_for_base_type(const struct glsl_type *type)
{
switch (type->base_type) {
#include <stdint.h>
#include "brw_defines.h"
+#include "brw_reg.h"
#include "main/compiler.h"
#include "glsl/ir.h"
#endif /* __cplusplus */
-int brw_type_for_base_type(const struct glsl_type *type);
+enum brw_reg_type brw_type_for_base_type(const struct glsl_type *type);
uint32_t brw_conditional_for_comparison(unsigned int op);
uint32_t brw_math_function(enum opcode op);
const char *brw_instruction_name(enum opcode op);