mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
decode/texture: Collapse loop down into std::generate
Same behavior, less code.
This commit is contained in:
parent
7e2d60de26
commit
f522abd8ab
1 changed files with 1 additions and 3 deletions
|
@ -176,9 +176,7 @@ u32 ShaderIR::DecodeTexture(NodeBlock& bb, u32 pc) {
|
||||||
: GetSampler(instr.sampler, {{texture_type, is_array, false, false}});
|
: GetSampler(instr.sampler, {{texture_type, is_array, false, false}});
|
||||||
Node4 values;
|
Node4 values;
|
||||||
if (sampler == nullptr) {
|
if (sampler == nullptr) {
|
||||||
for (u32 element = 0; element < values.size(); ++element) {
|
std::generate(values.begin(), values.end(), [] { return Immediate(0); });
|
||||||
values[element] = Immediate(0);
|
|
||||||
}
|
|
||||||
WriteTexInstructionFloat(bb, instr, values);
|
WriteTexInstructionFloat(bb, instr, values);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue