summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2019-10-29 08:32:44 +0100
committerIago Toral <[email protected]>2019-10-31 08:46:35 +0000
commite7e501efceca73b92727e9d295eda63d21e76afe (patch)
tree90e4c392cc3124820d0ec639bba3c53e9e583bac /src/gallium
parentd688e4166ca9c49a980a78ce91846fd7072df8fd (diff)
v3d: rename vertex shader key (num)_fs_inputs fields
Until now this made sense because we always paired vertex shaders with fragment shaders, but as soon as we implement geometry and tessellation shaders that will no longer be the case, so rename this to (num_)used_outputs. v2: Use 'used_outputs' instead of ns_outputs, which is more explicit (Eric). Reviewed-by: Alejandro PiƱeiro <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/v3d/v3d_program.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gallium/drivers/v3d/v3d_program.c b/src/gallium/drivers/v3d/v3d_program.c
index ff91b332cd2..75022d86c21 100644
--- a/src/gallium/drivers/v3d/v3d_program.c
+++ b/src/gallium/drivers/v3d/v3d_program.c
@@ -220,7 +220,7 @@ v3d_shader_precompile(struct v3d_context *v3d,
int slot = var->data.location;
for (int i = 0; i < glsl_get_components(var->type); i++) {
int swiz = var->data.location_frac + i;
- key.fs_inputs[key.num_fs_inputs++] =
+ key.used_outputs[key.num_used_outputs++] =
v3d_slot_from_slot_and_component(slot,
swiz);
}
@@ -230,9 +230,9 @@ v3d_shader_precompile(struct v3d_context *v3d,
/* Compile VS bin shader: only position (XXX: include TF) */
key.is_coord = true;
- key.num_fs_inputs = 0;
+ key.num_used_outputs = 0;
for (int i = 0; i < 4; i++) {
- key.fs_inputs[key.num_fs_inputs++] =
+ key.used_outputs[key.num_used_outputs++] =
v3d_slot_from_slot_and_component(VARYING_SLOT_POS,
i);
}
@@ -627,11 +627,11 @@ v3d_update_compiled_vs(struct v3d_context *v3d, uint8_t prim_mode)
v3d_setup_shared_key(v3d, &key->base, &v3d->tex[PIPE_SHADER_VERTEX]);
key->base.shader_state = v3d->prog.bind_vs;
key->base.ucp_enables = v3d->rasterizer->base.clip_plane_enable;
- key->num_fs_inputs = v3d->prog.fs->prog_data.fs->num_inputs;
- STATIC_ASSERT(sizeof(key->fs_inputs) ==
+ key->num_used_outputs = v3d->prog.fs->prog_data.fs->num_inputs;
+ STATIC_ASSERT(sizeof(key->used_outputs) ==
sizeof(v3d->prog.fs->prog_data.fs->input_slots));
- memcpy(key->fs_inputs, v3d->prog.fs->prog_data.fs->input_slots,
- sizeof(key->fs_inputs));
+ memcpy(key->used_outputs, v3d->prog.fs->prog_data.fs->input_slots,
+ sizeof(key->used_outputs));
key->clamp_color = v3d->rasterizer->base.clamp_vertex_color;
key->per_vertex_point_size =
@@ -648,15 +648,15 @@ v3d_update_compiled_vs(struct v3d_context *v3d, uint8_t prim_mode)
key->is_coord = true;
/* Coord shaders only output varyings used by transform feedback. */
struct v3d_uncompiled_shader *shader_state = key->base.shader_state;
- memcpy(key->fs_inputs, shader_state->tf_outputs,
- sizeof(*key->fs_inputs) * shader_state->num_tf_outputs);
- if (shader_state->num_tf_outputs < key->num_fs_inputs) {
- memset(&key->fs_inputs[shader_state->num_tf_outputs],
+ memcpy(key->used_outputs, shader_state->tf_outputs,
+ sizeof(*key->used_outputs) * shader_state->num_tf_outputs);
+ if (shader_state->num_tf_outputs < key->num_used_outputs) {
+ memset(&key->used_outputs[shader_state->num_tf_outputs],
0,
- sizeof(*key->fs_inputs) * (key->num_fs_inputs -
+ sizeof(*key->used_outputs) * (key->num_used_outputs -
shader_state->num_tf_outputs));
}
- key->num_fs_inputs = shader_state->num_tf_outputs;
+ key->num_used_outputs = shader_state->num_tf_outputs;
struct v3d_compiled_shader *cs =
v3d_get_compiled_shader(v3d, &key->base, sizeof(*key));