i965: Drop pointless stage == MESA_SHADER_FRAGMENT checks.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 9 Sep 2016 07:12:58 +0000 (00:12 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 2 Oct 2016 21:49:20 +0000 (14:49 -0700)
There's an assert right above this.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/brw_fs.cpp

index 1483f41de9783929063210b1ed6f7fa761e8ef49..dc000d922fccbc0c5b5acf80813e37d90099a906 100644 (file)
@@ -5434,10 +5434,6 @@ fs_visitor::setup_fs_payload_gen6()
    assert(stage == MESA_SHADER_FRAGMENT);
    brw_wm_prog_data *prog_data = (brw_wm_prog_data*) this->prog_data;
 
-   unsigned barycentric_interp_modes =
-      (stage == MESA_SHADER_FRAGMENT) ?
-      ((brw_wm_prog_data*) this->prog_data)->barycentric_interp_modes : 0;
-
    assert(devinfo->gen >= 6);
 
    /* R0-1: masks, pixel X/Y coordinates. */
@@ -5452,7 +5448,7 @@ fs_visitor::setup_fs_payload_gen6()
     * Mode" bits in WM_STATE.
     */
    for (int i = 0; i < BRW_BARYCENTRIC_MODE_COUNT; ++i) {
-      if (barycentric_interp_modes & (1 << i)) {
+      if (prog_data->barycentric_interp_modes & (1 << i)) {
          payload.barycentric_coord_reg[i] = payload.num_regs;
          payload.num_regs += 2;
          if (dispatch_width == 16) {