diff options
author | Eric Anholt <[email protected]> | 2018-09-18 15:53:54 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-10-15 17:16:43 -0700 |
commit | dda1ae9b3cb9ea39c9435fba01c6c31a99c4d35e (patch) | |
tree | 6d57a596152835d5b68e3cad5148ba410bdec659 /src/gallium/drivers/v3d | |
parent | da15a0d88ea1a29968ee624186d895fe5ff0f574 (diff) |
gallium/ttn: Convert inputs and outputs to derefs of variables.
This means that TTN shaders more closely resemble GTN shaders: they have
inputs and outputs as variable derefs, with the variables having their
.driver_location already set up for you.
This will be useful for v3d to do input variable DCE in NIR, which we
can't do when the TTN shaders never have a pre-nir_lower_io stage.
Acked-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/v3d')
-rw-r--r-- | src/gallium/drivers/v3d/v3d_program.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/v3d/v3d_program.c b/src/gallium/drivers/v3d/v3d_program.c index 85554586a6c..e9fae77d5c0 100644 --- a/src/gallium/drivers/v3d/v3d_program.c +++ b/src/gallium/drivers/v3d/v3d_program.c @@ -193,9 +193,6 @@ v3d_shader_state_create(struct pipe_context *pctx, */ s = cso->ir.nir; - NIR_PASS_V(s, nir_lower_io, nir_var_all & ~nir_var_uniform, - type_size, - (nir_lower_io_options)0); NIR_PASS_V(s, nir_lower_io, nir_var_uniform, uniforms_type_size, (nir_lower_io_options)0); @@ -213,6 +210,10 @@ v3d_shader_state_create(struct pipe_context *pctx, so->was_tgsi = true; } + NIR_PASS_V(s, nir_lower_io, nir_var_all & ~nir_var_uniform, + type_size, + (nir_lower_io_options)0); + NIR_PASS_V(s, nir_opt_global_to_local); NIR_PASS_V(s, nir_lower_regs_to_ssa); NIR_PASS_V(s, nir_normalize_cubemap_coords); |