diff options
Diffstat (limited to 'src/video_core/buffer_cache')
| -rw-r--r-- | src/video_core/buffer_cache/buffer_cache.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index 6eb672475..2e616cee4 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h | |||
| @@ -1316,12 +1316,16 @@ void BufferCache<P>::UpdateVertexBuffer(u32 index) { | |||
| 1316 | const GPUVAddr gpu_addr_begin = array.StartAddress(); | 1316 | const GPUVAddr gpu_addr_begin = array.StartAddress(); |
| 1317 | const GPUVAddr gpu_addr_end = limit.LimitAddress() + 1; | 1317 | const GPUVAddr gpu_addr_end = limit.LimitAddress() + 1; |
| 1318 | const std::optional<VAddr> cpu_addr = gpu_memory->GpuToCpuAddress(gpu_addr_begin); | 1318 | const std::optional<VAddr> cpu_addr = gpu_memory->GpuToCpuAddress(gpu_addr_begin); |
| 1319 | const u32 address_size = static_cast<u32>(gpu_addr_end - gpu_addr_begin); | 1319 | u32 address_size = static_cast<u32>( |
| 1320 | const u32 size = address_size; // TODO: Analyze stride and number of vertices | 1320 | std::min(gpu_addr_end - gpu_addr_begin, static_cast<u64>(std::numeric_limits<u32>::max()))); |
| 1321 | if (array.enable == 0 || size == 0 || !cpu_addr) { | 1321 | if (array.enable == 0 || address_size == 0 || !cpu_addr) { |
| 1322 | vertex_buffers[index] = NULL_BINDING; | 1322 | vertex_buffers[index] = NULL_BINDING; |
| 1323 | return; | 1323 | return; |
| 1324 | } | 1324 | } |
| 1325 | if (!gpu_memory->IsWithinGPUAddressRange(gpu_addr_end)) { | ||
| 1326 | address_size = gpu_memory->MaxContinousRange(gpu_addr_begin, address_size); | ||
| 1327 | } | ||
| 1328 | const u32 size = address_size; // TODO: Analyze stride and number of vertices | ||
| 1325 | vertex_buffers[index] = Binding{ | 1329 | vertex_buffers[index] = Binding{ |
| 1326 | .cpu_addr = *cpu_addr, | 1330 | .cpu_addr = *cpu_addr, |
| 1327 | .size = size, | 1331 | .size = size, |