static void
gen6_upload_gs_push_constants(struct brw_context *brw)
{
+ struct brw_stage_state *stage_state = &brw->gs.base;
+
/* BRW_NEW_GEOMETRY_PROGRAM */
const struct brw_geometry_program *gp =
(struct brw_geometry_program *) brw->geometry_program;
if (gp) {
- /* CACHE_NEW_GS_PROG */
- struct brw_stage_state *stage_state = &brw->gs.base;
+ /* BRW_NEW_GS_PROG_DATA */
struct brw_stage_prog_data *prog_data = &brw->gs.prog_data->base.base;
gen6_upload_push_constants(brw, &gp->program.Base, prog_data,
stage_state, AUB_TRACE_VS_CONSTANTS);
}
+
+ if (brw->gen >= 7)
+ gen7_upload_constant_state(brw, stage_state, gp, _3DSTATE_CONSTANT_GS);
}
const struct brw_tracked_state gen6_gs_push_constants = {
.dirty = {
- .mesa = _NEW_TRANSFORM | _NEW_PROGRAM_CONSTANTS,
- .brw = (BRW_NEW_BATCH |
- BRW_NEW_GEOMETRY_PROGRAM |
- BRW_NEW_PUSH_CONSTANT_ALLOCATION),
- .cache = CACHE_NEW_GS_PROG,
+ .mesa = _NEW_PROGRAM_CONSTANTS |
+ _NEW_TRANSFORM,
+ .brw = BRW_NEW_BATCH |
+ BRW_NEW_BLORP |
+ BRW_NEW_GEOMETRY_PROGRAM |
+ BRW_NEW_GS_PROG_DATA |
+ BRW_NEW_PUSH_CONSTANT_ALLOCATION,
},
.emit = gen6_upload_gs_push_constants,
};
{
/* BRW_NEW_GEOMETRY_PROGRAM */
bool active = brw->geometry_program;
- /* CACHE_NEW_GS_PROG */
- const struct brw_vec4_prog_data *prog_data = &brw->gs.prog_data->base;
+ /* BRW_NEW_GS_PROG_DATA */
+ const struct brw_vue_prog_data *prog_data = &brw->gs.prog_data->base;
const struct brw_stage_state *stage_state = &brw->gs.base;
if (!active || stage_state->push_const_size == 0) {
GEN6_GS_SO_STATISTICS_ENABLE |
GEN6_GS_RENDERING_ENABLE);
- /* FIXME: Enable SVBI payload only when TF is enable in SNB for
- * user-provided GS.
- */
- if (0) {
+ if (brw->gs.prog_data->gen6_xfb_enabled) {
/* GEN6_GS_REORDER is equivalent to GEN7_GS_REORDER_TRAILING
* in gen7. SNB and IVB specs are the same regarding the reordering of
* TRISTRIP/TRISTRIP_REV vertices and triangle orientation, so we do
*/
OUT_BATCH(GEN6_GS_REORDER |
GEN6_GS_SVBI_PAYLOAD_ENABLE |
- GEN6_GS_SVBI_POSTINCREMENT_ENABLE |
- /* FIXME: prog_data->svbi_postincrement_value instead of 0 */
- (0 << GEN6_GS_SVBI_POSTINCREMENT_VALUE_SHIFT) |
GEN6_GS_ENABLE);
} else {
OUT_BATCH(GEN6_GS_REORDER | GEN6_GS_ENABLE);
const struct brw_tracked_state gen6_gs_state = {
.dirty = {
- .mesa = _NEW_TRANSFORM | _NEW_PROGRAM_CONSTANTS,
- .brw = BRW_NEW_CONTEXT | BRW_NEW_PUSH_CONSTANT_ALLOCATION,
- .cache = (CACHE_NEW_GS_PROG | CACHE_NEW_FF_GS_PROG)
+ .mesa = _NEW_PROGRAM_CONSTANTS |
+ _NEW_TRANSFORM,
+ .brw = BRW_NEW_BATCH |
+ BRW_NEW_BLORP |
+ BRW_NEW_CONTEXT |
+ BRW_NEW_FF_GS_PROG_DATA |
+ BRW_NEW_GEOMETRY_PROGRAM |
+ BRW_NEW_GS_PROG_DATA |
+ BRW_NEW_PUSH_CONSTANT_ALLOCATION,
},
.emit = upload_gs_state,
};