i965: Convert scalar_* flags to a scalar_stage array.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_compiler.h
index 10e1fde73f686e98b0ce35ecfd58f246ae5d0323..3f546161409d167309e4d69ab0ea6746f003bf73 100644 (file)
@@ -89,7 +89,7 @@ struct brw_compiler {
    void (*shader_debug_log)(void *, const char *str, ...) PRINTFLIKE(2, 3);
    void (*shader_perf_log)(void *, const char *str, ...) PRINTFLIKE(2, 3);
 
-   bool scalar_vs;
+   bool scalar_stage[MESA_SHADER_STAGES];
    struct gl_shader_compiler_options glsl_compiler_options[MESA_SHADER_STAGES];
 };
 
@@ -141,6 +141,13 @@ struct brw_sampler_prog_key_data {
     */
    uint32_t compressed_multisample_layout_mask;
 
+   /**
+    * Whether this sampler is using 16x multisampling. If so fetching from
+    * this sampler will be handled with a different instruction, ld2dms_w
+    * instead of ld2dms.
+    */
+   uint32_t msaa_16;
+
    /**
     * For Sandybridge, which shader w/a we need for gather quirks.
     */
@@ -334,6 +341,7 @@ struct brw_wm_prog_data {
    } binding_table;
 
    uint8_t computed_depth_mode;
+   bool computed_stencil;
 
    bool early_fragment_tests;
    bool no_8;
@@ -439,9 +447,7 @@ struct brw_vue_map {
     * directly correspond to a gl_varying_slot, the value comes from
     * brw_varying_slot.
     *
-    * For slots that are not in use, the value is BRW_VARYING_SLOT_COUNT (this
-    * simplifies code that uses the value stored in slot_to_varying to
-    * create a bit mask).
+    * For slots that are not in use, the value is BRW_VARYING_SLOT_PAD.
     */
    signed char slot_to_varying[BRW_VARYING_SLOT_COUNT];
 
@@ -451,6 +457,8 @@ struct brw_vue_map {
    int num_slots;
 };
 
+void brw_print_vue_map(FILE *fp, const struct brw_vue_map *vue_map);
+
 /**
  * Convert a VUE slot number into a byte offset within the VUE.
  */
@@ -463,8 +471,8 @@ static inline GLuint brw_vue_slot_to_offset(GLuint slot)
  * Convert a vertex output (brw_varying_slot) into a byte offset within the
  * VUE.
  */
-static inline GLuint brw_varying_to_offset(struct brw_vue_map *vue_map,
-                                           GLuint varying)
+static inline
+GLuint brw_varying_to_offset(const struct brw_vue_map *vue_map, GLuint varying)
 {
    return brw_vue_slot_to_offset(vue_map->varying_to_slot[varying]);
 }
@@ -485,6 +493,9 @@ struct brw_vue_prog_data {
    struct brw_stage_prog_data base;
    struct brw_vue_map vue_map;
 
+   /** Should the hardware deliver input VUE handles for URB pull loads? */
+   bool include_vue_handles;
+
    GLuint urb_read_length;
    GLuint total_grf;