vmw_compat_shader_add(9)
π vmw_compat_shader_add β a kernel API manual moment π
okay so bestie, welcome to the vmw_compat_shader_add(9) page β yes that's the manual name, yes it goes in the title, and yes we're doing this. this is the Kernel API Manual, fourth section, and it's giving driver internals main character energy β¨
β¨ NAME β¨
vmw_compat_shader_add β create a compat shader and stage it for addition as a command buffer managed resource π«
like, the whole vibe is: you make the shader, and you stage it so it can get added later as a command buffer managed resource. no cap.
πΈ SYNOPSIS πΈ
int vmw_compat_shader_add (struct vmw_private *dev_priv , struct
vmw_cmdbuf_res_manager *man , u32 user_key , const void *bytecode ,
SVGA3dShaderType shader_type , size_t size , struct list_head *list );
she returns an int, she takes seven things, she's iconic, periodt π₯
π¦ ARGUMENTS π¦
seven besties walk into a function call and honestly each one matters:
dev_privβ pointer to the device private structure. that's your device's whole personality in a struct π«Άmanβ pointer to the compat shader manager identifying the shader namespace. think of it as the group chat that knows which shader namespace we're in π¬user_keyβ the key used to identify the shader. important: the key is unique to the shader type β so don't be out here assuming it's globally unique, because it is not, bestie πbytecodeβ pointer to the bytecode of the shader. the actual shader content, the literal moment, the whole point πshader_typeβ shader type.SVGA3dShaderType, that's the type of the type, we love to see it πsizeβ command size. how big it is, in command units, and that's all the manual says so that's all I'm saying either βlistβ the caller's list of staged command buffer resource actions. your very own list, your very own staging area, your very own slay π
π SEE ALSO π
go read the source, she's right here in the kernel file:
./drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
and the whole friend group, in this exact order because we respect the order:
vmw_res_to_dx_shader(9)vmw_dx_shader_commit_notify(9)vmw_dx_shader_unscrub(9)vmw_dx_shader_create(9)vmw_dx_shader_bind(9)vmw_dx_shader_scrub(9)vmw_dx_shader_unbind(9)vmw_dx_shader_cotable_list_scrub(9)vmw_dx_shader_res_free(9)vmw_dx_shader_add(9)vmw_shader_id_ok(9)vmw_shader_key(9)vmw_shader_remove(9)vmw_shader_lookup(9)
like that's the whole squad, no one gets left out π
bestie reminder: the only sane expectations here are the ones printed above. no invented behaviour, no extra tips β this page is a vibe check, not a bonus round π§
and that's the page!! πΈ source is ./drivers/gpu/drm/vmwgfx, dated October 2026, and yes she ships as vmw_compat_shader_add(9) β mwah, take care of her, iykyk π
π
π¦ 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