diff --git a/src/video_core/host_shaders/fault_buffer_process.comp b/src/video_core/host_shaders/fault_buffer_process.comp index cdff9f302..a712cf441 100644 --- a/src/video_core/host_shaders/fault_buffer_process.comp +++ b/src/video_core/host_shaders/fault_buffer_process.comp @@ -33,10 +33,10 @@ void main() { uint bit = findLSB(word); word &= word - 1; uint page = base_bit + bit; - uint store_index = atomicAdd(download_buffer32[0], 1u); + uint store_index = atomicAdd(download_buffer32[0], 1u) + 1u; // It is very unlikely, but should we check for overflow? if (store_index < 1024u) { // only support 1024 page faults download_buffer[store_index] = uint64_t(page) << CACHING_PAGEBITS; } } -} \ No newline at end of file +}