diff options
author | Philip Rebohle <philip.rebohle@tu-dortmund.de> | 2018-05-28 14:10:41 +0200 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2018-06-06 08:27:50 -0700 |
commit | f5865f1f58305f3c4a2ef63607a264f5d02dbde4 (patch) | |
tree | 5b297a6f92123798dbbb40f15a1d9fe9d3b50bc3 | |
parent | b7c27dc7a3ef7601f7b103f7ffc02dd3417fad46 (diff) | |
download | mesa-f5865f1f58305f3c4a2ef63607a264f5d02dbde4.tar.gz |
radv: Use correct color format for fast clears
Using the image format is incorrect when the view has a different
format than the image. Instead, the view format needs to be used.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
CC: 18.1 <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106687
(cherry picked from commit cc21e96d5f412aae5d3982dde0d4c926e8d049e8)
-rw-r--r-- | src/amd/vulkan/radv_meta_clear.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c index 858e3368b65..fae441ceb66 100644 --- a/src/amd/vulkan/radv_meta_clear.c +++ b/src/amd/vulkan/radv_meta_clear.c @@ -1035,7 +1035,7 @@ emit_fast_color_clear(struct radv_cmd_buffer *cmd_buffer, goto fail; /* DCC */ - ret = radv_format_pack_clear_color(iview->image->vk_format, + ret = radv_format_pack_clear_color(iview->vk_format, clear_color, &clear_value); if (ret == false) goto fail; @@ -1056,7 +1056,7 @@ emit_fast_color_clear(struct radv_cmd_buffer *cmd_buffer, bool can_avoid_fast_clear_elim; bool need_decompress_pass = false; - vi_get_fast_clear_parameters(iview->image->vk_format, + vi_get_fast_clear_parameters(iview->vk_format, &clear_value, &reset_value, &can_avoid_fast_clear_elim); |