#include <stdint.h>
#include "brw_context.h"
+#include "brw_reg.h"
#include "intel_mipmap_tree.h"
struct brw_context;
/* Type of the data to be read from the texture (one of
* BRW_REGISTER_TYPE_{UD,D,F}).
*/
- unsigned texture_data_type;
+ enum brw_reg_type texture_data_type;
/* True if the source image is W tiled. If true, the surface state for the
* source image must be configured as Y tiled, and tex_samples must be 0.
}
/** 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;
};
static inline fs_reg
-retype(fs_reg reg, unsigned type)
+retype(fs_reg reg, enum brw_reg_type type)
{
reg.fixed_hw_reg.type = reg.type = type;
return reg;
* or "structure of array" form:
*/
struct brw_reg {
- unsigned type:4;
+ enum brw_reg_type type:4;
unsigned file:2;
unsigned nr:8;
unsigned subnr:5; /* :1 in align16 */
brw_reg(unsigned file,
unsigned nr,
unsigned subnr,
- unsigned type,
+ enum brw_reg_type type,
unsigned vstride,
unsigned width,
unsigned hstride,
}
static inline struct brw_reg
-retype(struct brw_reg reg, unsigned type)
+retype(struct brw_reg reg, enum brw_reg_type type)
{
reg.type = type;
return reg;
}
static inline struct brw_reg
-brw_imm_reg(unsigned type)
+brw_imm_reg(enum brw_reg_type type)
{
return brw_reg(BRW_IMMEDIATE_VALUE,
0,
}
-int
+enum brw_reg_type
brw_type_for_base_type(const struct glsl_type *type)
{
switch (type->base_type) {
#endif
enum register_file file; /**< Register file: GRF, MRF, IMM. */
- uint8_t type; /**< Register type: BRW_REGISTER_TYPE_* */
+ enum brw_reg_type type; /**< Register type: BRW_REGISTER_TYPE_* */
/**
* Register number.
#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);
};
static inline src_reg
-retype(src_reg reg, unsigned type)
+retype(src_reg reg, enum brw_reg_type type)
{
reg.fixed_hw_reg.type = reg.type = type;
return reg;
};
static inline dst_reg
-retype(dst_reg reg, unsigned type)
+retype(dst_reg reg, enum brw_reg_type type)
{
reg.fixed_hw_reg.type = reg.type = type;
return reg;