struct acp_entry;
}
-enum register_file {
- BAD_FILE,
- ARF,
- GRF,
- MRF,
- IMM,
- FIXED_HW_REG, /* a struct brw_reg */
- UNIFORM, /* prog_data->params[reg] */
-};
-
class fs_reg {
public:
/* Callers of this ralloc-based new need not call delete. It's
bool equals(const fs_reg &r) const;
bool is_zero() const;
bool is_one() const;
+ bool is_valid_3src() const;
/** Register file: ARF, GRF, MRF, IMM. */
enum register_file file;
bool equals(fs_inst *inst);
bool overwrites_reg(const fs_reg ®);
- bool is_tex();
- bool is_math();
- bool is_control_flow();
bool is_send_from_grf();
+ bool is_partial_write();
fs_reg dst;
fs_reg src[3];
fs_visitor(struct brw_context *brw,
struct brw_wm_compile *c,
- struct gl_shader_program *prog,
+ struct gl_shader_program *shader_prog,
struct gl_fragment_program *fp,
unsigned dispatch_width);
~fs_visitor();
void visit(ir_call *ir);
void visit(ir_function *ir);
void visit(ir_function_signature *ir);
+ void visit(ir_emit_vertex *);
+ void visit(ir_end_primitive *);
void swizzle_result(ir_texture *ir, fs_reg orig_val, int sampler);
uint32_t condition);
fs_inst *LRP(fs_reg dst, fs_reg a, fs_reg y, fs_reg x);
fs_inst *DEP_RESOLVE_MOV(int grf);
+ fs_inst *BFREV(fs_reg dst, fs_reg value);
+ fs_inst *BFE(fs_reg dst, fs_reg bits, fs_reg offset, fs_reg value);
+ fs_inst *BFI1(fs_reg dst, fs_reg bits, fs_reg offset);
+ fs_inst *BFI2(fs_reg dst, fs_reg bfi1_dst, fs_reg insert, fs_reg base);
+ fs_inst *FBH(fs_reg dst, fs_reg value);
+ fs_inst *FBL(fs_reg dst, fs_reg value);
+ fs_inst *CBIT(fs_reg dst, fs_reg value);
int type_size(const struct glsl_type *type);
fs_inst *get_instruction_generating_reg(fs_inst *start,
bool register_coalesce_2();
bool compute_to_mrf();
bool dead_code_eliminate();
+ bool dead_code_eliminate_local();
bool remove_dead_constants();
bool remove_duplicate_mrf_writes();
bool virtual_grf_interferes(int a, int b);
fs_reg src0, fs_reg src1);
bool try_emit_saturate(ir_expression *ir);
bool try_emit_mad(ir_expression *ir, int mul_arg);
+ void try_replace_with_sel();
void emit_bool_to_cond_code(ir_rvalue *condition);
void emit_if_gen6(ir_if *ir);
void emit_unspill(fs_inst *inst, fs_reg reg, uint32_t spill_offset);
void setup_builtin_uniform_values(ir_variable *ir);
int implied_mrf_writes(fs_inst *inst);
- void dump_instructions();
- void dump_instruction(fs_inst *inst);
+ void dump_instruction(backend_instruction *inst);
struct gl_fragment_program *fp;
struct brw_wm_compile *c;
int *virtual_grf_sizes;
int virtual_grf_count;
int virtual_grf_array_size;
- int *virtual_grf_def;
- int *virtual_grf_use;
+ int *virtual_grf_start;
+ int *virtual_grf_end;
bool live_intervals_valid;
/* This is the map from UNIFORM hw_reg + reg_offset as generated by
* uniform index.
*/
int *params_remap;
+ int nr_params_remap;
struct hash_table *variable_ht;
fs_reg frag_depth;
void generate_math_gen4(fs_inst *inst,
struct brw_reg dst,
struct brw_reg src);
+ void generate_math_g45(fs_inst *inst,
+ struct brw_reg dst,
+ struct brw_reg src);
void generate_ddx(fs_inst *inst, struct brw_reg dst, struct brw_reg src);
void generate_ddy(fs_inst *inst, struct brw_reg dst, struct brw_reg src,
bool negate_value);
struct brw_reg offset,
struct brw_reg value);
+ void mark_surface_used(unsigned surf_index);
+
void patch_discard_jumps_to_fb_writes();
struct brw_context *brw;
- struct intel_context *intel;
struct gl_context *ctx;
struct brw_compile *p;