struct gl_context *ctx = &brw->ctx;
/* CACHE_NEW_WM_PROG */
uint32_t num_outputs = brw->wm.prog_data->num_varying_inputs;
- uint32_t dw1, dw10, dw11;
+ uint32_t dw1;
+ uint32_t point_sprite_enables;
+ uint32_t flat_enables;
int i;
const int urb_entry_read_offset = BRW_SF_URB_ENTRY_READ_OFFSET;
uint16_t attr_overrides[16];
}
dw1 |= point_sprite_origin;
- /* BRW_NEW_VUE_MAP_GEOM_OUT | _NEW_POINT | _NEW_LIGHT | _NEW_PROGRAM |
- * CACHE_NEW_WM_PROG
+ /* BRW_NEW_VUE_MAP_GEOM_OUT | BRW_NEW_FRAGMENT_PROGRAM
+ * _NEW_POINT | _NEW_LIGHT | _NEW_PROGRAM | CACHE_NEW_WM_PROG
*/
uint32_t urb_entry_read_length;
- calculate_attr_overrides(brw, attr_overrides, &dw10, &dw11,
- &urb_entry_read_length);
+ calculate_attr_overrides(brw, attr_overrides, &point_sprite_enables,
+ &flat_enables, &urb_entry_read_length);
dw1 |= urb_entry_read_length << GEN7_SBE_URB_ENTRY_READ_LENGTH_SHIFT |
urb_entry_read_offset << GEN7_SBE_URB_ENTRY_READ_OFFSET_SHIFT;
OUT_BATCH(attr_overrides[i * 2] | attr_overrides[i * 2 + 1] << 16);
}
- OUT_BATCH(dw10); /* point sprite texcoord bitmask */
- OUT_BATCH(dw11); /* constant interp bitmask */
+ OUT_BATCH(point_sprite_enables); /* dw10 */
+ OUT_BATCH(flat_enables);
OUT_BATCH(0); /* wrapshortest enables 0-7 */
OUT_BATCH(0); /* wrapshortest enables 8-15 */
ADVANCE_BATCH();
_NEW_POINT |
_NEW_PROGRAM),
.brw = (BRW_NEW_CONTEXT |
- BRW_NEW_FRAGMENT_PROGRAM |
+ BRW_NEW_FRAGMENT_PROGRAM |
+ BRW_NEW_GEOMETRY_PROGRAM |
+ BRW_NEW_PRIMITIVE |
BRW_NEW_VUE_MAP_GEOM_OUT),
.cache = CACHE_NEW_WM_PROG
},
bool render_to_fbo = _mesa_is_user_fbo(ctx->DrawBuffer);
bool multisampled_fbo = ctx->DrawBuffer->Visual.samples > 1;
- dw1 = GEN6_SF_STATISTICS_ENABLE |
- GEN6_SF_VIEWPORT_TRANSFORM_ENABLE;
+ dw1 = GEN6_SF_STATISTICS_ENABLE;
+
+ if (brw->sf.viewport_transform_enable)
+ dw1 |= GEN6_SF_VIEWPORT_TRANSFORM_ENABLE;
/* _NEW_BUFFERS */
dw1 |= (brw_depthbuffer_format(brw) << GEN7_SF_DEPTH_BUFFER_SURFACE_FORMAT_SHIFT);
break;
default:
- assert(0);
- break;
+ unreachable("not reached");
}
switch (ctx->Polygon.BackMode) {
break;
default:
- assert(0);
- break;
+ unreachable("not reached");
}
dw2 = 0;
dw2 |= GEN6_SF_CULL_BOTH;
break;
default:
- assert(0);
- break;
+ unreachable("not reached");
}
} else {
dw2 |= GEN6_SF_CULL_NONE;
}
/* _NEW_SCISSOR */
- if (ctx->Scissor.Enabled)
+ if (ctx->Scissor.EnableFlags)
dw2 |= GEN6_SF_SCISSOR_ENABLE;
/* _NEW_LINE */
{
- uint32_t line_width_u3_7 = U_FIXED(CLAMP(ctx->Line.Width, 0.0, 7.99), 7);
+ uint32_t line_width_u3_7 =
+ U_FIXED(CLAMP(ctx->Line.Width, 0.0, ctx->Const.MaxLineWidth), 7);
/* TODO: line width of 0 is not allowed when MSAA enabled */
if (line_width_u3_7 == 0)
line_width_u3_7 = 1;
_NEW_POINT |
_NEW_MULTISAMPLE),
.brw = BRW_NEW_CONTEXT,
- .cache = CACHE_NEW_VS_PROG
+ .cache = 0,
},
.emit = upload_sf_state,
};