diff options
author | bunnei <bunneidev@gmail.com> | 2018-04-21 17:16:21 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-04-24 23:40:43 +0200 |
commit | 9e11a76e926a7190880063d8fc8c3d97003b9938 (patch) | |
tree | 13d1749f110f5517ef506e10f575693ea2aa63ca /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | Merge pull request #386 from Subv/gpu_query (diff) | |
download | yuzu-9e11a76e926a7190880063d8fc8c3d97003b9938.tar yuzu-9e11a76e926a7190880063d8fc8c3d97003b9938.tar.gz yuzu-9e11a76e926a7190880063d8fc8c3d97003b9938.tar.bz2 yuzu-9e11a76e926a7190880063d8fc8c3d97003b9938.tar.lz yuzu-9e11a76e926a7190880063d8fc8c3d97003b9938.tar.xz yuzu-9e11a76e926a7190880063d8fc8c3d97003b9938.tar.zst yuzu-9e11a76e926a7190880063d8fc8c3d97003b9938.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 82001e7b4..8568d6762 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -233,7 +233,7 @@ void RasterizerOpenGL::SetupShaders(u8* buffer_ptr, GLintptr buffer_offset) { // Fetch program code from memory GLShader::ProgramCode program_code; const u64 gpu_address{gpu.regs.code_address.CodeAddress() + shader_config.offset}; - const VAddr cpu_address{gpu.memory_manager.PhysicalToVirtualAddress(gpu_address)}; + const VAddr cpu_address{gpu.memory_manager.GpuToCpuAddress(gpu_address)}; Memory::ReadBlock(cpu_address, program_code.data(), program_code.size() * sizeof(u64)); GLShader::ShaderSetup setup{std::move(program_code)}; @@ -395,7 +395,7 @@ void RasterizerOpenGL::DrawArrays() { if (is_indexed) { const auto& memory_manager = Core::System().GetInstance().GPU().memory_manager; const VAddr index_data_addr{ - memory_manager->PhysicalToVirtualAddress(regs.index_array.StartAddress())}; + memory_manager->GpuToCpuAddress(regs.index_array.StartAddress())}; Memory::ReadBlock(index_data_addr, offseted_buffer, index_buffer_size); index_buffer_offset = buffer_offset; @@ -659,7 +659,7 @@ u32 RasterizerOpenGL::SetupConstBuffers(Maxwell::ShaderStage stage, GLuint progr buffer_draw_state.enabled = true; buffer_draw_state.bindpoint = current_bindpoint + bindpoint; - VAddr addr = gpu.memory_manager->PhysicalToVirtualAddress(buffer.address); + VAddr addr = gpu.memory_manager->GpuToCpuAddress(buffer.address); std::vector<u8> data(used_buffer.GetSize() * sizeof(float)); Memory::ReadBlock(addr, data.data(), data.size()); |