diff options
author | Eric Anholt <[email protected]> | 2019-02-14 21:01:05 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-02-18 18:09:07 -0800 |
commit | 5a84d46896dc16309325c0e60674347c12665eef (patch) | |
tree | b4f2a8190b158c2b3923e1d9c0e7fd5049b489c7 /src | |
parent | 581eba072db4be53cd8d3e2878a162d8fca7c73b (diff) |
v3d: Stop tracking num_inputs for VPM loads.
It's unused in the VS (since we need vattr_sizes[] anyway), so move it to
FS prog data.
Diffstat (limited to 'src')
-rw-r--r-- | src/broadcom/compiler/nir_to_vir.c | 2 | ||||
-rw-r--r-- | src/broadcom/compiler/v3d_compiler.h | 2 | ||||
-rw-r--r-- | src/broadcom/compiler/vir.c | 4 | ||||
-rw-r--r-- | src/broadcom/compiler/vir_opt_dead_code.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_program.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_draw.c | 2 |
6 files changed, 4 insertions, 9 deletions
diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c index 331fc5d73c6..27694f66a44 100644 --- a/src/broadcom/compiler/nir_to_vir.c +++ b/src/broadcom/compiler/nir_to_vir.c @@ -1481,7 +1481,6 @@ ntq_emit_vpm_read(struct v3d_compile *c, if (*num_components_queued != 0) { (*num_components_queued)--; - c->num_inputs++; return vir_MOV(c, vpm); } @@ -1491,7 +1490,6 @@ ntq_emit_vpm_read(struct v3d_compile *c, *num_components_queued = num_components - 1; *remaining -= num_components; - c->num_inputs++; return vir_MOV(c, vpm); } diff --git a/src/broadcom/compiler/v3d_compiler.h b/src/broadcom/compiler/v3d_compiler.h index cb55e2bb518..3995bb1e74f 100644 --- a/src/broadcom/compiler/v3d_compiler.h +++ b/src/broadcom/compiler/v3d_compiler.h @@ -675,7 +675,6 @@ struct v3d_prog_data { uint32_t ubo_size; uint32_t spill_size; - uint8_t num_inputs; uint8_t threads; /* For threads > 1, whether the program should be dispatched in the @@ -723,6 +722,7 @@ struct v3d_fs_prog_data { uint32_t centroid_flags[((V3D_MAX_FS_INPUTS - 1) / 24) + 1]; + uint8_t num_inputs; bool writes_z; bool disable_ez; bool uses_center_w; diff --git a/src/broadcom/compiler/vir.c b/src/broadcom/compiler/vir.c index c0fb6b92c22..3b0274450e9 100644 --- a/src/broadcom/compiler/vir.c +++ b/src/broadcom/compiler/vir.c @@ -665,8 +665,6 @@ static void v3d_vs_set_prog_data(struct v3d_compile *c, struct v3d_vs_prog_data *prog_data) { - prog_data->base.num_inputs = c->num_inputs; - /* The vertex data gets format converted by the VPM so that * each attribute channel takes up a VPM column. Precompute * the sizes for the shader record. @@ -722,7 +720,7 @@ static void v3d_set_fs_prog_data_inputs(struct v3d_compile *c, struct v3d_fs_prog_data *prog_data) { - prog_data->base.num_inputs = c->num_inputs; + prog_data->num_inputs = c->num_inputs; memcpy(prog_data->input_slots, c->input_slots, c->num_inputs * sizeof(*c->input_slots)); diff --git a/src/broadcom/compiler/vir_opt_dead_code.c b/src/broadcom/compiler/vir_opt_dead_code.c index a486708bfa5..56b276d581b 100644 --- a/src/broadcom/compiler/vir_opt_dead_code.c +++ b/src/broadcom/compiler/vir_opt_dead_code.c @@ -194,7 +194,6 @@ vir_opt_dead_code(struct v3d_compile *c) uint32_t offset = (inst->src[i].index % 4); if (c->vattr_sizes[attr] == offset) { - c->num_inputs--; c->vattr_sizes[attr]--; } } diff --git a/src/gallium/drivers/v3d/v3d_program.c b/src/gallium/drivers/v3d/v3d_program.c index 30769047a96..0224df08d0b 100644 --- a/src/gallium/drivers/v3d/v3d_program.c +++ b/src/gallium/drivers/v3d/v3d_program.c @@ -614,7 +614,7 @@ v3d_update_compiled_vs(struct v3d_context *v3d, uint8_t prim_mode) memset(key, 0, sizeof(*key)); v3d_setup_shared_key(v3d, &key->base, &v3d->tex[PIPE_SHADER_VERTEX]); key->base.shader_state = v3d->prog.bind_vs; - key->num_fs_inputs = v3d->prog.fs->prog_data.fs->base.num_inputs; + key->num_fs_inputs = v3d->prog.fs->prog_data.fs->num_inputs; STATIC_ASSERT(sizeof(key->fs_inputs) == sizeof(v3d->prog.fs->prog_data.fs->input_slots)); memcpy(key->fs_inputs, v3d->prog.fs->prog_data.fs->input_slots, diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c index 60fe745fbd3..ebdc436318d 100644 --- a/src/gallium/drivers/v3d/v3dx_draw.c +++ b/src/gallium/drivers/v3d/v3dx_draw.c @@ -215,7 +215,7 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d, v3d->prog.fs->prog_data.fs->uses_center_w; shader.number_of_varyings_in_fragment_shader = - v3d->prog.fs->prog_data.base->num_inputs; + v3d->prog.fs->prog_data.fs->num_inputs; shader.coordinate_shader_propagate_nans = true; shader.vertex_shader_propagate_nans = true; |