vmw_surface_inc_loc(9)
π vmw_surface_inc_loc(9) β like, the kernel API manual page, bestie π
okay so this is a page from the Kernel API Manual and honestly? it's a little one but it's important, so let's get into it β¨
πΈ NAME πΈ
vmw_surface_inc_loc β clamp-increment a surface location by one block size in each dimension. iconic behaviour, no cap π
β¨ SYNOPSIS β¨
void vmw_surface_inc_loc (const struct vmw_surface_cache *cache , struct
vmw_surface_loc *loc );
like, that's the whole signature, she's compact π«Ά
π¦ ARGUMENTS π¦
cacheβ literally says-- undescribed --in the original so that's all we get, bestie π the docs just did not show up for this onelocβ a pointer to astruct vmw_surface_locthat's gonna get incremented π
π DESCRIPTION π
okay so here's the vibe: when you compute the size of a range like size = end - start, the range does not include the end element. that's just how it is, fr fr.
BUT. a location that represents the last byte of a touched region in the backing store is included in the range β lowkey a whole different rule, right? π
so this function takes a location like that and modifies it to match the end definition given as start + size, which is the one used in a SVGA3dBox. slay, consistency β¨
π SEE ALSO π
kernel file ./drivers/gpu/drm/vmwgfx/vmw_surface_cache.h β yes, the whole file, go read it π
then the whole squad of related pages:
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_subres(9)vmw_surface_setup_cache(9)vmw_surface_get_loc(9)vmw_surface_min_loc(9)
like, the whole friend group showed up to the function call ππ
ngl if you're here you're probably doing something very specific with vmwgfx and backing stores. respect, main character energy π
that's the page!! she's short but she ate π big kiss from ./drivers/gpu/drm/vmwgfx, dated October 2026 β mwah, see you in the next one bestie ππ
π¦ 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