forked from suyu/suyu
cleanup unuse params
This commit is contained in:
parent
5cd5857000
commit
3e3afa9be6
1 changed files with 6 additions and 8 deletions
|
@ -338,17 +338,17 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) {
|
||||||
switch (component_type) {
|
switch (component_type) {
|
||||||
case ComponentType::SNORM: {
|
case ComponentType::SNORM: {
|
||||||
// range [-1.0, 1.0]
|
// range [-1.0, 1.0]
|
||||||
auto cnv_value = Operation(OperationCode::FMul, NO_PRECISE,
|
auto cnv_value =
|
||||||
original_value, Immediate(128.f));
|
Operation(OperationCode::FMul, original_value, Immediate(128.f));
|
||||||
return SignedOperation(OperationCode::ICastFloat, is_signed, NO_PRECISE,
|
return SignedOperation(OperationCode::ICastFloat, is_signed,
|
||||||
std::move(cnv_value));
|
std::move(cnv_value));
|
||||||
}
|
}
|
||||||
case ComponentType::UNORM: {
|
case ComponentType::UNORM: {
|
||||||
// range [0.0, 1.0]
|
// range [0.0, 1.0]
|
||||||
auto cnv_value = Operation(OperationCode::FMul, NO_PRECISE,
|
auto cnv_value =
|
||||||
original_value, Immediate(255.f));
|
Operation(OperationCode::FMul, original_value, Immediate(255.f));
|
||||||
is_signed = false;
|
is_signed = false;
|
||||||
return SignedOperation(OperationCode::ICastFloat, is_signed, NO_PRECISE,
|
return SignedOperation(OperationCode::ICastFloat, is_signed,
|
||||||
std::move(cnv_value));
|
std::move(cnv_value));
|
||||||
}
|
}
|
||||||
case ComponentType::SINT: // range [-128,128]
|
case ComponentType::SINT: // range [-128,128]
|
||||||
|
@ -374,10 +374,8 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) {
|
||||||
|
|
||||||
// add value into result
|
// add value into result
|
||||||
value = Operation(OperationCode::UBitwiseOr, value, std::move(converted_value));
|
value = Operation(OperationCode::UBitwiseOr, value, std::move(converted_value));
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
SetRegister(bb, instr.gpr0.Value(), std::move(value));
|
SetRegister(bb, instr.gpr0.Value(), std::move(value));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue