Revert "i965: Disable unused pipeline stages once at startup on Gen7+."
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 11 Jun 2013 17:31:39 +0000 (10:31 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 11 Jun 2013 17:53:44 +0000 (10:53 -0700)
This reverts commit 6c966ccf07bcaf64fba1a9b699440c30dc96e732.

Apparently causes GPU hangs.

Conflicts:
src/mesa/drivers/dri/i965/brw_state.h
src/mesa/drivers/dri/i965/brw_state_upload.c

src/mesa/drivers/dri/i965/brw_state.h
src/mesa/drivers/dri/i965/brw_state_upload.c
src/mesa/drivers/dri/i965/gen7_disable.c

index f14c44cb13169ba4d4133f631d79c038a455295f..8af933ea94c544a6ca164bbedfdd28ed9dc07129 100644 (file)
@@ -111,6 +111,7 @@ extern const struct brw_tracked_state gen7_cc_state_pointer;
 extern const struct brw_tracked_state gen7_cc_viewport_state_pointer;
 extern const struct brw_tracked_state gen7_clip_state;
 extern const struct brw_tracked_state gen7_depth_stencil_state_pointer;
+extern const struct brw_tracked_state gen7_disable_stages;
 extern const struct brw_tracked_state gen7_ps_state;
 extern const struct brw_tracked_state gen7_samplers;
 extern const struct brw_tracked_state gen7_sbe_state;
@@ -213,9 +214,6 @@ uint32_t
 get_attr_override(const struct brw_vue_map *vue_map, int urb_entry_read_offset,
                   int fs_attr, bool two_side_color, uint32_t *max_source_attr);
 
-/* gen7_disable.c */
-void gen7_disable_unused_stages(struct brw_context *brw);
-
 /* gen7_urb.c */
 void gen7_allocate_push_constants(struct brw_context *brw);
 
index a9e269eebd67300ea5d902b16671b9cec6ef0f0e..00aea41ef2df1272a8b17999dad7db45e8c831cb 100644 (file)
@@ -210,6 +210,7 @@ static const struct brw_tracked_state *gen7_atoms[] =
    &gen7_samplers,
    &gen6_multisample_state,
 
+   &gen7_disable_stages,
    &gen7_vs_state,
    &gen7_sol_state,
    &gen7_clip_state,
@@ -253,7 +254,6 @@ brw_upload_initial_gpu_state(struct brw_context *brw)
 
    if (intel->gen >= 7) {
       gen7_allocate_push_constants(brw);
-      gen7_disable_unused_stages(brw);
    }
 }
 
index c152d0accaa44c4324b31c37e6b5efd0a04e9992..aaf88a8bba88eed4b47c803cc8f148036827fd03 100644 (file)
@@ -26,8 +26,8 @@
 #include "brw_defines.h"
 #include "intel_batchbuffer.h"
 
-void
-gen7_disable_unused_stages(struct brw_context *brw)
+static void
+disable_stages(struct brw_context *brw)
 {
    struct intel_context *intel = &brw->intel;
 
@@ -123,3 +123,12 @@ gen7_disable_unused_stages(struct brw_context *brw)
    OUT_BATCH(0);
    ADVANCE_BATCH();
 }
+
+const struct brw_tracked_state gen7_disable_stages = {
+   .dirty = {
+      .mesa  = 0,
+      .brw   = BRW_NEW_CONTEXT,
+      .cache = 0,
+   },
+   .emit = disable_stages,
+};