From cc594dae40db2ecba462fec321d01618863901fa Mon Sep 17 00:00:00 2001 From: Gliniak Date: Mon, 6 Jan 2020 23:10:00 +0100 Subject: [PATCH] [GPU] InitializeRingBuffer - Clear buffer space to prevent random data readout --- src/xenia/gpu/command_processor.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xenia/gpu/command_processor.cc b/src/xenia/gpu/command_processor.cc index a66057e5b..0122d4ed8 100644 --- a/src/xenia/gpu/command_processor.cc +++ b/src/xenia/gpu/command_processor.cc @@ -256,6 +256,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,