i965: Use enum brw_reg_type for register types.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
This commit is contained in:
parent
34ef6a7651
commit
3de11cacf0
|
@ -26,6 +26,7 @@
|
|||
#include <stdint.h>
|
||||
|
||||
#include "brw_context.h"
|
||||
#include "brw_reg.h"
|
||||
#include "intel_mipmap_tree.h"
|
||||
|
||||
struct brw_context;
|
||||
|
@ -299,7 +300,7 @@ struct brw_blorp_blit_prog_key
|
|||
/* 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.
|
||||
|
|
|
@ -866,7 +866,7 @@ fs_reg::fs_reg(enum register_file file, int reg)
|
|||
}
|
||||
|
||||
/** 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;
|
||||
|
|
|
@ -75,7 +75,7 @@ public:
|
|||
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;
|
||||
|
@ -99,7 +99,7 @@ public:
|
|||
};
|
||||
|
||||
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;
|
||||
|
|
|
@ -131,7 +131,7 @@ const char *brw_reg_type_letters(unsigned brw_reg_type);
|
|||
* 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 */
|
||||
|
@ -227,7 +227,7 @@ static inline struct brw_reg
|
|||
brw_reg(unsigned file,
|
||||
unsigned nr,
|
||||
unsigned subnr,
|
||||
unsigned type,
|
||||
enum brw_reg_type type,
|
||||
unsigned vstride,
|
||||
unsigned width,
|
||||
unsigned hstride,
|
||||
|
@ -362,7 +362,7 @@ brw_vecn_reg(unsigned width, unsigned file, unsigned nr, unsigned subnr)
|
|||
}
|
||||
|
||||
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;
|
||||
|
@ -424,7 +424,7 @@ brw_uw1_reg(unsigned file, unsigned nr, unsigned subnr)
|
|||
}
|
||||
|
||||
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,
|
||||
|
|
|
@ -279,7 +279,7 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
|
|||
}
|
||||
|
||||
|
||||
int
|
||||
enum brw_reg_type
|
||||
brw_type_for_base_type(const struct glsl_type *type)
|
||||
{
|
||||
switch (type->base_type) {
|
||||
|
|
|
@ -50,7 +50,7 @@ struct backend_reg
|
|||
#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.
|
||||
|
@ -166,7 +166,7 @@ void annotation_finalize(struct annotation_info *annotation, unsigned offset);
|
|||
|
||||
#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);
|
||||
|
|
|
@ -117,7 +117,7 @@ public:
|
|||
};
|
||||
|
||||
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;
|
||||
|
@ -176,7 +176,7 @@ public:
|
|||
};
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue