radeonsi: rename *trivial_vs_prolog -> *trivial_vs_inputs
This is a better name. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
This commit is contained in:
@@ -1122,8 +1122,8 @@ struct si_context {
|
|||||||
struct si_vertex_elements *vertex_elements;
|
struct si_vertex_elements *vertex_elements;
|
||||||
unsigned num_vertex_elements;
|
unsigned num_vertex_elements;
|
||||||
unsigned cs_max_waves_per_sh;
|
unsigned cs_max_waves_per_sh;
|
||||||
bool uses_nontrivial_vs_prolog;
|
bool uses_nontrivial_vs_inputs;
|
||||||
bool force_trivial_vs_prolog;
|
bool force_trivial_vs_inputs;
|
||||||
bool do_update_shaders;
|
bool do_update_shaders;
|
||||||
bool compute_shaderbuf_sgprs_dirty;
|
bool compute_shaderbuf_sgprs_dirty;
|
||||||
bool compute_image_sgprs_dirty;
|
bool compute_image_sgprs_dirty;
|
||||||
|
@@ -2132,21 +2132,21 @@ static void si_draw(struct pipe_context *ctx,
|
|||||||
* so disable any non-trivial VS prolog that is based on them, such as vertex
|
* so disable any non-trivial VS prolog that is based on them, such as vertex
|
||||||
* format lowering.
|
* format lowering.
|
||||||
*/
|
*/
|
||||||
if (!sctx->force_trivial_vs_prolog) {
|
if (!sctx->force_trivial_vs_inputs) {
|
||||||
sctx->force_trivial_vs_prolog = true;
|
sctx->force_trivial_vs_inputs = true;
|
||||||
|
|
||||||
/* Update shaders to disable the non-trivial VS prolog. */
|
/* Update shaders to disable the non-trivial VS prolog. */
|
||||||
if (sctx->uses_nontrivial_vs_prolog) {
|
if (sctx->uses_nontrivial_vs_inputs) {
|
||||||
si_vs_key_update_inputs(sctx);
|
si_vs_key_update_inputs(sctx);
|
||||||
sctx->do_update_shaders = true;
|
sctx->do_update_shaders = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (sctx->force_trivial_vs_prolog) {
|
if (sctx->force_trivial_vs_inputs) {
|
||||||
sctx->force_trivial_vs_prolog = false;
|
sctx->force_trivial_vs_inputs = false;
|
||||||
|
|
||||||
/* Update shaders to enable the non-trivial VS prolog. */
|
/* Update shaders to enable the non-trivial VS prolog. */
|
||||||
if (sctx->uses_nontrivial_vs_prolog) {
|
if (sctx->uses_nontrivial_vs_inputs) {
|
||||||
si_vs_key_update_inputs(sctx);
|
si_vs_key_update_inputs(sctx);
|
||||||
sctx->do_update_shaders = true;
|
sctx->do_update_shaders = true;
|
||||||
}
|
}
|
||||||
|
@@ -2131,14 +2131,14 @@ void si_vs_key_update_inputs(struct si_context *sctx)
|
|||||||
if (vs->info.base.vs.blit_sgprs_amd) {
|
if (vs->info.base.vs.blit_sgprs_amd) {
|
||||||
si_clear_vs_key_inputs(sctx, key, &key->ge.part.vs.prolog);
|
si_clear_vs_key_inputs(sctx, key, &key->ge.part.vs.prolog);
|
||||||
key->ge.opt.prefer_mono = 0;
|
key->ge.opt.prefer_mono = 0;
|
||||||
sctx->uses_nontrivial_vs_prolog = false;
|
sctx->uses_nontrivial_vs_inputs = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool uses_nontrivial_vs_prolog = false;
|
bool uses_nontrivial_vs_inputs = false;
|
||||||
|
|
||||||
if (elts->instance_divisor_is_one || elts->instance_divisor_is_fetched)
|
if (elts->instance_divisor_is_one || elts->instance_divisor_is_fetched)
|
||||||
uses_nontrivial_vs_prolog = true;
|
uses_nontrivial_vs_inputs = true;
|
||||||
|
|
||||||
key->ge.part.vs.prolog.instance_divisor_is_one = elts->instance_divisor_is_one;
|
key->ge.part.vs.prolog.instance_divisor_is_one = elts->instance_divisor_is_one;
|
||||||
key->ge.part.vs.prolog.instance_divisor_is_fetched = elts->instance_divisor_is_fetched;
|
key->ge.part.vs.prolog.instance_divisor_is_fetched = elts->instance_divisor_is_fetched;
|
||||||
@@ -2171,24 +2171,24 @@ void si_vs_key_update_inputs(struct si_context *sctx)
|
|||||||
|
|
||||||
key->ge.mono.vs_fix_fetch[i].bits = fix_fetch;
|
key->ge.mono.vs_fix_fetch[i].bits = fix_fetch;
|
||||||
if (fix_fetch)
|
if (fix_fetch)
|
||||||
uses_nontrivial_vs_prolog = true;
|
uses_nontrivial_vs_inputs = true;
|
||||||
}
|
}
|
||||||
key->ge.mono.vs_fetch_opencode = opencode;
|
key->ge.mono.vs_fetch_opencode = opencode;
|
||||||
if (opencode)
|
if (opencode)
|
||||||
uses_nontrivial_vs_prolog = true;
|
uses_nontrivial_vs_inputs = true;
|
||||||
|
|
||||||
sctx->uses_nontrivial_vs_prolog = uses_nontrivial_vs_prolog;
|
sctx->uses_nontrivial_vs_inputs = uses_nontrivial_vs_inputs;
|
||||||
|
|
||||||
/* draw_vertex_state (display lists) requires a trivial VS prolog that ignores
|
/* draw_vertex_state (display lists) requires a trivial VS prolog that ignores
|
||||||
* the current vertex buffers and vertex elements.
|
* the current vertex buffers and vertex elements.
|
||||||
*
|
*
|
||||||
* We just computed the prolog key because we needed to set uses_nontrivial_vs_prolog,
|
* We just computed the prolog key because we needed to set uses_nontrivial_vs_inputs,
|
||||||
* so that we know whether the VS prolog should be updated when we switch from
|
* so that we know whether the VS prolog should be updated when we switch from
|
||||||
* draw_vertex_state to draw_vbo. Now clear the VS prolog for draw_vertex_state.
|
* draw_vertex_state to draw_vbo. Now clear the VS prolog for draw_vertex_state.
|
||||||
* This should happen rarely because the VS prolog should be trivial in most
|
* This should happen rarely because the VS prolog should be trivial in most
|
||||||
* cases.
|
* cases.
|
||||||
*/
|
*/
|
||||||
if (uses_nontrivial_vs_prolog && sctx->force_trivial_vs_prolog)
|
if (uses_nontrivial_vs_inputs && sctx->force_trivial_vs_inputs)
|
||||||
si_clear_vs_key_inputs(sctx, key, &key->ge.part.vs.prolog);
|
si_clear_vs_key_inputs(sctx, key, &key->ge.part.vs.prolog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user