diff options
author | Subv <subv2112@gmail.com> | 2018-03-19 01:03:20 +0100 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2018-03-19 01:03:40 +0100 |
commit | 03156d0c9a7b3c3f922784845c832ea8299b3c50 (patch) | |
tree | 5545b96de601215931683edc9f24e841b4b99528 /src/video_core/engines/maxwell_3d.cpp | |
parent | Merge pull request #248 from Subv/cb_data (diff) | |
download | yuzu-03156d0c9a7b3c3f922784845c832ea8299b3c50.tar yuzu-03156d0c9a7b3c3f922784845c832ea8299b3c50.tar.gz yuzu-03156d0c9a7b3c3f922784845c832ea8299b3c50.tar.bz2 yuzu-03156d0c9a7b3c3f922784845c832ea8299b3c50.tar.lz yuzu-03156d0c9a7b3c3f922784845c832ea8299b3c50.tar.xz yuzu-03156d0c9a7b3c3f922784845c832ea8299b3c50.tar.zst yuzu-03156d0c9a7b3c3f922784845c832ea8299b3c50.zip |
Diffstat (limited to 'src/video_core/engines/maxwell_3d.cpp')
-rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 3a4e88e4e..4fdea0fdc 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -12,6 +12,7 @@ namespace Engines { constexpr u32 MacroRegistersStart = 0xE00; const std::unordered_map<u32, Maxwell3D::MethodInfo> Maxwell3D::method_handlers = { + {0xE1A, {"BindTextureInfoBuffer", 1, &Maxwell3D::BindTextureInfoBuffer}}, {0xE24, {"SetShader", 5, &Maxwell3D::SetShader}}, {0xE2A, {"BindStorageBuffer", 1, &Maxwell3D::BindStorageBuffer}}, }; @@ -160,6 +161,23 @@ void Maxwell3D::DrawArrays() { LOG_WARNING(HW_GPU, "Game requested a DrawArrays, ignoring"); } +void Maxwell3D::BindTextureInfoBuffer(const std::vector<u32>& parameters) { + /** + * Parameters description: + * [0] = Shader stage, usually 4 for FragmentShader + */ + + u32 stage = parameters[0]; + + // Perform the same operations as the real macro code. + GPUVAddr address = static_cast<GPUVAddr>(regs.tex_info_buffers.address[stage]) << 8; + u32 size = regs.tex_info_buffers.size[stage]; + + regs.const_buffer.cb_size = size; + regs.const_buffer.cb_address_high = address >> 32; + regs.const_buffer.cb_address_low = address & 0xFFFFFFFF; +} + void Maxwell3D::SetShader(const std::vector<u32>& parameters) { /** * Parameters description: |