nir: Make nir_lower_clip_vs optionally work with variables.
The way nir_lower_clip_vs() works with store_output intrinsics makes a ton of assumptions about the driver_location field. In i965 and iris, I'd rather do this lowering early and work with variables. v3d may want to switch to that as well, and ir3 could too, but I'm not sure exactly what would need updating. For now, handle both methods. Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
@@ -745,7 +745,8 @@ uint64_t *v3d_compile_vs(const struct v3d_compiler *compiler,
|
||||
NIR_PASS_V(c->s, nir_lower_clamp_color_outputs);
|
||||
|
||||
if (key->base.ucp_enables) {
|
||||
NIR_PASS_V(c->s, nir_lower_clip_vs, key->base.ucp_enables);
|
||||
NIR_PASS_V(c->s, nir_lower_clip_vs, key->base.ucp_enables,
|
||||
false);
|
||||
NIR_PASS_V(c->s, nir_lower_io_to_scalar,
|
||||
nir_var_shader_out);
|
||||
}
|
||||
|
Reference in New Issue
Block a user