diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-10-28 06:31:05 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-10-30 00:53:48 +0100 |
commit | a993df1ee294b861eef4f35fccabeecd05754f2a (patch) | |
tree | 04150cb66c138c75f6a4fc47218bb2255af7e234 /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | Merge pull request #3004 from ReinUsesLisp/maxwell3d-cleanup (diff) | |
download | yuzu-a993df1ee294b861eef4f35fccabeecd05754f2a.tar yuzu-a993df1ee294b861eef4f35fccabeecd05754f2a.tar.gz yuzu-a993df1ee294b861eef4f35fccabeecd05754f2a.tar.bz2 yuzu-a993df1ee294b861eef4f35fccabeecd05754f2a.tar.lz yuzu-a993df1ee294b861eef4f35fccabeecd05754f2a.tar.xz yuzu-a993df1ee294b861eef4f35fccabeecd05754f2a.tar.zst yuzu-a993df1ee294b861eef4f35fccabeecd05754f2a.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 43032e9a7..35fc094a8 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -973,10 +973,9 @@ TextureBufferUsage RasterizerOpenGL::SetupDrawTextures(Maxwell::ShaderStage stag if (!entry.IsBindless()) { return maxwell3d.GetStageTexture(stage, entry.GetOffset()); } - const auto cbuf = entry.GetBindlessCBuf(); - Tegra::Texture::TextureHandle tex_handle; - Tegra::Engines::ShaderType shader_type = static_cast<Tegra::Engines::ShaderType>(stage); - tex_handle.raw = maxwell3d.AccessConstBuffer32(shader_type, cbuf.first, cbuf.second); + const auto shader_type = static_cast<Tegra::Engines::ShaderType>(stage); + const Tegra::Texture::TextureHandle tex_handle = + maxwell3d.AccessConstBuffer32(shader_type, entry.GetBuffer(), entry.GetOffset()); return maxwell3d.GetTextureInfo(tex_handle); }(); @@ -1004,10 +1003,8 @@ TextureBufferUsage RasterizerOpenGL::SetupComputeTextures(const Shader& kernel) if (!entry.IsBindless()) { return compute.GetTexture(entry.GetOffset()); } - const auto cbuf = entry.GetBindlessCBuf(); - Tegra::Texture::TextureHandle tex_handle; - tex_handle.raw = compute.AccessConstBuffer32(Tegra::Engines::ShaderType::Compute, - cbuf.first, cbuf.second); + const Tegra::Texture::TextureHandle tex_handle = compute.AccessConstBuffer32( + Tegra::Engines::ShaderType::Compute, entry.GetBuffer(), entry.GetOffset()); return compute.GetTextureInfo(tex_handle); }(); @@ -1050,10 +1047,8 @@ void RasterizerOpenGL::SetupComputeImages(const Shader& shader) { if (!entry.IsBindless()) { return compute.GetTexture(entry.GetOffset()).tic; } - const auto cbuf = entry.GetBindlessCBuf(); - Tegra::Texture::TextureHandle tex_handle; - tex_handle.raw = compute.AccessConstBuffer32(Tegra::Engines::ShaderType::Compute, - cbuf.first, cbuf.second); + const Tegra::Texture::TextureHandle tex_handle = compute.AccessConstBuffer32( + Tegra::Engines::ShaderType::Compute, entry.GetBuffer(), entry.GetOffset()); return compute.GetTextureInfo(tex_handle).tic; }(); SetupImage(bindpoint, tic, entry); |