diff options
| author | 2020-03-22 21:13:07 +0700 | |
|---|---|---|
| committer | 2020-04-05 10:31:32 +0700 | |
| commit | acd3f0ab37520e449471040c1b7ccc6208f8e823 (patch) | |
| tree | 1e08795a446c7af18d9b53f1834d69fa92bb917a /src/video_core | |
| parent | clang-format (diff) | |
| download | yuzu-acd3f0ab37520e449471040c1b7ccc6208f8e823.tar.gz yuzu-acd3f0ab37520e449471040c1b7ccc6208f8e823.tar.xz yuzu-acd3f0ab37520e449471040c1b7ccc6208f8e823.zip | |
tweaking.
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/shader/decode/image.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/shader/decode/image.cpp b/src/video_core/shader/decode/image.cpp index cc5d2424c..07eb36153 100644 --- a/src/video_core/shader/decode/image.cpp +++ b/src/video_core/shader/decode/image.cpp | |||
| @@ -2,8 +2,6 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #pragma optimize("", off) | ||
| 6 | |||
| 7 | #include <algorithm> | 5 | #include <algorithm> |
| 8 | #include <vector> | 6 | #include <vector> |
| 9 | #include <fmt/format.h> | 7 | #include <fmt/format.h> |
| @@ -323,6 +321,7 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) { | |||
| 323 | switch (instr.suldst.GetStoreDataLayout()) { | 321 | switch (instr.suldst.GetStoreDataLayout()) { |
| 324 | case StoreType::Bits32: { | 322 | case StoreType::Bits32: { |
| 325 | u32 shifted_counter = 0; | 323 | u32 shifted_counter = 0; |
| 324 | // value should be RGBA format | ||
| 326 | Node value = Immediate(0); | 325 | Node value = Immediate(0); |
| 327 | for (u32 element = 0; element < 4; ++element) { | 326 | for (u32 element = 0; element < 4; ++element) { |
| 328 | if (!IsComponentEnabled(comp_mask, element)) { | 327 | if (!IsComponentEnabled(comp_mask, element)) { |
| @@ -334,6 +333,7 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) { | |||
| 334 | MetaImage meta{image, {}, element}; | 333 | MetaImage meta{image, {}, element}; |
| 335 | const Node original_value = | 334 | const Node original_value = |
| 336 | Operation(OperationCode::ImageLoad, meta, GetCoordinates(type)); | 335 | Operation(OperationCode::ImageLoad, meta, GetCoordinates(type)); |
| 336 | |||
| 337 | Node converted_value = [&] { | 337 | Node converted_value = [&] { |
| 338 | switch (component_type) { | 338 | switch (component_type) { |
| 339 | case ComponentType::SNORM: { | 339 | case ComponentType::SNORM: { |
| @@ -346,7 +346,7 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) { | |||
| 346 | case ComponentType::UNORM: { | 346 | case ComponentType::UNORM: { |
| 347 | // range [0.0, 1.0] | 347 | // range [0.0, 1.0] |
| 348 | auto cnv_value = | 348 | auto cnv_value = |
| 349 | Operation(OperationCode::FMul, original_value, Immediate(255.f)); | 349 | Operation(OperationCode::FMul, original_value, Immediate(256.f)); |
| 350 | is_signed = false; | 350 | is_signed = false; |
| 351 | return SignedOperation(OperationCode::ICastFloat, is_signed, | 351 | return SignedOperation(OperationCode::ICastFloat, is_signed, |
| 352 | std::move(cnv_value)); | 352 | std::move(cnv_value)); |