Lines Matching full:binding
28 * This file implements the vmwgfx context binding manager,
41 * already killed if a resource to which a binding points
47 * to protect all binding manager data.
50 * (surface, shader or even DX query) is conceptually a context binding that
69 * struct vmw_ctx_binding_state - per context binding state
75 * @ds_view: Depth-stencil view binding.
78 * @index_buffer: Index buffer binding.
82 * @dirty: Bitmap tracking per binding-type changes that have not yet
84 * @dirty_vb: Bitmap tracking individual vertex buffer binding changes that
86 * @bind_cmd_buffer: Scratch space used to construct binding commands.
87 * @bind_cmd_count: Number of binding command data entries in @bind_cmd_buffer
89 * device binding slot of the first command data entry in @bind_cmd_buffer.
139 * struct vmw_binding_info - Per binding type information for the binding
142 * @size: The size of the struct binding derived from a struct vmw_ctx_bindinfo.
144 * of struct bindings for the binding type.
145 * @scrub_func: Pointer to the scrub function for this binding type.
147 * Holds static information to help optimize the binding manager and avoid
158 * location of the struct vmw_ctx_bindinfo slots for each binding type.
273 * context binding state tracker.
275 * @cbs: The context binding state tracker.
279 * binding state tracker. If there are no active bindings, this function
297 * @bt: The binding type.
298 * @shader_slot: The shader slot of the binding. If none, then set to 0.
299 * @slot: The slot of the binding.
312 * vmw_binding_drop: Stop tracking a context binding
314 * @bi: Pointer to binding tracker storage.
316 * Stops tracking a context binding, and re-initializes its storage.
317 * Typically used when the context binding is replaced with a binding to
329 * vmw_binding_add: Start tracking a context binding
331 * @cbs: Pointer to the context binding state tracker.
332 * @bi: Information about the binding to track.
333 * @shader_slot: The shader slot of the binding.
334 * @slot: The slot of the binding.
336 * Starts tracking the binding in the context binding
358 * @cbs: Pointer to the context binding state tracker.
369 * vmw_binding_transfer: Transfer a context binding tracking entry.
371 * @cbs: Pointer to the persistent context binding state tracker.
372 * @from: Staged binding info built during execbuf
373 * @bi: Information about the binding to track.
401 * @cbs: Pointer to the context binding state tracker.
404 * context binding state tracker. Then re-initializes the whole structure.
419 * @cbs: Pointer to the context binding state tracker.
422 * context binding state tracker.
441 * resource binding list
443 * @head: list head of resource binding list
459 * resource binding list
461 * @head: list head of resource binding list
488 * vmw_binding_state_commit - Commit staged binding info
490 * @to: Staged binding info area to copy into to.
491 * @from: Staged binding info built during execbuf.
493 * Transfers binding info from a temporary structure
516 * @cbs: Pointer to the context binding state tracker.
518 * Walks through the context binding list and rebinds all scrubbed
545 * vmw_binding_scrub_shader - scrub a shader binding from a context.
547 * @bi: single binding information.
552 struct vmw_ctx_bindinfo_shader *binding = in vmw_binding_scrub_shader() local
553 container_of(bi, typeof(*binding), bi); in vmw_binding_scrub_shader()
567 cmd->body.type = binding->shader_slot + SVGA3D_SHADERTYPE_MIN; in vmw_binding_scrub_shader()
575 * vmw_binding_scrub_render_target - scrub a render target binding
578 * @bi: single binding information.
584 struct vmw_ctx_bindinfo_view *binding = in vmw_binding_scrub_render_target() local
585 container_of(bi, typeof(*binding), bi); in vmw_binding_scrub_render_target()
599 cmd->body.type = binding->slot; in vmw_binding_scrub_render_target()
609 * vmw_binding_scrub_texture - scrub a texture binding from a context.
611 * @bi: single binding information.
620 struct vmw_ctx_bindinfo_tex *binding = in vmw_binding_scrub_texture() local
621 container_of(bi, typeof(*binding), bi); in vmw_binding_scrub_texture()
638 cmd->body.s1.stage = binding->texture_stage; in vmw_binding_scrub_texture()
647 * vmw_binding_scrub_dx_shader - scrub a dx shader binding from a context.
649 * @bi: single binding information.
654 struct vmw_ctx_bindinfo_shader *binding = in vmw_binding_scrub_dx_shader() local
655 container_of(bi, typeof(*binding), bi); in vmw_binding_scrub_dx_shader()
668 cmd->body.type = binding->shader_slot + SVGA3D_SHADERTYPE_MIN; in vmw_binding_scrub_dx_shader()
676 * vmw_binding_scrub_cb - scrub a constant buffer binding from a context.
678 * @bi: single binding information.
683 struct vmw_ctx_bindinfo_cb *binding = in vmw_binding_scrub_cb() local
684 container_of(bi, typeof(*binding), bi); in vmw_binding_scrub_cb()
697 cmd->body.slot = binding->slot; in vmw_binding_scrub_cb()
698 cmd->body.type = binding->shader_slot + SVGA3D_SHADERTYPE_MIN; in vmw_binding_scrub_cb()
700 cmd->body.offsetInBytes = binding->offset; in vmw_binding_scrub_cb()
701 cmd->body.sizeInBytes = binding->size; in vmw_binding_scrub_cb()
714 * vmw_collect_view_ids - Build view id data for a view binding command
718 * @biv: Pointer to where the binding info array is stored in @cbs
722 * Stops at the first non-existing binding in the @bi array.
747 * vmw_collect_dirty_view_ids - Build view id data for a view binding command
750 * @bi: Pointer to where the binding info array is stored in @cbs
758 * binding, and @cbs->bind_cmd_buffer contains the command data.
789 * vmw_emit_set_sr - Issue delayed DX shader resource binding commands
792 * @shader_slot: The shader slot of the binding.
833 * vmw_emit_set_rt - Issue delayed DX rendertarget binding commands
871 * vmw_collect_so_targets - Build SVGA3dSoTarget data for a binding command
875 * @biso: Pointer to where the binding info array is stored in @cbs
879 * Stops at the first non-existing binding in the @bi array.
912 * vmw_emit_set_so_target - Issue delayed streamout binding commands
947 * vmw_binding_emit_dirty_ps - Issue delayed per shader binding commands
977 * @bi: Pointer to where the binding info array is stored in @cbs
985 * binding, and @cbs->bind_cmd_buffer contains the command data.
1023 * vmw_emit_set_vb - Issue delayed vertex buffer binding commands
1124 * vmw_binding_emit_dirty - Issue delayed binding commands
1128 * This function issues the delayed binding commands that arise from
1129 * previous scrub / unscrub calls. These binding commands are typically
1174 * vmw_binding_scrub_sr - Schedule a dx shaderresource binding
1177 * @bi: single binding information.
1196 * vmw_binding_scrub_dx_rt - Schedule a dx rendertarget binding
1199 * @bi: single binding information.
1213 * vmw_binding_scrub_so_target - Schedule a dx streamoutput buffer binding
1216 * @bi: single binding information.
1230 * vmw_binding_scrub_vb - Schedule a dx vertex buffer binding
1233 * @bi: single binding information.
1250 * vmw_binding_scrub_ib - scrub a dx index buffer binding from a context
1252 * @bi: single binding information.
1257 struct vmw_ctx_bindinfo_ib *binding = in vmw_binding_scrub_ib() local
1258 container_of(bi, typeof(*binding), bi); in vmw_binding_scrub_ib()
1273 cmd->body.format = binding->format; in vmw_binding_scrub_ib()
1274 cmd->body.offset = binding->offset; in vmw_binding_scrub_ib()
1303 * vmw_binding_scrub_so - Scrub a streamoutput binding from context.
1304 * @bi: Single binding information.
1309 struct vmw_ctx_bindinfo_so *binding = in vmw_binding_scrub_so() local
1310 container_of(bi, typeof(*binding), bi); in vmw_binding_scrub_so()
1379 * vmw_binding_state_list - Get the binding list of a
1384 * Returns the binding list which can be used to traverse through the bindings
1397 * Drops all bindings registered in @cbs. No device binding actions are
1409 * vmw_binding_dirtying - Return whether a binding type is dirtying its resource
1410 * @binding_type: The binding type
1413 * context binding referencing it, we need to determine whether that resource
1418 * Return: Whether the binding type dirties the resource its binding points to.