diff options
| author | 2022-09-05 18:20:54 -0700 | |
|---|---|---|
| committer | 2022-09-05 18:20:54 -0700 | |
| commit | 4ffbbc534884841f9a5536e57539bf3d1642af26 (patch) | |
| tree | 128d85b7223c376906ecb180d22e48e268a8c054 /src | |
| parent | Merge pull request #8847 from german77/stop (diff) | |
| parent | style: General style changes to match with the rest of the codebase (diff) | |
| download | yuzu-4ffbbc534884841f9a5536e57539bf3d1642af26.tar.gz yuzu-4ffbbc534884841f9a5536e57539bf3d1642af26.tar.xz yuzu-4ffbbc534884841f9a5536e57539bf3d1642af26.zip | |
Merge pull request #8837 from Morph1984/invalidate
(shader/pipeline)_cache: Raise shader/pipeline cache version
Diffstat (limited to '')
| -rw-r--r-- | src/shader_recompiler/ir_opt/texture_pass.cpp | 10 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/shader_environment.cpp | 7 |
4 files changed, 9 insertions, 12 deletions
diff --git a/src/shader_recompiler/ir_opt/texture_pass.cpp b/src/shader_recompiler/ir_opt/texture_pass.cpp index 5cead5135..597112ba4 100644 --- a/src/shader_recompiler/ir_opt/texture_pass.cpp +++ b/src/shader_recompiler/ir_opt/texture_pass.cpp | |||
| @@ -415,11 +415,11 @@ void TexturePass(Environment& env, IR::Program& program) { | |||
| 415 | inst->SetFlags(flags); | 415 | inst->SetFlags(flags); |
| 416 | break; | 416 | break; |
| 417 | case IR::Opcode::ImageSampleImplicitLod: | 417 | case IR::Opcode::ImageSampleImplicitLod: |
| 418 | if (flags.type == TextureType::Color2D) { | 418 | if (flags.type != TextureType::Color2D) { |
| 419 | auto texture_type = ReadTextureType(env, cbuf); | 419 | break; |
| 420 | if (texture_type == TextureType::Color2DRect) { | 420 | } |
| 421 | PatchImageSampleImplicitLod(*texture_inst.block, *texture_inst.inst); | 421 | if (ReadTextureType(env, cbuf) == TextureType::Color2DRect) { |
| 422 | } | 422 | PatchImageSampleImplicitLod(*texture_inst.block, *texture_inst.inst); |
| 423 | } | 423 | } |
| 424 | break; | 424 | break; |
| 425 | case IR::Opcode::ImageFetch: | 425 | case IR::Opcode::ImageFetch: |
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index 1ad56d9e7..ddb70934c 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp | |||
| @@ -49,7 +49,7 @@ using VideoCommon::LoadPipelines; | |||
| 49 | using VideoCommon::SerializePipeline; | 49 | using VideoCommon::SerializePipeline; |
| 50 | using Context = ShaderContext::Context; | 50 | using Context = ShaderContext::Context; |
| 51 | 51 | ||
| 52 | constexpr u32 CACHE_VERSION = 5; | 52 | constexpr u32 CACHE_VERSION = 6; |
| 53 | 53 | ||
| 54 | template <typename Container> | 54 | template <typename Container> |
| 55 | auto MakeSpan(Container& container) { | 55 | auto MakeSpan(Container& container) { |
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index 3adad5af4..9708dc45e 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | |||
| @@ -53,7 +53,7 @@ using VideoCommon::FileEnvironment; | |||
| 53 | using VideoCommon::GenericEnvironment; | 53 | using VideoCommon::GenericEnvironment; |
| 54 | using VideoCommon::GraphicsEnvironment; | 54 | using VideoCommon::GraphicsEnvironment; |
| 55 | 55 | ||
| 56 | constexpr u32 CACHE_VERSION = 5; | 56 | constexpr u32 CACHE_VERSION = 6; |
| 57 | 57 | ||
| 58 | template <typename Container> | 58 | template <typename Container> |
| 59 | auto MakeSpan(Container& container) { | 59 | auto MakeSpan(Container& container) { |
diff --git a/src/video_core/shader_environment.cpp b/src/video_core/shader_environment.cpp index 808d88eec..5f7625947 100644 --- a/src/video_core/shader_environment.cpp +++ b/src/video_core/shader_environment.cpp | |||
| @@ -39,11 +39,8 @@ static Shader::TextureType ConvertType(const Tegra::Texture::TICEntry& entry) { | |||
| 39 | return Shader::TextureType::Color1D; | 39 | return Shader::TextureType::Color1D; |
| 40 | case Tegra::Texture::TextureType::Texture2D: | 40 | case Tegra::Texture::TextureType::Texture2D: |
| 41 | case Tegra::Texture::TextureType::Texture2DNoMipmap: | 41 | case Tegra::Texture::TextureType::Texture2DNoMipmap: |
| 42 | if (entry.normalized_coords) { | 42 | return entry.normalized_coords ? Shader::TextureType::Color2D |
| 43 | return Shader::TextureType::Color2D; | 43 | : Shader::TextureType::Color2DRect; |
| 44 | } else { | ||
| 45 | return Shader::TextureType::Color2DRect; | ||
| 46 | } | ||
| 47 | case Tegra::Texture::TextureType::Texture3D: | 44 | case Tegra::Texture::TextureType::Texture3D: |
| 48 | return Shader::TextureType::Color3D; | 45 | return Shader::TextureType::Color3D; |
| 49 | case Tegra::Texture::TextureType::TextureCubemap: | 46 | case Tegra::Texture::TextureType::TextureCubemap: |