mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
radv: Don't check if we need to copy immutable samplers for non push templates.
This should allow the compiler to optimize this out because it knows that cmd_buffer is NULL. Signed-off-by: Georg Lehmann <dadschoorse@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17166>
This commit is contained in:
parent
f075aa1c11
commit
ed429af586
1 changed files with 2 additions and 2 deletions
|
|
@ -1566,7 +1566,7 @@ radv_update_descriptor_set_with_template_impl(struct radv_device *device,
|
|||
device, cmd_buffer, templ->entry[i].sampler_offset, pDst, buffer_list,
|
||||
templ->entry[i].descriptor_type, (struct VkDescriptorImageInfo *)pSrc,
|
||||
templ->entry[i].has_sampler);
|
||||
if (templ->entry[i].immutable_samplers) {
|
||||
if (cmd_buffer && templ->entry[i].immutable_samplers) {
|
||||
memcpy((char *)pDst + templ->entry[i].sampler_offset,
|
||||
templ->entry[i].immutable_samplers + 4 * j, 16);
|
||||
}
|
||||
|
|
@ -1574,7 +1574,7 @@ radv_update_descriptor_set_with_template_impl(struct radv_device *device,
|
|||
case VK_DESCRIPTOR_TYPE_SAMPLER:
|
||||
if (templ->entry[i].has_sampler)
|
||||
write_sampler_descriptor(device, pDst, (struct VkDescriptorImageInfo *)pSrc);
|
||||
else if (templ->entry[i].immutable_samplers)
|
||||
else if (cmd_buffer && templ->entry[i].immutable_samplers)
|
||||
memcpy(pDst, templ->entry[i].immutable_samplers + 4 * j, 16);
|
||||
break;
|
||||
case VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue