diff options
| author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-10-16 10:47:44 -0400 |
|---|---|---|
| committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-11-20 14:59:35 -0400 |
| commit | cc81c0ce64a5cc1f550ca796fda38e445660649a (patch) | |
| tree | c9d2c27f143dcda1b164e2e4bc5edac96cef3bc8 /src/video_core/texture_cache/surface_params.cpp | |
| parent | c52f37f259372485ac5902d9cae8de327c984a55 (diff) | |
Texture_Cache: Redo invalid Surfaces handling.
This commit aims to redo the full setup of invalid textures and
guarantee correct behavior across backends in the case of finding one by
using black dummy textures that match the target of the expected
texture.
Diffstat (limited to 'src/video_core/texture_cache/surface_params.cpp')
| -rw-r--r-- | src/video_core/texture_cache/surface_params.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/surface_params.cpp b/src/video_core/texture_cache/surface_params.cpp index 858e17e08..a4f1edd9a 100644 --- a/src/video_core/texture_cache/surface_params.cpp +++ b/src/video_core/texture_cache/surface_params.cpp @@ -246,6 +246,16 @@ SurfaceParams SurfaceParams::CreateForFermiCopySurface( return params; } +VideoCore::Surface::SurfaceTarget SurfaceParams::ExpectedTarget( + const VideoCommon::Shader::Sampler& entry) { + return TextureTypeToSurfaceTarget(entry.GetType(), entry.IsArray()); +} + +VideoCore::Surface::SurfaceTarget SurfaceParams::ExpectedTarget( + const VideoCommon::Shader::Image& entry) { + return ImageTypeToSurfaceTarget(entry.GetType()); +} + bool SurfaceParams::IsLayered() const { switch (target) { case SurfaceTarget::Texture1DArray: |
