Beispiel #1
0
void
gen6_draw_vs(struct ilo_render *r,
             const struct ilo_state_vector *vec,
             struct ilo_render_draw_session *session)
{
   const bool emit_3dstate_vs = (DIRTY(VS) || r->instruction_bo_changed);
   const bool emit_3dstate_constant_vs = session->pcb_vs_changed;

   /*
    * the classic i965 does this in upload_vs_state(), citing a spec that I
    * cannot find
    */
   if (emit_3dstate_vs && ilo_dev_gen(r->dev) == ILO_GEN(6))
      gen6_wa_pre_non_pipelined(r);

   /* 3DSTATE_CONSTANT_VS */
   if (emit_3dstate_constant_vs) {
      gen6_3DSTATE_CONSTANT_VS(r->builder,
            &r->state.vs.PUSH_CONSTANT_BUFFER,
            &r->state.vs.PUSH_CONSTANT_BUFFER_size,
            1);
   }

   /* 3DSTATE_VS */
   if (emit_3dstate_vs)
      gen6_3DSTATE_VS(r->builder, vec->vs);

   if (emit_3dstate_constant_vs && ilo_dev_gen(r->dev) == ILO_GEN(6))
      gen6_wa_post_3dstate_constant_vs(r);
}
Beispiel #2
0
static void
gen6_rectlist_vs_to_sf(struct ilo_render *r,
                       const struct ilo_blitter *blitter)
{
   gen6_3DSTATE_CONSTANT_VS(r->builder, NULL, NULL, 0);
   gen6_disable_3DSTATE_VS(r->builder);

   gen6_wa_post_3dstate_constant_vs(r);

   gen6_3DSTATE_CONSTANT_GS(r->builder, NULL, NULL, 0);
   gen6_disable_3DSTATE_GS(r->builder);

   gen6_disable_3DSTATE_CLIP(r->builder);
   gen6_3DSTATE_SF(r->builder, NULL, NULL, blitter->fb.num_samples);
}
Beispiel #3
0
void
gen6_draw_vs(struct ilo_render *r,
             const struct ilo_state_vector *vec,
             struct ilo_render_draw_session *session)
{
   /* 3DSTATE_CONSTANT_VS */
   if (session->pcb_vs_changed) {
      gen6_3DSTATE_CONSTANT_VS(r->builder,
            &r->state.vs.PUSH_CONSTANT_BUFFER,
            &r->state.vs.PUSH_CONSTANT_BUFFER_size,
            1);

      if (ilo_dev_gen(r->dev) == ILO_GEN(6))
         gen6_wa_post_3dstate_constant_vs(r);
   }

   /* 3DSTATE_VS */
   if (DIRTY(VS) || r->instruction_bo_changed) {
      if (ilo_dev_gen(r->dev) == ILO_GEN(6))
         gen6_wa_pre_3dstate_vs_toggle(r);

      gen6_3DSTATE_VS(r->builder, vec->vs);
   }
}