diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-06-12 22:23:04 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:35 +0200 |
commit | 3c125d41348b08a467333cf0e40bed7ce26cd7cc (patch) | |
tree | 6d27b0dbc479d9290b4a18b548ef6fd003440796 /src/shader_recompiler/frontend/maxwell | |
parent | vulkan: Add VK_EXT_vertex_input_dynamic_state support (diff) | |
download | yuzu-3c125d41348b08a467333cf0e40bed7ce26cd7cc.tar yuzu-3c125d41348b08a467333cf0e40bed7ce26cd7cc.tar.gz yuzu-3c125d41348b08a467333cf0e40bed7ce26cd7cc.tar.bz2 yuzu-3c125d41348b08a467333cf0e40bed7ce26cd7cc.tar.lz yuzu-3c125d41348b08a467333cf0e40bed7ce26cd7cc.tar.xz yuzu-3c125d41348b08a467333cf0e40bed7ce26cd7cc.tar.zst yuzu-3c125d41348b08a467333cf0e40bed7ce26cd7cc.zip |
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell')
-rw-r--r-- | src/shader_recompiler/frontend/maxwell/translate/impl/texture_mipmap_level.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/texture_mipmap_level.cpp b/src/shader_recompiler/frontend/maxwell/translate/impl/texture_mipmap_level.cpp index abf87a0df..667c69a0d 100644 --- a/src/shader_recompiler/frontend/maxwell/translate/impl/texture_mipmap_level.cpp +++ b/src/shader_recompiler/frontend/maxwell/translate/impl/texture_mipmap_level.cpp @@ -46,16 +46,15 @@ Shader::TextureType GetType(TextureType type) { } IR::Value MakeCoords(TranslatorVisitor& v, IR::Reg reg, TextureType type) { - const auto read_array{[&]() -> IR::F32 { return v.ir.ConvertUToF(32, 16, v.X(reg)); }}; switch (type) { case TextureType::_1D: return v.F(reg); case TextureType::ARRAY_1D: - return v.ir.CompositeConstruct(v.F(reg + 1), read_array()); + return v.F(reg + 1); case TextureType::_2D: return v.ir.CompositeConstruct(v.F(reg), v.F(reg + 1)); case TextureType::ARRAY_2D: - return v.ir.CompositeConstruct(v.F(reg + 1), v.F(reg + 2), read_array()); + return v.ir.CompositeConstruct(v.F(reg + 1), v.F(reg + 2)); case TextureType::_3D: return v.ir.CompositeConstruct(v.F(reg), v.F(reg + 1), v.F(reg + 2)); case TextureType::ARRAY_3D: @@ -63,7 +62,7 @@ IR::Value MakeCoords(TranslatorVisitor& v, IR::Reg reg, TextureType type) { case TextureType::CUBE: return v.ir.CompositeConstruct(v.F(reg), v.F(reg + 1), v.F(reg + 2)); case TextureType::ARRAY_CUBE: - return v.ir.CompositeConstruct(v.F(reg + 1), v.F(reg + 2), v.F(reg + 3), read_array()); + return v.ir.CompositeConstruct(v.F(reg + 1), v.F(reg + 2), v.F(reg + 3)); } throw NotImplementedException("Invalid texture type {}", type); } |