v3dv: ignore filter in TFU blit path

The filter is only relevant to handle blits that invole scaling, but
our TFU path doesn't handle any kind of scaling so we can safely
ignore it.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7845>
This commit is contained in:
Iago Toral Quiroga 2020-12-01 10:49:27 +01:00 committed by Marge Bot
parent eb75a67bd6
commit fd4016f978

View file

@ -4001,21 +4001,19 @@ compute_blit_3d_layers(const VkOffset3D *offsets,
/**
* Returns true if the implementation supports the requested operation (even if
* it failed to process it, for example, due to an out-of-memory error).
*
* The TFU blit path doesn't handle scaling so the blit filter parameter can
* be ignored.
*/
static bool
blit_tfu(struct v3dv_cmd_buffer *cmd_buffer,
struct v3dv_image *dst,
struct v3dv_image *src,
const VkImageBlit *region,
VkFilter filter)
const VkImageBlit *region)
{
assert(dst->samples == VK_SAMPLE_COUNT_1_BIT);
assert(src->samples == VK_SAMPLE_COUNT_1_BIT);
/* FIXME: The v3d driver seems to ignore filtering completely! */
if (filter != VK_FILTER_NEAREST)
return false;
/* Format must match */
if (src->vk_format != dst->vk_format)
return false;
@ -5444,7 +5442,7 @@ v3dv_CmdBlitImage(VkCommandBuffer commandBuffer,
assert(!vk_format_is_compressed(dst->vk_format));
for (uint32_t i = 0; i < regionCount; i++) {
if (blit_tfu(cmd_buffer, dst, src, &pRegions[i], filter))
if (blit_tfu(cmd_buffer, dst, src, &pRegions[i]))
continue;
if (blit_shader(cmd_buffer,
dst, dst->vk_format,