[1/3] radv: do not initialize DCC as cleared for MSAA textures

Submitted by Samuel Pitoiset on Nov. 15, 2018, 2:35 p.m.

Details

Message ID 20181115143556.7794-2-samuel.pitoiset@gmail.com
State New
Headers show
Series "radv: some fixes for DCC/MSAA" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Samuel Pitoiset Nov. 15, 2018, 2:35 p.m.
This doesn't seem to work, instead always use the fully
expanded mode for MSAA textures.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
---
 src/amd/vulkan/radv_cmd_buffer.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 8e0ed284d6..0fe90ceff7 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -4327,7 +4327,14 @@  static void radv_init_color_image_metadata(struct radv_cmd_buffer *cmd_buffer,
 
 		if (radv_layout_dcc_compressed(image, dst_layout,
 					       dst_queue_mask)) {
-			value = 0x20202020u;
+			if (image->info.samples == 1) {
+				/* Initializing DCC as compressed for MSAA
+				 * textures doesn't seem to work. Be
+				 * conservative and always use the fully
+				 * expanded mode.
+				 */
+				value = 0x20202020u;
+			}
 			need_decompress_pass = true;
 		}