vmw_shader_lookup(9)
π vmw_shader_lookup β bestie, let's find that shader
okay so this is a page from the Kernel API Manual (section 9, kernel-space icon behavior only, no userland shenanigans) and it's literally about one thing: looking up a compat shader. that's it. that's the whole vibe. π
β¨ SYNOPSIS β¨
struct vmw_resource * vmw_shader_lookup (struct vmw_cmdbuf_res_manager
*man , u32 user_key , SVGA3dShaderType shader_type );
like, yes, the line break in the middle is ugly, but that's the signature, bestie β copy it exactly and don't come for me. π
πΈ ARGUMENTS πΈ
manβ pointer to the command buffer managed resource manager, which is the thing that identifies the shader namespace. think of it as the group chat where this shader lives. π«Άuser_keyβ the user space id of the shader. it's giving "i'm looking for my friend, here's their @". β¨shader_typeβ the shader type. congrats, that's the whole description, no notes. π
π DESCRIPTION π
so here's the tea: if the shader was found, you get back a refcounted pointer to a struct vmw_resource. refcounted means somebody's keeping tally, so be a good citizen and don't just ghost it. π
if it wasn't found? you get an error pointer instead. not NULL, babe β an error pointer. use your IS_ERR() checks, iykyk. π§
that's genuinely the entire function. short and iconic. periodt. π
π¦ SEE ALSO π¦
- Kernel file
./drivers/gpu/drm/vmwgfx/vmwgfx_shader.c 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_compat_shader_add(9)
like the whole shader friend group, all here, all slaying. π₯
ngl the "cotable" one is a whole mouthful, but i believe in you. π
and that's the page!! π source ./drivers/gpu/drm/vmwgfx, dated October 2026, and the manual is vmw_shader_lookup(9) in the Kernel API Manual β mwah, go read your error pointers responsibly bestie ππβ
π¦ 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