diff options
author | Rodrigo Locatti <reinuseslisp@airmail.cc> | 2019-11-06 05:54:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-06 05:54:11 +0100 |
commit | 654b77d2ec372bd986d472da7491d0156d0af52e (patch) | |
tree | 163ac38e64ed94bdcf3a4ee3c50816c6882cc138 /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | Merge pull request #3073 from DarkLordZach/azure-rename-partial (diff) | |
parent | shader/node: Unpack bindless texture encoding (diff) | |
download | yuzu-654b77d2ec372bd986d472da7491d0156d0af52e.tar yuzu-654b77d2ec372bd986d472da7491d0156d0af52e.tar.gz yuzu-654b77d2ec372bd986d472da7491d0156d0af52e.tar.bz2 yuzu-654b77d2ec372bd986d472da7491d0156d0af52e.tar.lz yuzu-654b77d2ec372bd986d472da7491d0156d0af52e.tar.xz yuzu-654b77d2ec372bd986d472da7491d0156d0af52e.tar.zst yuzu-654b77d2ec372bd986d472da7491d0156d0af52e.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 6a4d2c83a..d1e147db8 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -935,10 +935,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); }(); @@ -966,10 +965,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); }(); @@ -1012,10 +1009,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); |