decode/texture: Collapse loop down into std::generate
Same behavior, less code.
This commit is contained in:
parent
7e2d60de26
commit
f522abd8ab
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue