diff options
| author | bunnei <bunneidev@gmail.com> | 2020-06-13 13:48:27 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-13 13:48:27 -0400 |
| commit | c2ea1e1bcb88f8e307e54cf588829a516b40258e (patch) | |
| tree | 3975cb756ef9d289cc13f3f6dc2a302dacc2c758 /src/video_core/engines/maxwell_3d.cpp | |
| parent | 563388756951e06a2eeb4fa1e8c806993f34f4a9 (diff) | |
| parent | 5b2b6d594c6cfa77c3fb92faee63ad524bfe7204 (diff) | |
Merge pull request #4049 from ReinUsesLisp/separate-samplers
shader/texture: Join separate image and sampler pairs offline
Diffstat (limited to 'src/video_core/engines/maxwell_3d.cpp')
| -rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index e46b153f9..ea3c8a963 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -740,8 +740,11 @@ SamplerDescriptor Maxwell3D::AccessBindlessSampler(ShaderType stage, u64 const_b const auto& shader = state.shader_stages[static_cast<std::size_t>(stage)]; const auto& tex_info_buffer = shader.const_buffers[const_buffer]; const GPUVAddr tex_info_address = tex_info_buffer.address + offset; + return AccessSampler(memory_manager.Read<u32>(tex_info_address)); +} - const Texture::TextureHandle tex_handle{memory_manager.Read<u32>(tex_info_address)}; +SamplerDescriptor Maxwell3D::AccessSampler(u32 handle) const { + const Texture::TextureHandle tex_handle{handle}; const Texture::FullTextureInfo tex_info = GetTextureInfo(tex_handle); SamplerDescriptor result = SamplerDescriptor::FromTIC(tex_info.tic); result.is_shadow.Assign(tex_info.tsc.depth_compare_enabled.Value()); |
