UNION VMW_VIEW_DESTROY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… union vmw_view_destroy(9)

okay bestie, so this is a page from the Kernel API Manual β€” yes the actual kernel API manual, welcome to the group chat πŸŽ€ β€” and it's all about union vmw_view_destroy. It's literally just the command body for destroying a view. Short king of a struct, but iconic. ✨


🌸 NAME 🌸

union vmw_view_destroy β€” the view destruction command body, no cap 🫢


⭐ SYNOPSIS ⭐

union vmw_view_destroy {
    struct SVGA3dCmdDXDestroyRenderTargetView rtv;
    struct SVGA3dCmdDXDestroyShaderResourceView srv;
    struct SVGA3dCmdDXDestroyDepthStencilView dsv;
    struct SVGA3dCmdDXDestroyUAView uav;
    u32 view_id;
 };

πŸ¦‹ Members πŸ¦‹

  • rtv β€” the RenderTarget view destruction command body πŸŽ€
  • srv β€” the ShaderResource view destruction command body 🌸
  • dsv β€” the DepthStencil view destruction command body πŸ’œ
  • view_id β€” a single u32 view id. just one. that's the whole thing. πŸ’…

✨ Description ✨

so here's the vibe check on this union 🧚 the assumption in play is that all the union members are really represented by a single u32 in the command stream. like, every one of them β€” that's the whole bit.

but listen β€” if that's not the case, the size of this union will not equal the size of a u32, and then the assumption is straight-up invalid. ⚠️

and the slay part? we detect that at compile time in the vmw_so_build_asserts function. not at runtime, not at 3am when you're debugging β€” at compile time. obsessed. πŸ”₯


🌈 SEE ALSO 🌈

  • Kernel file ./drivers/gpu/drm/vmwgfx/vmwgfx_so.h β€” go read it, iykyk πŸ“–

and that's the whole page bestie πŸ’– brought to you by ./drivers/gpu/drm/vmwgfx, dated October 2026. periodt. πŸ‘‘

πŸ“¦ where this page comes from