1
0
Fork 0
forked from suyu/suyu

decode/texture: Collapse loop down into std::generate

Same behavior, less code.
This commit is contained in:
Lioncash 2020-04-16 22:29:05 -04:00
parent 7e2d60de26
commit f522abd8ab

View file

@ -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;
} }