summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2019-11-25 23:58:04 +0100
committerBas Nieuwenhuizen <[email protected]>2019-11-26 09:35:02 +0000
commit25bc9102d89f4390e0edc0a5f09fcde9de80f776 (patch)
tree9a40fcbd5707d71cf15b9c331b8af9a46228a7e7 /src/amd
parente41958e344cb4b15d01008140a1ee08817104334 (diff)
radv: Allocate cmdbuffer space for buffer marker write.
Fixes: 946193ae008 "radv: add support for VK_AMD_buffer_marker" Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/vulkan/radv_cmd_buffer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index d65bc72327f..efa60dcbdb8 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -6189,6 +6189,8 @@ void radv_CmdWriteBufferMarkerAMD(
si_emit_cache_flush(cmd_buffer);
+ ASSERTED unsigned cdw_max = radeon_check_space(cmd_buffer->device->ws, cmd_buffer->cs, 12);
+
if (!(pipelineStage & ~VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT)) {
radeon_emit(cs, PKT3(PKT3_COPY_DATA, 4, 0));
radeon_emit(cs, COPY_DATA_SRC_SEL(COPY_DATA_IMM) |
@@ -6208,4 +6210,6 @@ void radv_CmdWriteBufferMarkerAMD(
va, marker,
cmd_buffer->gfx9_eop_bug_va);
}
+
+ assert(cmd_buffer->cs->cdw <= cdw_max);
}