UNION VMW_VIEW_DESTROY(9)
π 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 singleu32view 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
- 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