Fixing uninitialized members.
Wish VC++ warned about this line clang does...
This commit is contained in:
parent
c6d779920d
commit
f49e35636d
|
@ -23,6 +23,13 @@ RingBufferWorker::RingBufferWorker(xe_memory_ref memory) :
|
|||
memory_(memory), driver_(0) {
|
||||
write_ptr_index_event_ = CreateEvent(
|
||||
NULL, TRUE, FALSE, NULL);
|
||||
|
||||
primary_buffer_ptr_ = 0;
|
||||
primary_buffer_size_ = 0;
|
||||
read_ptr_index_ = 0;
|
||||
read_ptr_update_freq_ = 0;
|
||||
read_ptr_writeback_ptr_ = 0;
|
||||
write_ptr_index_ = 0;
|
||||
}
|
||||
|
||||
RingBufferWorker::~RingBufferWorker() {
|
||||
|
@ -78,7 +85,7 @@ void RingBufferWorker::Pump() {
|
|||
|
||||
// TODO(benvanik): handle wrapping around
|
||||
// read_ptr_index_ = (read_ptr_index_ + 1) % (primary_buffer_size_ / 4);
|
||||
XEASSERT(write_ptr_index_ >= read_ptr_index_);
|
||||
XEASSERT(write_ptr_index_ > read_ptr_index_);
|
||||
uint32_t length = write_ptr_index_ - read_ptr_index_;
|
||||
if (length) {
|
||||
ExecuteSegment(primary_buffer_ptr_ + read_ptr_index_ * 4, length);
|
||||
|
|
Loading…
Reference in New Issue