vmw_surface_subres(9)
π vmw_surface_subres(9) β a Kernel API Manual moment
okay so bestie, welcome to vmw_surface_subres(9), like the actual kernel API manual page, and no cap this one is short and sweet. sit down, grab a strawberry π, we're doing graphics driver math together.
β¨ NAME β¨
vmw_surface_subres β literally just computes the subresource from the layer and the mipmap. that's it. that's the whole job. π
π SYNOPSIS π
u32 vmw_surface_subres (const struct vmw_surface_cache *cache , u32
mip_level , u32 layer );
it gives you back a u32, the subresource. iconic. β¨
πΈ ARGUMENTS πΈ
cacheβ the surface layout data. this is the glow-up info about how the surface is laid out, and you're passing it in const because we look, we don't touch. πmip_levelβ the mipmap level. yes,u32, yes, like the tiny versions of the texture. the mipmap level, bestie. πlayerβ the surface layer. and before you ask, that's the face or the array slice. iykyk. π¦
β RETURN β
the subresource. that's the whole return value. short king. π
π SEE ALSO π
okay this section is a whole friend group, fr fr, so let's go:
- the kernel file
./drivers/gpu/drm/vmwgfx/vmw_surface_cache.hβ go read it, it's giving source of truth π vmw_surface_get_desc(9)vmw_surface_get_mip_size(9)vmw_surface_get_image_buffer_size(9)vmw_surface_get_serialized_size(9)vmw_surface_get_serialized_size_extended(9)vmw_surface_get_pixel_offset(9)vmw_surface_is_gb_screen_target_format(9)vmw_surface_is_dx_screen_target_format(9)vmw_surface_is_screen_target_format(9)struct vmw_surface_mip(9)struct vmw_surface_cache(9)struct vmw_surface_loc(9)vmw_surface_setup_cache(9)vmw_surface_get_loc(9)vmw_surface_inc_loc(9)vmw_surface_min_loc(9)
like, the whole vmw_surface_cache.h cinematic universe. obsessed. π₯
heads up bestie: every one of those cross-references is a real page you can go read, so don't just take my word for it. π«Ά
and that's the tea π§ this came out of ./drivers/gpu/drm/vmwgfx, dated October 2026, and it's the vmw_surface_subres(9) page. slay, go compute some subresources, mwah ππ
π¦ 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