diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-07-12 07:01:27 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-09-06 01:35:51 +0200 |
commit | 6170337001cc11deabd57023a548c44de4242e9d (patch) | |
tree | e9d6260d49ef69db4c5525d176a202892594acc7 /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | gl_state: Add support for glBindImageTextures (diff) | |
download | yuzu-6170337001cc11deabd57023a548c44de4242e9d.tar yuzu-6170337001cc11deabd57023a548c44de4242e9d.tar.gz yuzu-6170337001cc11deabd57023a548c44de4242e9d.tar.bz2 yuzu-6170337001cc11deabd57023a548c44de4242e9d.tar.lz yuzu-6170337001cc11deabd57023a548c44de4242e9d.tar.xz yuzu-6170337001cc11deabd57023a548c44de4242e9d.tar.zst yuzu-6170337001cc11deabd57023a548c44de4242e9d.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 8a59b86e3..6636b3c74 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -1022,7 +1022,7 @@ bool RasterizerOpenGL::SetupTexture(const Shader& shader, u32 binding, auto& unit{state.texture_units[binding]}; unit.sampler = sampler_cache.GetSampler(texture.tsc); - const auto view = texture_cache.GetImageSurface(texture.tic, entry); + const auto view = texture_cache.GetTextureSurface(texture.tic, entry); if (!view) { // Can occur when texture addr is null or its memory is unmapped/invalid unit.texture = 0; @@ -1054,7 +1054,12 @@ void RasterizerOpenGL::SetupComputeImages(const Shader& shader) { tex_handle.raw = compute.AccessConstBuffer32(cbuf.first, cbuf.second); return compute.GetTextureInfo(tex_handle, entry.GetOffset()); }(); - UNIMPLEMENTED(); + const auto view = texture_cache.GetImageSurface(texture.tic, entry); + if (!view) { + state.images[bindpoint] = 0; + continue; + } + state.images[bindpoint] = view->GetTexture(); } } |