Mesa (master): radv: Always set depthbuffer using image format instead of iview format.

Bas Nieuwenhuizen bnieuwenhuizen at kemper.freedesktop.org
Wed Jul 5 19:10:23 UTC 2017


Module: Mesa
Branch: master
Commit: 3d527ba19b2f2ff3ee379818017adbdf6894ceeb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3d527ba19b2f2ff3ee379818017adbdf6894ceeb

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Mon Jun 26 01:27:02 2017 +0200

radv: Always set depthbuffer using image format instead of iview format.

We have some cases where changing between depth and stencil only aspect
was causing hangs.

Signed-off-by: Bas Nieuwenhuizen <basni at google.com>
Acked-by: Dave Airlie <airlied at redhat.com>

---

 src/amd/vulkan/radv_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index f2fe8230bd..f9328fb167 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -2876,7 +2876,7 @@ radv_initialise_ds_surface(struct radv_device *device,
 	uint64_t va, s_offs, z_offs;
 	bool stencil_only = false;
 	memset(ds, 0, sizeof(*ds));
-	switch (iview->vk_format) {
+	switch (iview->image->vk_format) {
 	case VK_FORMAT_D24_UNORM_S8_UINT:
 	case VK_FORMAT_X8_D24_UNORM_PACK32:
 		ds->pa_su_poly_offset_db_fmt_cntl = S_028B78_POLY_OFFSET_NEG_NUM_DB_BITS(-24);
@@ -2900,7 +2900,7 @@ radv_initialise_ds_surface(struct radv_device *device,
 		break;
 	}
 
-	format = radv_translate_dbformat(iview->vk_format);
+	format = radv_translate_dbformat(iview->image->vk_format);
 	stencil_format = iview->image->surface.flags & RADEON_SURF_SBUFFER ?
 		V_028044_STENCIL_8 : V_028044_STENCIL_INVALID;
 




More information about the mesa-commit mailing list