intel: Add a batch flush between front-buffer downsample and X protocol.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_wm.h
index 7b5f44ffb61a646adc790be107f83e7e8685d9ff..f7a2c5f234da5aaa78314cac1b8c4ae4eed3f4a1 100644 (file)
@@ -62,27 +62,22 @@ struct brw_wm_prog_key {
    GLuint stats_wm:1;
    GLuint flat_shade:1;
    GLuint nr_color_regions:5;
-   GLuint sample_alpha_to_coverage:1;
+   GLuint replicate_alpha:1;
    GLuint render_to_fbo:1;
    GLuint clamp_fragment_color:1;
    GLuint line_aa:2;
 
-   GLbitfield proj_attrib_mask; /**< one bit per fragment program attribute */
-
    GLushort drawable_height;
-   GLbitfield64 vp_outputs_written;
+   GLbitfield64 input_slots_valid;
    GLuint program_string_id:32;
 
    struct brw_sampler_prog_key_data tex;
 };
 
 struct brw_wm_compile {
-   struct brw_compile func;
    struct brw_wm_prog_key key;
    struct brw_wm_prog_data prog_data;
 
-   struct brw_fragment_program *fp;
-
    uint8_t source_depth_reg;
    uint8_t source_w_reg;
    uint8_t aa_dest_stencil_reg;
@@ -93,23 +88,24 @@ struct brw_wm_compile {
    GLuint runtime_check_aads_emit:1;
 
    GLuint last_scratch;
-
-   GLuint dispatch_width;
 };
 
-void brw_wm_lookup_iz(struct intel_context *intel,
-                     struct brw_wm_compile *c);
-
-bool brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c,
-                   struct gl_shader_program *prog);
+/**
+ * Compile a fragment shader.
+ *
+ * Returns the final assembly and the program's size.
+ */
+const unsigned *brw_wm_fs_emit(struct brw_context *brw,
+                               struct brw_wm_compile *c,
+                               struct gl_fragment_program *fp,
+                               struct gl_shader_program *prog,
+                               unsigned *final_assembly_size);
 
 GLboolean brw_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
 struct gl_shader *brw_new_shader(struct gl_context *ctx, GLuint name, GLuint type);
 struct gl_shader_program *brw_new_shader_program(struct gl_context *ctx, GLuint name);
 
 bool brw_color_buffer_write_enabled(struct brw_context *brw);
-bool brw_render_target_supported(struct intel_context *intel,
-                                struct gl_renderbuffer *rb);
 bool do_wm_prog(struct brw_context *brw,
                struct gl_shader_program *prog,
                struct brw_fragment_program *fp,