STRUCT VC4_TEXTURE_SAMPLE_INFO(9)
π struct vc4_texture_sample_info(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β this one's a lil struct page from the kernel docs and it's basically the receipts for where your texture setup params live inside the UBO π
πΈ NAME πΈ
struct vc4_texture_sample_info β it saves the offsets into the UBO for texture setup parameters. that's it, that's the whole job π
β¨ SYNOPSIS β¨
struct vc4_texture_sample_info {
bool is_direct;
uint32_t p_offset[4];
};
(no cap, that trailing brace is indented exactly like that in the source, we don't touch it π«Ά)
π¦ Members π¦
so the struct's got two things in it:
is_directβ abool, sitting right there in the struct πuint32_t p_offset[4]β an array of fouruint32_t, the actual offsets π
the page doesn't hand out a separate lil blurb for each member β the whole vibe lives in the Description, so scroll down bestie β¬οΈ
π Description π
okay so here's the tea π₯ this struct gets used at draw time to relocate the reference to the texture contents in p0, and to validate that the offset β combined with width/height/stride/etc. from p1 and p2/p3 β doesn't sample outside the BO. like, it's a vibe check for your memory bounds, literally π§
and here's the iconic part: the hardware treats unprovided config parameters as 0, so not all of them need to be set up for every texture sample. so the code just stores ~0 as the offset to mark the unused ones. clever, ate, no notes π
β¨
if you want the actual definitions of the texture parameters, go read the VC4 3D architecture guide page 41 ("Texture and Memory Lookup Unit Setup") β that's where the real lore is ππ
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/vc4/vc4_drv.hstructvc4_validated_shader_info(9) __wait_for(9)
and that's the whole page bestie, you understood it, slay π this came to you from ./drivers/gpu/drm/vc4, dated October 2026, in the Kernel API Manual β mwah, go sample some textures responsibly πππ¦
π¦ 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