tu: Fix wrong copies of sampler descriptor.

Found this with the following patch but it exists since adding ycbcr
sampler to the struct.

Fixes: d070a7ba0c

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5539>
This commit is contained in:
Hyunjun Ko 2020-07-14 00:47:30 +00:00 committed by Marge Bot
parent 3a153137f4
commit cd85315dcb

View file

@ -849,7 +849,7 @@ write_combined_image_sampler_descriptor(struct tu_device *device,
descriptor_type, image_info);
/* copy over sampler state */
if (has_sampler) {
memcpy(dst + A6XX_TEX_CONST_DWORDS, sampler, sizeof(*sampler));
memcpy(dst + A6XX_TEX_CONST_DWORDS, sampler->descriptor, sizeof(sampler->descriptor));
}
}
@ -860,7 +860,7 @@ write_sampler_descriptor(struct tu_device *device,
{
TU_FROM_HANDLE(tu_sampler, sampler, image_info->sampler);
memcpy(dst, sampler, sizeof(*sampler));
memcpy(dst, sampler->descriptor, sizeof(sampler->descriptor));
}
void