radv: make sure FMASK compression is enabled for MSAA copies

Fixes dEQP-VK.api.copy_and_blit.*.4_bit. I think the MSAA2x and
MSAA8x just passed by luck.

Fixes: 7b21ce401f ("radv: disable FMASK compression when drawing with GENERAL layout")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7915>
This commit is contained in:
Samuel Pitoiset 2020-12-04 09:18:12 +01:00 committed by Marge Bot
parent a6bdbd5c0f
commit 2d0c723ce6
9 changed files with 24 additions and 43 deletions

View File

@ -1,9 +1,3 @@
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_array_image.4_bit,Fail
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_array_image_one_region.4_bit,Fail
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_copy_before_resolving.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_array_image.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_array_image_one_region.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_copy_before_resolving.4_bit,Fail
dEQP-VK.robustness.robustness2.bind.notemplate.rg32f.dontunroll.nonvolatile.vertex_attribute_fetch.no_fmt_qual.len_12.samples_1.1d.vert,Fail
dEQP-VK.robustness.robustness2.bind.notemplate.rg32f.dontunroll.nonvolatile.vertex_attribute_fetch.no_fmt_qual.len_20.samples_1.1d.vert,Fail
dEQP-VK.robustness.robustness2.bind.notemplate.rg32f.dontunroll.nonvolatile.vertex_attribute_fetch.no_fmt_qual.len_252.samples_1.1d.vert,Fail

View File

@ -1,6 +0,0 @@
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_array_image.4_bit,Fail
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_array_image_one_region.4_bit,Fail
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_copy_before_resolving.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_array_image.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_array_image_one_region.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_copy_before_resolving.4_bit,Fail

View File

@ -1,6 +0,0 @@
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_array_image.4_bit,Fail
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_array_image_one_region.4_bit,Fail
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_copy_before_resolving.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_array_image.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_array_image_one_region.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_copy_before_resolving.4_bit,Fail

View File

@ -1,9 +1,3 @@
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_array_image.4_bit,Fail
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_array_image_one_region.4_bit,Fail
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_copy_before_resolving.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_array_image.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_array_image_one_region.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_copy_before_resolving.4_bit,Fail
dEQP-VK.robustness.robustness2.bind.notemplate.rg32f.dontunroll.nonvolatile.vertex_attribute_fetch.no_fmt_qual.len_12.samples_1.1d.vert,Fail
dEQP-VK.robustness.robustness2.bind.notemplate.rg32f.dontunroll.nonvolatile.vertex_attribute_fetch.no_fmt_qual.len_20.samples_1.1d.vert,Fail
dEQP-VK.robustness.robustness2.bind.notemplate.rg32f.dontunroll.nonvolatile.vertex_attribute_fetch.no_fmt_qual.len_252.samples_1.1d.vert,Fail

View File

@ -1,6 +0,0 @@
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_array_image.4_bit,Fail
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_array_image_one_region.4_bit,Fail
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_copy_before_resolving.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_array_image.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_array_image_one_region.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_copy_before_resolving.4_bit,Fail

View File

@ -1,6 +0,0 @@
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_array_image.4_bit,Fail
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_array_image_one_region.4_bit,Fail
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_copy_before_resolving.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_array_image.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_array_image_one_region.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_copy_before_resolving.4_bit,Fail

View File

@ -1,6 +0,0 @@
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_array_image.4_bit,Fail
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_array_image_one_region.4_bit,Fail
dEQP-VK.api.copy_and_blit.core.resolve_image.whole_copy_before_resolving.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_array_image.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_array_image_one_region.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_copy_before_resolving.4_bit,Fail

View File

@ -1642,7 +1642,8 @@ radv_emit_fb_color_state(struct radv_cmd_buffer *cmd_buffer,
if (radv_image_has_fmask(image) &&
(radv_is_fmask_decompress_pipeline(cmd_buffer) ||
radv_is_hw_resolve_pipeline(cmd_buffer))) {
radv_is_hw_resolve_pipeline(cmd_buffer) ||
radv_is_blit2d_msaa_pipeline(cmd_buffer))) {
/* Make sure FMASK is enabled if it has been cleared because:
*
* 1) it's required for FMASK_DECOMPRESS operations to avoid

View File

@ -299,6 +299,28 @@ radv_is_hw_resolve_pipeline(struct radv_cmd_buffer *cmd_buffer)
return false;
}
/**
* Return whether the bound pipeline is a blit MSAA image pipeline.
*/
static inline bool
radv_is_blit2d_msaa_pipeline(struct radv_cmd_buffer *cmd_buffer)
{
struct radv_meta_state *meta_state = &cmd_buffer->device->meta_state;
struct radv_pipeline *pipeline = cmd_buffer->state.pipeline;
if (!pipeline)
return false;
for (uint32_t s = 1; s < MAX_SAMPLES_LOG2; s++) {
for (uint32_t i = 0; i < NUM_META_FS_KEYS; i++) {
if (radv_pipeline_to_handle(pipeline) == meta_state->blit2d[s].pipelines[0 /* IMAGE */][i] ||
radv_pipeline_to_handle(pipeline) == meta_state->blit2d[s].pipelines[1 /* IMAGE_3D */][i])
return true;
}
}
return false;
}
/* common nir builder helpers */
#include "nir/nir_builder.h"