Skip to content

Commit

Permalink
Merge pull request #5175 from lioncash/fifo
Browse files Browse the repository at this point in the history
Fifo: const correctness
  • Loading branch information
Parlane committed Mar 28, 2017
2 parents 3eff869 + d44844b commit 3000cc7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Source/Core/VideoCommon/Fifo.cpp
Expand Up @@ -191,7 +191,7 @@ void SyncGPU(SyncGPUReason reason, bool may_move_read_ptr)
}
}

void PushFifoAuxBuffer(void* ptr, size_t size)
void PushFifoAuxBuffer(const void* ptr, size_t size)
{
if (size > (size_t)(s_fifo_aux_data + FIFO_SIZE - s_fifo_aux_write_ptr))
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/VideoCommon/Fifo.h
Expand Up @@ -33,7 +33,7 @@ enum class SyncGPUReason
// In deterministic GPU thread mode this waits for the GPU to be done with pending work.
void SyncGPU(SyncGPUReason reason, bool may_move_read_ptr = true);

void PushFifoAuxBuffer(void* ptr, size_t size);
void PushFifoAuxBuffer(const void* ptr, size_t size);
void* PopFifoAuxBuffer(size_t size);

void FlushGpu();
Expand Down
10 changes: 5 additions & 5 deletions Source/Core/VideoCommon/XFStructs.cpp
Expand Up @@ -288,12 +288,12 @@ void LoadIndexedXF(u32 val, int refarray)

void PreprocessIndexedXF(u32 val, int refarray)
{
int index = val >> 16;
int size = ((val >> 12) & 0xF) + 1;
const u32 index = val >> 16;
const u32 size = ((val >> 12) & 0xF) + 1;

u32* new_data = (u32*)Memory::GetPointer(g_preprocess_cp_state.array_bases[refarray] +
g_preprocess_cp_state.array_strides[refarray] * index);
const u8* new_data = Memory::GetPointer(g_preprocess_cp_state.array_bases[refarray] +
g_preprocess_cp_state.array_strides[refarray] * index);

size_t buf_size = size * sizeof(u32);
const size_t buf_size = size * sizeof(u32);
Fifo::PushFifoAuxBuffer(new_data, buf_size);
}

0 comments on commit 3000cc7

Please sign in to comment.