Mesa (master): radv: align the initial state command buffer.

Dave Airlie airlied at kemper.freedesktop.org
Tue Feb 14 19:05:42 UTC 2017


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

Author: Dave Airlie <airlied at redhat.com>
Date:   Mon Feb 13 22:54:53 2017 -0500

radv: align the initial state command buffer.

This just adds the padding to align this to an 8 dword boundary.

Tested-by: Kai Wasserbäch <kai at dev.carbon-project.org>
Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/amd/vulkan/si_cmd_buffer.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c
index cb137aa..8dd9f65 100644
--- a/src/amd/vulkan/si_cmd_buffer.c
+++ b/src/amd/vulkan/si_cmd_buffer.c
@@ -445,6 +445,13 @@ cik_create_gfx_config(struct radv_device *device)
 
 	si_emit_config(device->physical_device, cs);
 
+	while (cs->cdw & 7) {
+		if (device->physical_device->rad_info.gfx_ib_pad_with_type2)
+			radeon_emit(cs, 0x80000000);
+		else
+			radeon_emit(cs, 0xffff1000);
+	}
+
 	device->gfx_init = device->ws->buffer_create(device->ws,
 						     cs->cdw * 4, 4096,
 						     RADEON_DOMAIN_GTT,




More information about the mesa-commit mailing list