vmw_compat_shader_add(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

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