mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-04 20:49:58 +00:00
tweaking.
This commit is contained in:
parent
8370188b3c
commit
acd3f0ab37
1 changed files with 3 additions and 3 deletions
|
@ -2,8 +2,6 @@
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#pragma optimize("", off)
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
@ -323,6 +321,7 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) {
|
||||||
switch (instr.suldst.GetStoreDataLayout()) {
|
switch (instr.suldst.GetStoreDataLayout()) {
|
||||||
case StoreType::Bits32: {
|
case StoreType::Bits32: {
|
||||||
u32 shifted_counter = 0;
|
u32 shifted_counter = 0;
|
||||||
|
// value should be RGBA format
|
||||||
Node value = Immediate(0);
|
Node value = Immediate(0);
|
||||||
for (u32 element = 0; element < 4; ++element) {
|
for (u32 element = 0; element < 4; ++element) {
|
||||||
if (!IsComponentEnabled(comp_mask, element)) {
|
if (!IsComponentEnabled(comp_mask, element)) {
|
||||||
|
@ -334,6 +333,7 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) {
|
||||||
MetaImage meta{image, {}, element};
|
MetaImage meta{image, {}, element};
|
||||||
const Node original_value =
|
const Node original_value =
|
||||||
Operation(OperationCode::ImageLoad, meta, GetCoordinates(type));
|
Operation(OperationCode::ImageLoad, meta, GetCoordinates(type));
|
||||||
|
|
||||||
Node converted_value = [&] {
|
Node converted_value = [&] {
|
||||||
switch (component_type) {
|
switch (component_type) {
|
||||||
case ComponentType::SNORM: {
|
case ComponentType::SNORM: {
|
||||||
|
@ -346,7 +346,7 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) {
|
||||||
case ComponentType::UNORM: {
|
case ComponentType::UNORM: {
|
||||||
// range [0.0, 1.0]
|
// range [0.0, 1.0]
|
||||||
auto cnv_value =
|
auto cnv_value =
|
||||||
Operation(OperationCode::FMul, original_value, Immediate(255.f));
|
Operation(OperationCode::FMul, original_value, Immediate(256.f));
|
||||||
is_signed = false;
|
is_signed = false;
|
||||||
return SignedOperation(OperationCode::ICastFloat, is_signed,
|
return SignedOperation(OperationCode::ICastFloat, is_signed,
|
||||||
std::move(cnv_value));
|
std::move(cnv_value));
|
||||||
|
|
Loading…
Reference in a new issue