STRUCT DRM_VMW_SHADER_CREATE_ARG(9)
πΈ struct drm_vmw_shader_create_arg(9) πΈ
okay bestie, so this is a page straight out of the Kernel API Manual β like, the actual kernel docs, not a vibe I made up π
. We're talking about struct drm_vmw_shader_create_arg, and yes the header is doing that cute little truncation thing (struct drm_v...r_create_arg(9)) because the full name is lowkey a whole paragraph. Anyway. Sit down, grab a strawberry π, let's get into it.
β¨ NAME β¨
struct drm_vmw_shader_create_arg β that's it, that's the name. The original literally just leaves it blank after the dash, which is honestly iconic main character energy: the struct speaks for itself. π
π SYNOPSIS π
Here's the whole struct, character for character, no cap:
struct drm_vmw_shader_create_arg {
enum drm_vmw_shader_type shader_type;
__u32 size;
__u32 buffer_handle;
__u32 shader_handle;
__u64 offset;
};
Like, five fields, all of them important, none of them filler. Slay. β¨
π Members π
shader_typeβ the shader type of the shader you're creating. Which shader? The shader. The type tells you what kind. Type-coded, honestly. π«sizeβ the size of the byte-code, in bytes. This is also where the shader byte-code starts. Yes, it's doing double duty β size and starting point. Multitasking queen. πbuffer_handleβ the buffer handle that identifies the buffer containing the shader byte-code. It's giving "here's where my code lives." πshader_handleβ on successful completion, this contains a handle you can use to subsequently identify the shader. So if everything goes right, you get a little name tag for your shader to wear forever. πoffsetβ offset in bytes into the buffer given bybuffer_handle, (yes, the original has that trailing comma, we don't judge, we celebrate π«Ά).
π¦ Description π¦
So what is this thing? It's the input / output argument to the DRM_VMW_CREATE_SHADER Ioctl. That's the whole description. Short, sweet, to the point β an absolute icon of not over-explaining. β
ngl, "input / output argument" is the key phrase here β it goes in, and stuff comes back out in it too, so don't treat it like a read-only little guy. π
π SEE ALSO π
okay this is the part where the kernel doc just lists, like, everybody it knows. full squad. no one left behind. π₯ The kernel file is ./include/uapi/drm/vmwgfx_drm.h, and here's the entire friend group:
enum drm_vmw_handle_type(9)struct drm_vmw_getparam_arg(9)struct drm_vmw_size(9)union drm_vmw_surface_create_arg(9)struct drm_vmw_fence_rep(9)struct drm_vmw_bo_rep(9)union drm_vmw_alloc_bo_arg(9)struct drm_vmw_control_stream_arg(9)struct drm_vmw_cursor_bypass_arg(9)struct drm_vmw_fence_wait_arg(9)struct drm_vmw_fence_event_arg(9)struct drm_vmw_gb_surface_create_req(9)struct drm_vmw_gb_surface_create_rep(9)union drm_vmw_gb_surface_create_arg(9)union drm_vmw_gb_surface_reference_arg(9)enum drm_vmw_synccpu_op(9)struct drm_vmw_synccpu_arg(9)union drm_vmw_extended_context_arg(9)struct drm_vmw_handle_close_arg(9)struct drm_vmw_gb_surface_create_ext_req(9)union drm_vmw_gb_surface_create_ext_arg(9)union drm_vmw_gb_surface_reference_ext_arg(9)struct drm_vmw_msg_arg(9)struct drm_vmw_mksstat_add_arg(9)struct drm_vmw_mksstat_remove_arg(9)
that's 25 references, i counted, and every single one of them made the list because i would never ghost a struct. π
and that's the page!! π§π it came from ./include/uapi/drm and it's dated October 2026, so likeβ¦ future vibes, honestly. consider this your cute little sign-off: go forth, create your shaders, and remember your shader_handle is only valid on successful completion, bestie β check your return values, periodt. π
β¨
π¦ 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