summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_debug.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-09-13 11:13:03 +0200
committerSamuel Pitoiset <[email protected]>2017-09-14 10:37:57 +0200
commit4224b31bf3de76b83cd437f2f906b42526bad3e6 (patch)
tree99e73f370af2255d3275cd11ff8b11918b861e31 /src/amd/vulkan/radv_debug.c
parent396d2dbce4fbe7cb128bdeaa3c07f52f425f4dbe (diff)
radv: initialize the trace BO to 0
To avoid random initial values. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_debug.c')
-rw-r--r--src/amd/vulkan/radv_debug.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_debug.c b/src/amd/vulkan/radv_debug.c
index d52ba5d86d8..4f680cd1df7 100644
--- a/src/amd/vulkan/radv_debug.c
+++ b/src/amd/vulkan/radv_debug.c
@@ -32,12 +32,15 @@
#include "radv_debug.h"
#include "radv_shader.h"
+#define TRACE_BO_SIZE 4096
+
bool
radv_init_trace(struct radv_device *device)
{
struct radeon_winsys *ws = device->ws;
- device->trace_bo = ws->buffer_create(ws, 4096, 8, RADEON_DOMAIN_VRAM,
+ device->trace_bo = ws->buffer_create(ws, TRACE_BO_SIZE, 8,
+ RADEON_DOMAIN_VRAM,
RADEON_FLAG_CPU_ACCESS);
if (!device->trace_bo)
return false;
@@ -46,6 +49,8 @@ radv_init_trace(struct radv_device *device)
if (!device->trace_id_ptr)
return false;
+ memset(device->trace_id_ptr, 0, TRACE_BO_SIZE);
+
ac_vm_fault_occured(device->physical_device->rad_info.chip_class,
&device->dmesg_timestamp, NULL);