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.
338 const struct vmw_ctx_bindinfo *bi,
342 vmw_binding_loc(cbs, bi->bt, shader_slot, slot);
343 const struct vmw_binding_info *b = &vmw_binding_infos[bi->bt];
348 memcpy(loc, bi, b->size);
370 * @bi: Information about the binding to track.
375 const struct vmw_ctx_bindinfo *bi)
377 size_t offset = (unsigned long)bi - (unsigned long)from;
382 WARN_ON(bi->scrubbed);
387 if (bi->res != NULL) {
388 memcpy(loc, bi, vmw_binding_infos[bi->bt].size);
545 * @bi: single binding information.
548 static int vmw_binding_scrub_shader(struct vmw_ctx_bindinfo *bi, bool rebind)
551 container_of(bi, typeof(*binding), bi);
552 struct vmw_private *dev_priv = bi->ctx->dev_priv;
564 cmd->body.cid = bi->ctx->id;
566 cmd->body.shid = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID);
576 * @bi: single binding information.
579 static int vmw_binding_scrub_render_target(struct vmw_ctx_bindinfo *bi,
583 container_of(bi, typeof(*binding), bi);
584 struct vmw_private *dev_priv = bi->ctx->dev_priv;
596 cmd->body.cid = bi->ctx->id;
598 cmd->body.target.sid = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID);
609 * @bi: single binding information.
615 static int vmw_binding_scrub_texture(struct vmw_ctx_bindinfo *bi,
619 container_of(bi, typeof(*binding), bi);
620 struct vmw_private *dev_priv = bi->ctx->dev_priv;
635 cmd->body.c.cid = bi->ctx->id;
638 cmd->body.s1.value = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID);
647 * @bi: single binding information.
650 static int vmw_binding_scrub_dx_shader(struct vmw_ctx_bindinfo *bi, bool rebind)
653 container_of(bi, typeof(*binding), bi);
654 struct vmw_private *dev_priv = bi->ctx->dev_priv;
660 cmd = VMW_FIFO_RESERVE_DX(dev_priv, sizeof(*cmd), bi->ctx->id);
667 cmd->body.shaderId = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID);
676 * @bi: single binding information.
679 static int vmw_binding_scrub_cb(struct vmw_ctx_bindinfo *bi, bool rebind)
682 container_of(bi, typeof(*binding), bi);
683 struct vmw_private *dev_priv = bi->ctx->dev_priv;
689 cmd = VMW_FIFO_RESERVE_DX(dev_priv, sizeof(*cmd), bi->ctx->id);
700 cmd->body.sid = bi->res->id;
716 * @bi: Pointer to where the binding info array is stored in @cbs
717 * @max_num: Maximum number of entries in the @bi array.
719 * Scans the @bi array for bindings and builds a buffer of view id data.
720 * Stops at the first non-existing binding in the @bi array.
726 const struct vmw_ctx_bindinfo *bi,
730 container_of(bi, struct vmw_ctx_bindinfo_view, bi);
737 if (!biv->bi.ctx)
741 ((biv->bi.scrubbed) ?
742 SVGA3D_INVALID_ID : biv->bi.res->id);
750 * @bi: Pointer to where the binding info array is stored in @cbs
752 * @max_num: Maximum number of entries in the @bi array.
754 * Scans the @bi array for bindings that need to be emitted and
761 const struct vmw_ctx_bindinfo *bi,
766 container_of(bi, struct vmw_ctx_bindinfo_view, bi);
777 ((!biv->bi.ctx || biv->bi.scrubbed) ?
778 SVGA3D_INVALID_ID : biv->bi.res->id);
797 &cbs->per_shader[shader_slot].shader_res[0].bi;
838 const struct vmw_ctx_bindinfo *loc = &cbs->render_targets[0].bi;
856 if (cbs->ds_view.bi.ctx && !cbs->ds_view.bi.scrubbed)
857 cmd->body.depthStencilViewId = cbs->ds_view.bi.res->id;
874 * @bi: Pointer to where the binding info array is stored in @cbs
875 * @max_num: Maximum number of entries in the @bi array.
877 * Scans the @bi array for bindings and builds a buffer of SVGA3dSoTarget data.
878 * Stops at the first non-existing binding in the @bi array.
884 const struct vmw_ctx_bindinfo *bi,
888 container_of(bi, struct vmw_ctx_bindinfo_so_target, bi);
897 if (!biso->bi.ctx)
900 if (!biso->bi.scrubbed) {
901 so_buffer->sid = biso->bi.res->id;
919 const struct vmw_ctx_bindinfo *loc = &cbs->so_targets[0].bi;
978 * @bi: Pointer to where the binding info array is stored in @cbs
980 * @max_num: Maximum number of entries in the @bi array.
982 * Scans the @bi array for bindings that need to be emitted and
989 const struct vmw_ctx_bindinfo *bi,
994 container_of(bi, struct vmw_ctx_bindinfo_vb, bi);
1005 if (!biv->bi.ctx || biv->bi.scrubbed) {
1010 vbs->sid = biv->bi.res->id;
1032 &cbs->vertex_buffers[0].bi;
1066 const struct vmw_ctx_bindinfo *loc = &cbs->ua_views[0].views[0].bi;
1096 const struct vmw_ctx_bindinfo *loc = &cbs->ua_views[1].views[0].bi;
1178 * @bi: single binding information.
1181 static int vmw_binding_scrub_sr(struct vmw_ctx_bindinfo *bi, bool rebind)
1184 container_of(bi, struct vmw_ctx_bindinfo_view, bi);
1186 vmw_context_binding_state(bi->ctx);
1200 * @bi: single binding information.
1203 static int vmw_binding_scrub_dx_rt(struct vmw_ctx_bindinfo *bi, bool rebind)
1206 vmw_context_binding_state(bi->ctx);
1217 * @bi: single binding information.
1220 static int vmw_binding_scrub_so_target(struct vmw_ctx_bindinfo *bi, bool rebind)
1223 vmw_context_binding_state(bi->ctx);
1234 * @bi: single binding information.
1237 static int vmw_binding_scrub_vb(struct vmw_ctx_bindinfo *bi, bool rebind)
1240 container_of(bi, struct vmw_ctx_bindinfo_vb, bi);
1242 vmw_context_binding_state(bi->ctx);
1253 * @bi: single binding information.
1256 static int vmw_binding_scrub_ib(struct vmw_ctx_bindinfo *bi, bool rebind)
1259 container_of(bi, typeof(*binding), bi);
1260 struct vmw_private *dev_priv = bi->ctx->dev_priv;
1266 cmd = VMW_FIFO_RESERVE_DX(dev_priv, sizeof(*cmd), bi->ctx->id);
1273 cmd->body.sid = bi->res->id;
1287 static int vmw_binding_scrub_uav(struct vmw_ctx_bindinfo *bi, bool rebind)
1289 struct vmw_ctx_binding_state *cbs = vmw_context_binding_state(bi->ctx);
1295 static int vmw_binding_scrub_cs_uav(struct vmw_ctx_bindinfo *bi, bool rebind)
1297 struct vmw_ctx_binding_state *cbs = vmw_context_binding_state(bi->ctx);
1305 * @bi: Single binding information.
1308 static int vmw_binding_scrub_so(struct vmw_ctx_bindinfo *bi, bool rebind)
1311 container_of(bi, typeof(*binding), bi);
1312 struct vmw_private *dev_priv = bi->ctx->dev_priv;
1318 cmd = VMW_FIFO_RESERVE_DX(dev_priv, sizeof(*cmd), bi->ctx->id);
1324 cmd->body.soid = rebind ? bi->res->id : SVGA3D_INVALID_ID;