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/texture_cache/texture_cache.h | |
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/texture_cache/texture_cache.h')
-rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 623cce068..877c6635d 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -89,8 +89,23 @@ public: } } + TView GetTextureSurface(const Tegra::Texture::TICEntry& tic, + const VideoCommon::Shader::Sampler& entry) { + std::lock_guard lock{mutex}; + const auto gpu_addr{tic.Address()}; + if (!gpu_addr) { + return {}; + } + const auto params{SurfaceParams::CreateForTexture(tic, entry)}; + const auto [surface, view] = GetSurface(gpu_addr, params, true, false); + if (guard_samplers) { + sampled_textures.push_back(surface); + } + return view; + } + TView GetImageSurface(const Tegra::Texture::TICEntry& tic, - const VideoCommon::Shader::Sampler& entry) { + const VideoCommon::Shader::Image& entry) { std::lock_guard lock{mutex}; const auto gpu_addr{tic.Address()}; if (!gpu_addr) { |