Lines Matching refs:bi
116 static int vmw_binding_scrub_shader(struct vmw_ctx_bindinfo *bi, bool rebind);
117 static int vmw_binding_scrub_render_target(struct vmw_ctx_bindinfo *bi,
119 static int vmw_binding_scrub_texture(struct vmw_ctx_bindinfo *bi, bool rebind);
120 static int vmw_binding_scrub_cb(struct vmw_ctx_bindinfo *bi, bool rebind);
121 static int vmw_binding_scrub_dx_rt(struct vmw_ctx_bindinfo *bi, bool rebind);
122 static int vmw_binding_scrub_sr(struct vmw_ctx_bindinfo *bi, bool rebind);
123 static int vmw_binding_scrub_so(struct vmw_ctx_bindinfo *bi, bool rebind);
125 static int vmw_binding_scrub_dx_shader(struct vmw_ctx_bindinfo *bi,
127 static int vmw_binding_scrub_ib(struct vmw_ctx_bindinfo *bi, bool rebind);
128 static int vmw_binding_scrub_vb(struct vmw_ctx_bindinfo *bi, bool rebind);
279 * @bi: Pointer to binding tracker storage.
285 static void vmw_binding_drop(struct vmw_ctx_bindinfo *bi)
287 list_del(&bi->ctx_list);
288 if (!list_empty(&bi->res_list))
289 list_del(&bi->res_list);
290 bi->ctx = NULL;
297 * @bi: Information about the binding to track.
303 const struct vmw_ctx_bindinfo *bi,
307 vmw_binding_loc(cbs, bi->bt, shader_slot, slot);
308 const struct vmw_binding_info *b = &vmw_binding_infos[bi->bt];
313 memcpy(loc, bi, b->size);
323 * @bi: Information about the binding to track.
328 const struct vmw_ctx_bindinfo *bi)
330 size_t offset = (unsigned long)bi - (unsigned long)from;
335 WARN_ON(bi->scrubbed);
340 if (bi->res != NULL) {
341 memcpy(loc, bi, vmw_binding_infos[bi->bt].size);
494 * @bi: single binding information.
497 static int vmw_binding_scrub_shader(struct vmw_ctx_bindinfo *bi, bool rebind)
500 container_of(bi, typeof(*binding), bi);
501 struct vmw_private *dev_priv = bi->ctx->dev_priv;
513 cmd->body.cid = bi->ctx->id;
515 cmd->body.shid = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID);
525 * @bi: single binding information.
528 static int vmw_binding_scrub_render_target(struct vmw_ctx_bindinfo *bi,
532 container_of(bi, typeof(*binding), bi);
533 struct vmw_private *dev_priv = bi->ctx->dev_priv;
545 cmd->body.cid = bi->ctx->id;
547 cmd->body.target.sid = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID);
558 * @bi: single binding information.
564 static int vmw_binding_scrub_texture(struct vmw_ctx_bindinfo *bi,
568 container_of(bi, typeof(*binding), bi);
569 struct vmw_private *dev_priv = bi->ctx->dev_priv;
584 cmd->body.c.cid = bi->ctx->id;
587 cmd->body.s1.value = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID);
596 * @bi: single binding information.
599 static int vmw_binding_scrub_dx_shader(struct vmw_ctx_bindinfo *bi, bool rebind)
602 container_of(bi, typeof(*binding), bi);
603 struct vmw_private *dev_priv = bi->ctx->dev_priv;
609 cmd = VMW_FIFO_RESERVE_DX(dev_priv, sizeof(*cmd), bi->ctx->id);
616 cmd->body.shaderId = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID);
625 * @bi: single binding information.
628 static int vmw_binding_scrub_cb(struct vmw_ctx_bindinfo *bi, bool rebind)
631 container_of(bi, typeof(*binding), bi);
632 struct vmw_private *dev_priv = bi->ctx->dev_priv;
638 cmd = VMW_FIFO_RESERVE_DX(dev_priv, sizeof(*cmd), bi->ctx->id);
649 cmd->body.sid = bi->res->id;
665 * @bi: Pointer to where the binding info array is stored in @cbs
666 * @max_num: Maximum number of entries in the @bi array.
668 * Scans the @bi array for bindings and builds a buffer of view id data.
669 * Stops at the first non-existing binding in the @bi array.
675 const struct vmw_ctx_bindinfo *bi,
679 container_of(bi, struct vmw_ctx_bindinfo_view, bi);
686 if (!biv->bi.ctx)
690 ((biv->bi.scrubbed) ?
691 SVGA3D_INVALID_ID : biv->bi.res->id);
699 * @bi: Pointer to where the binding info array is stored in @cbs
701 * @max_num: Maximum number of entries in the @bi array.
703 * Scans the @bi array for bindings that need to be emitted and
710 const struct vmw_ctx_bindinfo *bi,
715 container_of(bi, struct vmw_ctx_bindinfo_view, bi);
726 ((!biv->bi.ctx || biv->bi.scrubbed) ?
727 SVGA3D_INVALID_ID : biv->bi.res->id);
746 &cbs->per_shader[shader_slot].shader_res[0].bi;
787 const struct vmw_ctx_bindinfo *loc = &cbs->render_targets[0].bi;
805 if (cbs->ds_view.bi.ctx && !cbs->ds_view.bi.scrubbed)
806 cmd->body.depthStencilViewId = cbs->ds_view.bi.res->id;
823 * @bi: Pointer to where the binding info array is stored in @cbs
824 * @max_num: Maximum number of entries in the @bi array.
826 * Scans the @bi array for bindings and builds a buffer of SVGA3dSoTarget data.
827 * Stops at the first non-existing binding in the @bi array.
833 const struct vmw_ctx_bindinfo *bi,
837 container_of(bi, struct vmw_ctx_bindinfo_so, bi);
846 if (!biso->bi.ctx)
849 if (!biso->bi.scrubbed) {
850 so_buffer->sid = biso->bi.res->id;
868 const struct vmw_ctx_bindinfo *loc = &cbs->so_targets[0].bi;
927 * @bi: Pointer to where the binding info array is stored in @cbs
929 * @max_num: Maximum number of entries in the @bi array.
931 * Scans the @bi array for bindings that need to be emitted and
938 const struct vmw_ctx_bindinfo *bi,
943 container_of(bi, struct vmw_ctx_bindinfo_vb, bi);
954 if (!biv->bi.ctx || biv->bi.scrubbed) {
959 vbs->sid = biv->bi.res->id;
981 &cbs->vertex_buffers[0].bi;
1061 * @bi: single binding information.
1064 static int vmw_binding_scrub_sr(struct vmw_ctx_bindinfo *bi, bool rebind)
1067 container_of(bi, struct vmw_ctx_bindinfo_view, bi);
1069 vmw_context_binding_state(bi->ctx);
1083 * @bi: single binding information.
1086 static int vmw_binding_scrub_dx_rt(struct vmw_ctx_bindinfo *bi, bool rebind)
1089 vmw_context_binding_state(bi->ctx);
1100 * @bi: single binding information.
1103 static int vmw_binding_scrub_so(struct vmw_ctx_bindinfo *bi, bool rebind)
1106 vmw_context_binding_state(bi->ctx);
1117 * @bi: single binding information.
1120 static int vmw_binding_scrub_vb(struct vmw_ctx_bindinfo *bi, bool rebind)
1123 container_of(bi, struct vmw_ctx_bindinfo_vb, bi);
1125 vmw_context_binding_state(bi->ctx);
1136 * @bi: single binding information.
1139 static int vmw_binding_scrub_ib(struct vmw_ctx_bindinfo *bi, bool rebind)
1142 container_of(bi, typeof(*binding), bi);
1143 struct vmw_private *dev_priv = bi->ctx->dev_priv;
1149 cmd = VMW_FIFO_RESERVE_DX(dev_priv, sizeof(*cmd), bi->ctx->id);
1156 cmd->body.sid = bi->res->id;