static void
upload_sol_state(struct brw_context *brw)
{
   struct intel_context *intel = &brw->intel;
   struct gl_context *ctx = &intel->ctx;
   /* _NEW_TRANSFORM_FEEDBACK */
   struct gl_transform_feedback_object *xfb_obj =
      ctx->TransformFeedback.CurrentObject;
   bool active = xfb_obj->Active && !xfb_obj->Paused;

   if (active) {
      upload_3dstate_so_buffers(brw);
      /* CACHE_NEW_VS_PROG */
      upload_3dstate_so_decl_list(brw, &brw->vs.prog_data->vue_map);

      intel->batch.needs_sol_reset = true;
   }

   /* Finally, set up the SOL stage.  This command must always follow updates to
    * the nonpipelined SOL state (3DSTATE_SO_BUFFER, 3DSTATE_SO_DECL_LIST) or
    * MMIO register updates (current performed by the kernel at each batch
    * emit).
    */
   upload_3dstate_streamout(brw, active, &brw->vs.prog_data->vue_map);
}
Пример #2
0
static void
upload_sol_state(struct brw_context *brw)
{
   struct intel_context *intel = &brw->intel;
   struct gl_context *ctx = &intel->ctx;
   /* BRW_NEW_TRANSFORM_FEEDBACK */
   bool active = _mesa_is_xfb_active_and_unpaused(ctx);

   if (active) {
      upload_3dstate_so_buffers(brw);
      /* BRW_NEW_VUE_MAP_GEOM_OUT */
      upload_3dstate_so_decl_list(brw, &brw->vue_map_geom_out);

      /* If we don't have hardware contexts, then some other client may have
       * changed the SO write offsets, and we need to rewrite them.
       */
      if (!intel->hw_ctx)
         intel->batch.needs_sol_reset = true;
   }

   /* Finally, set up the SOL stage.  This command must always follow updates to
    * the nonpipelined SOL state (3DSTATE_SO_BUFFER, 3DSTATE_SO_DECL_LIST) or
    * MMIO register updates (current performed by the kernel at each batch
    * emit).
    */
   upload_3dstate_streamout(brw, active, &brw->vue_map_geom_out);
}
Пример #3
0
static void
upload_sol_state(struct brw_context *brw)
{
    struct gl_context *ctx = &brw->ctx;
    /* BRW_NEW_TRANSFORM_FEEDBACK */
    bool active = _mesa_is_xfb_active_and_unpaused(ctx);

    if (active) {
        upload_3dstate_so_buffers(brw);
        /* BRW_NEW_VUE_MAP_GEOM_OUT */
        gen7_upload_3dstate_so_decl_list(brw, &brw->vue_map_geom_out);
    }

    /* Finally, set up the SOL stage.  This command must always follow updates to
     * the nonpipelined SOL state (3DSTATE_SO_BUFFER, 3DSTATE_SO_DECL_LIST) or
     * MMIO register updates (current performed by the kernel at each batch
     * emit).
     */
    upload_3dstate_streamout(brw, active, &brw->vue_map_geom_out);
}