Lines Matching refs:bi

117 static int vmw_binding_scrub_shader(struct vmw_ctx_bindinfo *bi, bool rebind);
118 static int vmw_binding_scrub_render_target(struct vmw_ctx_bindinfo *bi,
120 static int vmw_binding_scrub_texture(struct vmw_ctx_bindinfo *bi, bool rebind);
121 static int vmw_binding_scrub_cb(struct vmw_ctx_bindinfo *bi, bool rebind);
122 static int vmw_binding_scrub_dx_rt(struct vmw_ctx_bindinfo *bi, bool rebind);
123 static int vmw_binding_scrub_sr(struct vmw_ctx_bindinfo *bi, bool rebind);
124 static int vmw_binding_scrub_so_target(struct vmw_ctx_bindinfo *bi, bool rebind);
126 static int vmw_binding_scrub_dx_shader(struct vmw_ctx_bindinfo *bi,
128 static int vmw_binding_scrub_ib(struct vmw_ctx_bindinfo *bi, bool rebind);
129 static int vmw_binding_scrub_vb(struct vmw_ctx_bindinfo *bi, bool rebind);
130 static int vmw_binding_scrub_uav(struct vmw_ctx_bindinfo *bi, bool rebind);
131 static int vmw_binding_scrub_cs_uav(struct vmw_ctx_bindinfo *bi, bool rebind);
132 static int vmw_binding_scrub_so(struct vmw_ctx_bindinfo *bi, bool rebind);
314 * @bi: Pointer to binding tracker storage.
320 static void vmw_binding_drop(struct vmw_ctx_bindinfo *bi)
322 list_del(&bi->ctx_list);
323 if (!list_empty(&bi->res_list))
324 list_del(&bi->res_list);
325 bi->ctx = NULL;
332 * @bi: Information about the binding to track.
340 const struct vmw_ctx_bindinfo *bi,
344 vmw_binding_loc(cbs, bi->bt, shader_slot, slot);
345 const struct vmw_binding_info *b = &vmw_binding_infos[bi->bt];
350 memcpy(loc, bi, b->size);
394 * @bi: Information about the binding to track.
399 const struct vmw_ctx_bindinfo *bi)
401 size_t offset = (unsigned long)bi - (unsigned long)from;
406 WARN_ON(bi->scrubbed);
411 if (bi->res != NULL) {
412 memcpy(loc, bi, vmw_binding_infos[bi->bt].size);
568 * @bi: single binding information.
571 static int vmw_binding_scrub_shader(struct vmw_ctx_bindinfo *bi, bool rebind)
574 container_of(bi, typeof(*binding), bi);
575 struct vmw_private *dev_priv = bi->ctx->dev_priv;
587 cmd->body.cid = bi->ctx->id;
589 cmd->body.shid = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID);
599 * @bi: single binding information.
602 static int vmw_binding_scrub_render_target(struct vmw_ctx_bindinfo *bi,
606 container_of(bi, typeof(*binding), bi);
607 struct vmw_private *dev_priv = bi->ctx->dev_priv;
619 cmd->body.cid = bi->ctx->id;
621 cmd->body.target.sid = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID);
632 * @bi: single binding information.
638 static int vmw_binding_scrub_texture(struct vmw_ctx_bindinfo *bi,
642 container_of(bi, typeof(*binding), bi);
643 struct vmw_private *dev_priv = bi->ctx->dev_priv;
658 cmd->body.c.cid = bi->ctx->id;
661 cmd->body.s1.value = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID);
670 * @bi: single binding information.
673 static int vmw_binding_scrub_dx_shader(struct vmw_ctx_bindinfo *bi, bool rebind)
676 container_of(bi, typeof(*binding), bi);
677 struct vmw_private *dev_priv = bi->ctx->dev_priv;
683 cmd = VMW_CMD_CTX_RESERVE(dev_priv, sizeof(*cmd), bi->ctx->id);
690 cmd->body.shaderId = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID);
699 * @bi: single binding information.
702 static int vmw_binding_scrub_cb(struct vmw_ctx_bindinfo *bi, bool rebind)
705 container_of(bi, typeof(*binding), bi);
706 struct vmw_private *dev_priv = bi->ctx->dev_priv;
712 cmd = VMW_CMD_CTX_RESERVE(dev_priv, sizeof(*cmd), bi->ctx->id);
723 cmd->body.sid = bi->res->id;
740 * @max_num: Maximum number of entries in the @bi array.
742 * Scans the @bi array for bindings and builds a buffer of view id data.
743 * Stops at the first non-existing binding in the @bi array.
758 if (!biv->bi.ctx)
762 ((biv->bi.scrubbed) ?
763 SVGA3D_INVALID_ID : biv->bi.res->id);
771 * @bi: Pointer to where the binding info array is stored in @cbs
773 * @max_num: Maximum number of entries in the @bi array.
775 * Scans the @bi array for bindings that need to be emitted and
782 const struct vmw_ctx_bindinfo *bi,
787 container_of(bi, struct vmw_ctx_bindinfo_view, bi);
798 ((!biv->bi.ctx || biv->bi.scrubbed) ?
799 SVGA3D_INVALID_ID : biv->bi.res->id);
819 &cbs->per_shader[shader_slot].shader_res[0].bi;
878 if (cbs->ds_view.bi.ctx && !cbs->ds_view.bi.scrubbed)
879 cmd->body.depthStencilViewId = cbs->ds_view.bi.res->id;
897 * @max_num: Maximum number of entries in the @bi array.
899 * Scans the @bi array for bindings and builds a buffer of SVGA3dSoTarget data.
900 * Stops at the first non-existing binding in the @bi array.
917 if (!biso->bi.ctx)
920 if (!biso->bi.scrubbed) {
921 so_buffer->sid = biso->bi.res->id;
998 * @bi: Pointer to where the binding info array is stored in @cbs
1000 * @max_num: Maximum number of entries in the @bi array.
1002 * Scans the @bi array for bindings that need to be emitted and
1009 const struct vmw_ctx_bindinfo *bi,
1014 container_of(bi, struct vmw_ctx_bindinfo_vb, bi);
1025 if (!biv->bi.ctx || biv->bi.scrubbed) {
1030 vbs->sid = biv->bi.res->id;
1052 &cbs->vertex_buffers[0].bi;
1198 * @bi: single binding information.
1201 static int vmw_binding_scrub_sr(struct vmw_ctx_bindinfo *bi, bool rebind)
1204 container_of(bi, struct vmw_ctx_bindinfo_view, bi);
1206 vmw_context_binding_state(bi->ctx);
1220 * @bi: single binding information.
1223 static int vmw_binding_scrub_dx_rt(struct vmw_ctx_bindinfo *bi, bool rebind)
1226 vmw_context_binding_state(bi->ctx);
1237 * @bi: single binding information.
1240 static int vmw_binding_scrub_so_target(struct vmw_ctx_bindinfo *bi, bool rebind)
1243 vmw_context_binding_state(bi->ctx);
1254 * @bi: single binding information.
1257 static int vmw_binding_scrub_vb(struct vmw_ctx_bindinfo *bi, bool rebind)
1260 container_of(bi, struct vmw_ctx_bindinfo_vb, bi);
1262 vmw_context_binding_state(bi->ctx);
1273 * @bi: single binding information.
1276 static int vmw_binding_scrub_ib(struct vmw_ctx_bindinfo *bi, bool rebind)
1279 container_of(bi, typeof(*binding), bi);
1280 struct vmw_private *dev_priv = bi->ctx->dev_priv;
1286 cmd = VMW_CMD_CTX_RESERVE(dev_priv, sizeof(*cmd), bi->ctx->id);
1293 cmd->body.sid = bi->res->id;
1307 static int vmw_binding_scrub_uav(struct vmw_ctx_bindinfo *bi, bool rebind)
1309 struct vmw_ctx_binding_state *cbs = vmw_context_binding_state(bi->ctx);
1315 static int vmw_binding_scrub_cs_uav(struct vmw_ctx_bindinfo *bi, bool rebind)
1317 struct vmw_ctx_binding_state *cbs = vmw_context_binding_state(bi->ctx);
1325 * @bi: Single binding information.
1328 static int vmw_binding_scrub_so(struct vmw_ctx_bindinfo *bi, bool rebind)
1331 container_of(bi, typeof(*binding), bi);
1332 struct vmw_private *dev_priv = bi->ctx->dev_priv;
1338 cmd = VMW_CMD_CTX_RESERVE(dev_priv, sizeof(*cmd), bi->ctx->id);
1344 cmd->body.soid = rebind ? bi->res->id : SVGA3D_INVALID_ID;