[GPU] InitializeRingBuffer - Clear buffer space to prevent random data readout

This commit is contained in:
Gliniak 2020-01-06 23:10:00 +01:00 committed by illusion
parent dcfc9321f8
commit 3c94b7e6cc
1 changed files with 3 additions and 0 deletions

View File

@ -260,6 +260,9 @@ void CommandProcessor::InitializeRingBuffer(uint32_t ptr, uint32_t log2_size) {
read_ptr_index_ = 0;
primary_buffer_ptr_ = ptr;
primary_buffer_size_ = 1 << log2_size;
std::memset(kernel_state_->memory()->TranslatePhysical(primary_buffer_ptr_),
0x00, primary_buffer_size_);
}
void CommandProcessor::EnableReadPointerWriteBack(uint32_t ptr,