nir/search: support swizzles on expressions in replacement patterns
Before this wasn't a compile time error, but it also didn't do anything. Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36117>
This commit is contained in:
@@ -500,7 +500,10 @@ construct_value(nir_builder *build,
|
||||
|
||||
nir_alu_src val;
|
||||
val.src = nir_src_for_ssa(&alu->def);
|
||||
memcpy(val.swizzle, identity_swizzle, sizeof val.swizzle);
|
||||
if (expr->swizzle < 0)
|
||||
memcpy(val.swizzle, identity_swizzle, sizeof(val.swizzle));
|
||||
else
|
||||
memset(val.swizzle, expr->swizzle, sizeof(val.swizzle));
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user