pvr: clarify image/sampler state word packing

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998>
This commit is contained in:
Simon Perretta
2024-11-20 09:52:00 +00:00
committed by Marge Bot
parent 8b8e33106d
commit 51a3372ff2
13 changed files with 140 additions and 179 deletions
+8 -5
View File
@@ -635,14 +635,12 @@ static VkResult pvr_setup_texture_state_words(
memcpy(&info.swizzle, swizzle, sizeof(info.swizzle));
/* TODO: Can we use image_view->texture_state instead of generating here? */
result = pvr_pack_tex_state(device, &info, descriptor->image);
result = pvr_pack_tex_state(device, &info, &descriptor->image);
if (result != VK_SUCCESS)
return result;
descriptor->sampler = (union pvr_sampler_descriptor){ 0 };
pvr_csb_pack (&descriptor->sampler.data.sampler_word,
TEXSTATE_SAMPLER,
pvr_csb_pack (&descriptor->sampler.words[0],
TEXSTATE_SAMPLER_WORD0,
sampler) {
sampler.non_normalized_coords = true;
sampler.addrmode_v = ROGUE_TEXSTATE_ADDRMODE_CLAMP_TO_EDGE;
@@ -652,6 +650,11 @@ static VkResult pvr_setup_texture_state_words(
sampler.dadjust = ROGUE_TEXSTATE_DADJUST_ZERO_UINT;
}
pvr_csb_pack (&descriptor->sampler.words[1],
TEXSTATE_SAMPLER_WORD1,
sampler) {
}
return VK_SUCCESS;
}