STRUCT DRM_VMW_SHADER_CREATE_ARG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 by buffer_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