diff options
author | Subv <subv2112@gmail.com> | 2018-03-17 19:55:42 +0100 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2018-03-17 19:55:42 +0100 |
commit | 579000e747413b9af3860c0b92e143d4ddc44e36 (patch) | |
tree | 4e6804833eb2f74686d14a62d8cdae58a8d06b0f /src/video_core/engines/maxwell_3d.cpp | |
parent | Merge pull request #242 from Subv/set_shader (diff) | |
download | yuzu-579000e747413b9af3860c0b92e143d4ddc44e36.tar yuzu-579000e747413b9af3860c0b92e143d4ddc44e36.tar.gz yuzu-579000e747413b9af3860c0b92e143d4ddc44e36.tar.bz2 yuzu-579000e747413b9af3860c0b92e143d4ddc44e36.tar.lz yuzu-579000e747413b9af3860c0b92e143d4ddc44e36.tar.xz yuzu-579000e747413b9af3860c0b92e143d4ddc44e36.tar.zst yuzu-579000e747413b9af3860c0b92e143d4ddc44e36.zip |
Diffstat (limited to 'src/video_core/engines/maxwell_3d.cpp')
-rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 603a2edaf..9784ee069 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -15,6 +15,7 @@ const std::unordered_map<u32, Maxwell3D::MethodInfo> Maxwell3D::method_handlers Maxwell3D::Maxwell3D(MemoryManager& memory_manager) : memory_manager(memory_manager) {} void Maxwell3D::CallMethod(u32 method, const std::vector<u32>& parameters) { + // TODO(Subv): Write an interpreter for the macros uploaded via registers 0x45 and 0x47 auto itr = method_handlers.find(method); if (itr == method_handlers.end()) { LOG_ERROR(HW_GPU, "Unhandled method call %08X", method); @@ -86,19 +87,19 @@ void Maxwell3D::SetShader(const std::vector<u32>& parameters) { * [1] = Unknown. * [2] = Offset to the start of the shader, after the 0x30 bytes header. * [3] = Shader Type. - * [4] = Shader End Address >> 8. + * [4] = Const Buffer Address >> 8. */ auto shader_program = static_cast<Regs::ShaderProgram>(parameters[0]); // TODO(Subv): This address is probably an offset from the CODE_ADDRESS register. - GPUVAddr begin_address = parameters[2]; + GPUVAddr address = parameters[2]; auto shader_type = static_cast<Regs::ShaderType>(parameters[3]); - GPUVAddr end_address = parameters[4] << 8; + GPUVAddr cb_address = parameters[4] << 8; auto& shader = state.shaders[static_cast<size_t>(shader_program)]; shader.program = shader_program; shader.type = shader_type; - shader.begin_address = begin_address; - shader.end_address = end_address; + shader.address = address; + shader.cb_address = cb_address; } } // namespace Engines |