diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c index 5b013a833d0..57b42430f00 100644 --- a/src/intel/vulkan/anv_cmd_buffer.c +++ b/src/intel/vulkan/anv_cmd_buffer.c @@ -1199,8 +1199,10 @@ anv_cmd_buffer_merge_dynamic(struct anv_cmd_buffer *cmd_buffer, state = anv_cmd_buffer_alloc_dynamic_state(cmd_buffer, dwords * 4, alignment); p = state.map; - for (uint32_t i = 0; i < dwords; i++) + for (uint32_t i = 0; i < dwords; i++) { + assert((a[i] & b[i]) == 0); p[i] = a[i] | b[i]; + } VG(VALGRIND_CHECK_MEM_IS_DEFINED(p, dwords * 4)); diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 84c4f0083ac..4b72d9594f7 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -2447,6 +2447,9 @@ _anv_combine_address(struct anv_batch *batch, void *location, assert((pipeline)->state.len == __anv_cmd_length(cmd)); \ __anv_cmd_pack(cmd)(batch, _partial, &name); \ for (uint32_t i = 0; i < __anv_cmd_length(cmd); i++) { \ + assert((_partial[i] & \ + (pipeline)->batch_data[ \ + (pipeline)->state.offset + i]) == 0); \ ((uint32_t *)_dst)[i] = _partial[i] | \ (pipeline)->batch_data[(pipeline)->state.offset + i]; \ } \ @@ -2466,6 +2469,9 @@ _anv_combine_address(struct anv_batch *batch, void *location, assert(_cmd_state->len == __anv_cmd_length(cmd)); \ __anv_cmd_pack(cmd)(batch, _partial, &name); \ for (uint32_t i = 0; i < __anv_cmd_length(cmd); i++) { \ + assert((_partial[i] & \ + (pipeline)->batch_data[ \ + (pipeline)->state.offset + i]) == 0); \ ((uint32_t *)_dst)[i] = _partial[i] | \ (pipeline)->batch_data[_cmd_state->offset + i]; \ } \