diff options
| author | bunnei <bunneidev@gmail.com> | 2019-04-17 20:59:49 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-17 20:59:49 -0400 |
| commit | 5bd5140bdecd7139029426502b3a474a7d9c9608 (patch) | |
| tree | 97c40345bf9c9af75ff9c294601f54ab3a42a1b6 /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
| parent | 0cfbd3325b2f53449a58669b3911eab52084f86c (diff) | |
| parent | ef8be408d321f4f15f0731c46118834bb757be1a (diff) | |
Merge pull request #2348 from FernandoS27/guest-bindless
Implement Bindless Textures on Shader Decompiler and GL backend
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 0b1fe3494..86a2e117d 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -974,7 +974,15 @@ void RasterizerOpenGL::SetupTextures(Maxwell::ShaderStage stage, const Shader& s for (u32 bindpoint = 0; bindpoint < entries.size(); ++bindpoint) { const auto& entry = entries[bindpoint]; - const auto texture = maxwell3d.GetStageTexture(stage, entry.GetOffset()); + Tegra::Texture::FullTextureInfo texture; + if (entry.IsBindless()) { + const auto cbuf = entry.GetBindlessCBuf(); + Tegra::Texture::TextureHandle tex_handle; + tex_handle.raw = maxwell3d.AccessConstBuffer32(stage, cbuf.first, cbuf.second); + texture = maxwell3d.GetTextureInfo(tex_handle, entry.GetOffset()); + } else { + texture = maxwell3d.GetStageTexture(stage, entry.GetOffset()); + } const u32 current_bindpoint = base_bindings.sampler + bindpoint; texture_samplers[current_bindpoint].SyncWithConfig(texture.tsc); |
