aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs.h
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2014-10-27 22:42:50 -0700
committerKristian Høgsberg <[email protected]>2014-12-10 12:29:19 -0800
commit8b6a797d743be38396fcaf4a2f7fb01d3bcd9ba3 (patch)
tree3cb758bab96ccebfc650939b5001fbf2d001fa4d /src/mesa/drivers/dri/i965/brw_fs.h
parentbf2307937995212895375d1e258d50207da3d24e (diff)
i965: Add fs_visitor::run_vs() to generate scalar vertex shader code
This patch uses the previous refactoring to add a new run_vs() method that generates vertex shader code using the scalar visitor and optimizer. Signed-off-by: Kristian Høgsberg <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index a674a0256a4..84a0b101e5b 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -308,12 +308,23 @@ public:
struct gl_shader_program *shader_prog,
struct gl_fragment_program *fp,
unsigned dispatch_width);
+
+ fs_visitor(struct brw_context *brw,
+ void *mem_ctx,
+ const struct brw_vs_prog_key *key,
+ struct brw_vs_prog_data *prog_data,
+ struct gl_shader_program *shader_prog,
+ struct gl_vertex_program *cp,
+ unsigned dispatch_width);
+
~fs_visitor();
void init();
fs_reg *variable_storage(ir_variable *var);
int virtual_grf_alloc(int size);
void import_uniforms(fs_visitor *v);
+ void setup_uniform_clipplane_values();
+ void compute_clip_distance();
void visit(ir_variable *ir);
void visit(ir_assignment *ir);
@@ -404,14 +415,17 @@ public:
uint32_t const_offset);
bool run();
+ bool run_vs();
void optimize();
void allocate_registers();
void assign_binding_table_offsets();
void setup_payload_gen4();
void setup_payload_gen6();
+ void setup_vs_payload();
void assign_curb_setup();
void calculate_urb_setup();
void assign_urb_setup();
+ void assign_vs_urb_setup();
bool assign_regs(bool allow_spilling);
void assign_regs_trivial();
void get_used_mrfs(bool *mrf_used);
@@ -465,6 +479,7 @@ public:
fs_reg *emit_samplepos_setup();
fs_reg *emit_sampleid_setup();
fs_reg *emit_general_interpolation(ir_variable *ir);
+ fs_reg *emit_vs_system_value(enum brw_reg_type type, int location);
void emit_interpolation_setup_gen4();
void emit_interpolation_setup_gen6();
void compute_sample_position(fs_reg dst, fs_reg int_sample_pos);
@@ -552,6 +567,7 @@ public:
fs_inst *emit_single_fb_write(fs_reg color1, fs_reg color2,
fs_reg src0_alpha, unsigned components);
void emit_fb_writes();
+ void emit_urb_writes();
void emit_shader_time_begin();
void emit_shader_time_end();
@@ -627,8 +643,8 @@ public:
struct hash_table *variable_ht;
fs_reg frag_depth;
fs_reg sample_mask;
- fs_reg outputs[BRW_MAX_DRAW_BUFFERS];
- unsigned output_components[BRW_MAX_DRAW_BUFFERS];
+ fs_reg outputs[VARYING_SLOT_MAX];
+ unsigned output_components[VARYING_SLOT_MAX];
fs_reg dual_src_output;
bool do_dual_src;
int first_non_payload_grf;
@@ -675,6 +691,7 @@ public:
fs_reg delta_x[BRW_WM_BARYCENTRIC_INTERP_MODE_COUNT];
fs_reg delta_y[BRW_WM_BARYCENTRIC_INTERP_MODE_COUNT];
fs_reg shader_start_time;
+ fs_reg userplane[MAX_CLIP_PLANES];
int grf_used;
bool spilled_any_registers;