STRUCT VMW_CTX_BINDING_STATE(9)
π struct vmw_ctx_binding_state(9) β Kernel API Manual π
okay so bestie, welcome to the manual page for struct vmw_ctx_binding_state, straight out of the Kernel API Manual. grab your iced coffee, we're getting into it β¨
β¨ NAME β¨
struct vmw_ctx_binding_state β per context binding state π β like, the whole mood board of what's bound to a context, all in one struct. iconic behaviour honestly.
πΈ SYNOPSIS πΈ
struct vmw_ctx_binding_state {
struct vmw_private *dev_priv;
struct list_head list;
struct vmw_ctx_bindinfo_view render_targets[SVGA3D_RT_MAX];
struct vmw_ctx_bindinfo_tex texture_units[SVGA3D_NUM_TEXTURE_UNITS];
struct vmw_ctx_bindinfo_view ds_view;
struct vmw_ctx_bindinfo_so_target
so_targets[SVGA3D_DX_MAX_SOTARGETS];
struct vmw_ctx_bindinfo_vb
vertex_buffers[SVGA3D_DX_MAX_VERTEXBUFFERS];
struct vmw_ctx_bindinfo_ib index_buffer;
struct vmw_dx_shader_bindings per_shader[SVGA3D_NUM_SHADERTYPE];
struct vmw_ctx_bindinfo_uav ua_views[VMW_MAX_UAV_BIND_TYPE];
struct vmw_ctx_bindinfo_so so_state;
unsigned long dirty;
unsigned long dirty_vb[BITS_TO_LONGS( SVGA3D_DX_MAX_VERTEXBUFFERS)];
u32 bind_cmd_buffer[VMW_MAX_VIEW_BINDINGS];
u32 bind_cmd_count;
u32 bind_first_slot;
};
(yeah the formatting is a little chaotic, she's doing her best, leave her alone π)
π¦ Members π¦
okay now the cast of characters, one by one, no skipping, we love a complete list π
dev_privβ Pointer to device private structure. the main character of the device world, honestly.listβ linked list of individual active bindings. it's giving group chat of bindings ngl.render_targetsβ Render target bindings. the ones everyone's looking at π―texture_unitsβ Texture units bindings. texture, but make it unit-ed πds_viewβ Depth-stencil view binding. depth AND stencil, overachiever much?so_targetsβ StreamOutput target bindings. stream, output, slay.vertex_buffersβ Vertex buffer bindings. the verts are buffering, respect it.index_bufferβ Index buffer binding. pointing at things, lowkey iconic.per_shaderβ Per shader-type bindings. one for every shader type, because we don't do favourites here.ua_viewsβ UAV bindings. (yes the member is spelledua_views, no I will not be fixing it, that's literally what's in the struct π«Ά)so_stateβ StreamOutput bindings. StreamOutput's other outfit, fr fr.dirtyβ Bitmap tracking per binding-type changes that have not yet been emitted to the device. the "not sent yet, don't @ me" list βdirty_vbβ Bitmap tracking individual vertex buffer binding changes that have not yet been emitted to the device. same energy but per-vertex-buffer, and dare I say even more granular πbind_cmd_bufferβ Scratch space used to construct binding commands. her little arts-and-crafts corner πbind_cmd_countβ Number of binding command data entries inbind_cmd_buffer. (no period in the original, and I'm keeping it that way, we respect the source π)bind_first_slotβ Used together withbind_cmd_bufferto indicate the device binding slot of the first command data entry inbind_cmd_buffer. they're a duo, you can't split them up π«Ά
π Description π
okay so the important thing to know: this structure also provides storage space for the individual struct vmw_ctx_binding objects, so that no dynamic allocation is needed for individual bindings. literally no malloc moment, the storage is already in there, she came prepared β¨π₯
π SEE ALSO π
Kernel file ./drivers/gpu/drm/vmwgfx/vmwgfx_binding.c β and because she's a social butterfly, here's the entire extended friend list, all of them, in order, go say hi π:
struct vmw_binding_info(9)vmw_cbs_context(9)vmw_binding_loc(9)vmw_binding_drop(9)vmw_binding_add(9)vmw_binding_cb_offset_update(9)vmw_binding_add_uav_index(9)vmw_binding_transfer(9)vmw_binding_state_kill(9)vmw_binding_state_scrub(9)vmw_binding_res_list_kill(9)vmw_binding_res_list_scrub(9)vmw_binding_state_commit(9)vmw_binding_rebind_all(9)vmw_binding_scrub_shader(9)vmw_binding_scrub_render_target(9)vmw_binding_scrub_texture(9)vmw_binding_scrub_dx_shader(9)vmw_binding_scrub_cb(9)vmw_collect_view_ids(9)vmw_collect_dirty_view_ids(9)vmw_emit_set_sr(9)vmw_emit_set_rt(9)vmw_collect_so_targets(9)vmw_emit_set_so_target(9)vmw_binding_emit_dirty_ps(9)vmw_collect_dirty_vbs(9)vmw_emit_set_vb(9)vmw_binding_emit_dirty(9)vmw_binding_scrub_sr(9)vmw_binding_scrub_dx_rt(9)vmw_binding_scrub_so_target(9)vmw_binding_scrub_vb(9)vmw_binding_scrub_ib(9)vmw_binding_scrub_so(9)vmw_binding_state_alloc(9)vmw_binding_state_free(9)vmw_binding_state_list(9)vmw_binding_state_reset(9)vmw_binding_dirtying(9)
bestie reminder: this page lives in ./drivers/gpu/drm/vmwgfx, and the version note is October 2026 β so like, dated but make it fashion. don't come for me about it, that's literally the footer info okay ππ
and that's the whole page, mwah, go forth and bind responsibly π β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms