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);
320 static void vmw_binding_drop(struct vmw_ctx_bindinfo *bi) in vmw_binding_drop() argument
322 list_del(&bi->ctx_list); in vmw_binding_drop()
323 if (!list_empty(&bi->res_list)) in vmw_binding_drop()
324 list_del(&bi->res_list); in vmw_binding_drop()
325 bi->ctx = NULL; in vmw_binding_drop()
340 const struct vmw_ctx_bindinfo *bi, in vmw_binding_add() argument
344 vmw_binding_loc(cbs, bi->bt, shader_slot, slot); in vmw_binding_add()
345 const struct vmw_binding_info *b = &vmw_binding_infos[bi->bt]; in vmw_binding_add()
350 memcpy(loc, bi, b->size); in vmw_binding_add()
399 const struct vmw_ctx_bindinfo *bi) in vmw_binding_transfer() argument
401 size_t offset = (unsigned long)bi - (unsigned long)from; in vmw_binding_transfer()
406 WARN_ON(bi->scrubbed); in vmw_binding_transfer()
411 if (bi->res != NULL) { in vmw_binding_transfer()
412 memcpy(loc, bi, vmw_binding_infos[bi->bt].size); in vmw_binding_transfer()
571 static int vmw_binding_scrub_shader(struct vmw_ctx_bindinfo *bi, bool rebind) in vmw_binding_scrub_shader() argument
574 container_of(bi, typeof(*binding), bi); in vmw_binding_scrub_shader()
575 struct vmw_private *dev_priv = bi->ctx->dev_priv; in vmw_binding_scrub_shader()
587 cmd->body.cid = bi->ctx->id; in vmw_binding_scrub_shader()
589 cmd->body.shid = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID); in vmw_binding_scrub_shader()
602 static int vmw_binding_scrub_render_target(struct vmw_ctx_bindinfo *bi, in vmw_binding_scrub_render_target() argument
606 container_of(bi, typeof(*binding), bi); in vmw_binding_scrub_render_target()
607 struct vmw_private *dev_priv = bi->ctx->dev_priv; in vmw_binding_scrub_render_target()
619 cmd->body.cid = bi->ctx->id; in vmw_binding_scrub_render_target()
621 cmd->body.target.sid = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID); in vmw_binding_scrub_render_target()
638 static int vmw_binding_scrub_texture(struct vmw_ctx_bindinfo *bi, in vmw_binding_scrub_texture() argument
642 container_of(bi, typeof(*binding), bi); in vmw_binding_scrub_texture()
643 struct vmw_private *dev_priv = bi->ctx->dev_priv; in vmw_binding_scrub_texture()
658 cmd->body.c.cid = bi->ctx->id; in vmw_binding_scrub_texture()
661 cmd->body.s1.value = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID); in vmw_binding_scrub_texture()
673 static int vmw_binding_scrub_dx_shader(struct vmw_ctx_bindinfo *bi, bool rebind) in vmw_binding_scrub_dx_shader() argument
676 container_of(bi, typeof(*binding), bi); in vmw_binding_scrub_dx_shader()
677 struct vmw_private *dev_priv = bi->ctx->dev_priv; in vmw_binding_scrub_dx_shader()
683 cmd = VMW_CMD_CTX_RESERVE(dev_priv, sizeof(*cmd), bi->ctx->id); in vmw_binding_scrub_dx_shader()
690 cmd->body.shaderId = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID); in vmw_binding_scrub_dx_shader()
702 static int vmw_binding_scrub_cb(struct vmw_ctx_bindinfo *bi, bool rebind) in vmw_binding_scrub_cb() argument
705 container_of(bi, typeof(*binding), bi); in vmw_binding_scrub_cb()
706 struct vmw_private *dev_priv = bi->ctx->dev_priv; in vmw_binding_scrub_cb()
712 cmd = VMW_CMD_CTX_RESERVE(dev_priv, sizeof(*cmd), bi->ctx->id); in vmw_binding_scrub_cb()
723 cmd->body.sid = bi->res->id; in vmw_binding_scrub_cb()
758 if (!biv->bi.ctx) in vmw_collect_view_ids()
762 ((biv->bi.scrubbed) ? in vmw_collect_view_ids()
763 SVGA3D_INVALID_ID : biv->bi.res->id); in vmw_collect_view_ids()
782 const struct vmw_ctx_bindinfo *bi, in vmw_collect_dirty_view_ids() argument
787 container_of(bi, struct vmw_ctx_bindinfo_view, bi); in vmw_collect_dirty_view_ids()
798 ((!biv->bi.ctx || biv->bi.scrubbed) ? in vmw_collect_dirty_view_ids()
799 SVGA3D_INVALID_ID : biv->bi.res->id); in vmw_collect_dirty_view_ids()
819 &cbs->per_shader[shader_slot].shader_res[0].bi; in vmw_emit_set_sr()
878 if (cbs->ds_view.bi.ctx && !cbs->ds_view.bi.scrubbed) in vmw_emit_set_rt()
879 cmd->body.depthStencilViewId = cbs->ds_view.bi.res->id; in vmw_emit_set_rt()
917 if (!biso->bi.ctx) in vmw_collect_so_targets()
920 if (!biso->bi.scrubbed) { in vmw_collect_so_targets()
921 so_buffer->sid = biso->bi.res->id; in vmw_collect_so_targets()
1009 const struct vmw_ctx_bindinfo *bi, in vmw_collect_dirty_vbs() argument
1014 container_of(bi, struct vmw_ctx_bindinfo_vb, bi); in vmw_collect_dirty_vbs()
1025 if (!biv->bi.ctx || biv->bi.scrubbed) { in vmw_collect_dirty_vbs()
1030 vbs->sid = biv->bi.res->id; in vmw_collect_dirty_vbs()
1052 &cbs->vertex_buffers[0].bi; in vmw_emit_set_vb()
1201 static int vmw_binding_scrub_sr(struct vmw_ctx_bindinfo *bi, bool rebind) in vmw_binding_scrub_sr() argument
1204 container_of(bi, struct vmw_ctx_bindinfo_view, bi); in vmw_binding_scrub_sr()
1206 vmw_context_binding_state(bi->ctx); in vmw_binding_scrub_sr()
1223 static int vmw_binding_scrub_dx_rt(struct vmw_ctx_bindinfo *bi, bool rebind) in vmw_binding_scrub_dx_rt() argument
1226 vmw_context_binding_state(bi->ctx); in vmw_binding_scrub_dx_rt()
1240 static int vmw_binding_scrub_so_target(struct vmw_ctx_bindinfo *bi, bool rebind) in vmw_binding_scrub_so_target() argument
1243 vmw_context_binding_state(bi->ctx); in vmw_binding_scrub_so_target()
1257 static int vmw_binding_scrub_vb(struct vmw_ctx_bindinfo *bi, bool rebind) in vmw_binding_scrub_vb() argument
1260 container_of(bi, struct vmw_ctx_bindinfo_vb, bi); in vmw_binding_scrub_vb()
1262 vmw_context_binding_state(bi->ctx); in vmw_binding_scrub_vb()
1276 static int vmw_binding_scrub_ib(struct vmw_ctx_bindinfo *bi, bool rebind) in vmw_binding_scrub_ib() argument
1279 container_of(bi, typeof(*binding), bi); in vmw_binding_scrub_ib()
1280 struct vmw_private *dev_priv = bi->ctx->dev_priv; in vmw_binding_scrub_ib()
1286 cmd = VMW_CMD_CTX_RESERVE(dev_priv, sizeof(*cmd), bi->ctx->id); in vmw_binding_scrub_ib()
1293 cmd->body.sid = bi->res->id; in vmw_binding_scrub_ib()
1307 static int vmw_binding_scrub_uav(struct vmw_ctx_bindinfo *bi, bool rebind) in vmw_binding_scrub_uav() argument
1309 struct vmw_ctx_binding_state *cbs = vmw_context_binding_state(bi->ctx); in vmw_binding_scrub_uav()
1315 static int vmw_binding_scrub_cs_uav(struct vmw_ctx_bindinfo *bi, bool rebind) in vmw_binding_scrub_cs_uav() argument
1317 struct vmw_ctx_binding_state *cbs = vmw_context_binding_state(bi->ctx); in vmw_binding_scrub_cs_uav()
1328 static int vmw_binding_scrub_so(struct vmw_ctx_bindinfo *bi, bool rebind) in vmw_binding_scrub_so() argument
1331 container_of(bi, typeof(*binding), bi); in vmw_binding_scrub_so()
1332 struct vmw_private *dev_priv = bi->ctx->dev_priv; in vmw_binding_scrub_so()
1338 cmd = VMW_CMD_CTX_RESERVE(dev_priv, sizeof(*cmd), bi->ctx->id); in vmw_binding_scrub_so()
1344 cmd->body.soid = rebind ? bi->res->id : SVGA3D_INVALID_ID; in vmw_binding_scrub_so()