diff options
| author | Zephyron <zephyron@citron-emu.org> | 2025-01-06 20:04:35 +1000 |
|---|---|---|
| committer | Mike Lothian <mike@fireburn.co.uk> | 2025-05-11 12:17:03 +0100 |
| commit | 4f61ee284f4b0af64f38433f5bacaa5bb72e39a6 (patch) | |
| tree | 5a8359c649306c976a70c1f75f2860f66f22f564 /src/video_core/buffer_cache | |
| parent | 2e739c8692b53fb4391b57993108056cc8f5e5c6 (diff) | |
core: Improve device memory and buffer queue handling
This commit makes several improvements to device memory management and buffer
queue handling:
DeviceMemoryManager:
- Add null pointer and size checks for ReadBlock
- Fill unmapped memory with a known pattern (0xCC) instead of zeros
- Add better error logging for invalid memory accesses
- Add null pointer check for source pointer in memcpy
BufferQueueProducer:
- Improve error handling in WaitForFreeSlotThenRelock
- Add proper abandoned state checking during wait conditions
- Clean up and simplify buffer scanning logic
- Improve logging messages with more descriptive information
- Remove redundant buffer count validation
- Fix potential infinite loop condition during wait
These changes improve stability and error handling while making the code more
maintainable and debuggable. The use of a known pattern for unmapped memory
helps identify uninitialized memory access issues.
Diffstat (limited to 'src/video_core/buffer_cache')
0 files changed, 0 insertions, 0 deletions
