summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-09-06 03:20:54 +0200
committerGitHub <noreply@github.com>2022-09-06 03:20:54 +0200
commit4ffbbc534884841f9a5536e57539bf3d1642af26 (patch)
tree128d85b7223c376906ecb180d22e48e268a8c054 /src
parentMerge pull request #8847 from german77/stop (diff)
parentstyle: General style changes to match with the rest of the codebase (diff)
downloadyuzu-4ffbbc534884841f9a5536e57539bf3d1642af26.tar
yuzu-4ffbbc534884841f9a5536e57539bf3d1642af26.tar.gz
yuzu-4ffbbc534884841f9a5536e57539bf3d1642af26.tar.bz2
yuzu-4ffbbc534884841f9a5536e57539bf3d1642af26.tar.lz
yuzu-4ffbbc534884841f9a5536e57539bf3d1642af26.tar.xz
yuzu-4ffbbc534884841f9a5536e57539bf3d1642af26.tar.zst
yuzu-4ffbbc534884841f9a5536e57539bf3d1642af26.zip
Diffstat (limited to 'src')
-rw-r--r--src/shader_recompiler/ir_opt/texture_pass.cpp10
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp2
-rw-r--r--src/video_core/renderer_vulkan/vk_pipeline_cache.cpp2
-rw-r--r--src/video_core/shader_environment.cpp7
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) {
inst->SetFlags(flags);
break;
case IR::Opcode::ImageSampleImplicitLod:
- if (flags.type == TextureType::Color2D) {
- auto texture_type = ReadTextureType(env, cbuf);
- if (texture_type == TextureType::Color2DRect) {
- PatchImageSampleImplicitLod(*texture_inst.block, *texture_inst.inst);
- }
+ if (flags.type != TextureType::Color2D) {
+ break;
+ }
+ if (ReadTextureType(env, cbuf) == TextureType::Color2DRect) {
+ PatchImageSampleImplicitLod(*texture_inst.block, *texture_inst.inst);
}
break;
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;
using VideoCommon::SerializePipeline;
using Context = ShaderContext::Context;
-constexpr u32 CACHE_VERSION = 5;
+constexpr u32 CACHE_VERSION = 6;
template <typename Container>
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;
using VideoCommon::GenericEnvironment;
using VideoCommon::GraphicsEnvironment;
-constexpr u32 CACHE_VERSION = 5;
+constexpr u32 CACHE_VERSION = 6;
template <typename Container>
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) {
return Shader::TextureType::Color1D;
case Tegra::Texture::TextureType::Texture2D:
case Tegra::Texture::TextureType::Texture2DNoMipmap:
- if (entry.normalized_coords) {
- return Shader::TextureType::Color2D;
- } else {
- return Shader::TextureType::Color2DRect;
- }
+ return entry.normalized_coords ? Shader::TextureType::Color2D
+ : Shader::TextureType::Color2DRect;
case Tegra::Texture::TextureType::Texture3D:
return Shader::TextureType::Color3D;
case Tegra::Texture::TextureType::TextureCubemap: