Commit beea2dee authored by Marek Olšák's avatar Marek Olšák

radeonsi/gfx10: fix the PRIMITIVES_GENERATED query if using legacy streamout

parent 78c603eb
......@@ -601,6 +601,7 @@ void si_shader_selector_key_vs(struct si_context *sctx,
struct si_shader_key *key,
struct si_vs_prolog_bits *prolog_key);
unsigned si_get_input_prim(const struct si_shader_selector *gs);
bool si_update_ngg(struct si_context *sctx);
/* si_state_draw.c */
void si_emit_surface_sync(struct si_context *sctx, struct radeon_cmdbuf *cs,
......
......@@ -2984,8 +2984,6 @@ static void si_update_common_shader_state(struct si_context *sctx)
sctx->do_update_shaders = true;
}
static bool si_update_ngg(struct si_context *sctx);
static void si_bind_vs_shader(struct pipe_context *ctx, void *state)
{
struct si_context *sctx = (struct si_context *)ctx;
......@@ -3024,7 +3022,7 @@ static void si_update_tess_uses_prim_id(struct si_context *sctx)
sctx->ps_shader.cso->info.uses_primid);
}
static bool si_update_ngg(struct si_context *sctx)
bool si_update_ngg(struct si_context *sctx)
{
if (!sctx->screen->use_ngg) {
assert(!sctx->ngg);
......@@ -3039,7 +3037,8 @@ static bool si_update_ngg(struct si_context *sctx)
} else if (!sctx->screen->use_ngg_streamout) {
struct si_shader_selector *last = si_get_vs(sctx)->cso;
if (last && last->so.num_outputs)
if ((last && last->so.num_outputs) ||
sctx->streamout.prims_gen_query_enabled)
new_ngg = false;
}
......
......@@ -470,6 +470,11 @@ void si_update_prims_generated_query_state(struct si_context *sctx,
if (old_strmout_en != si_get_strmout_en(sctx))
si_mark_atom_dirty(sctx, &sctx->atoms.s.streamout_enable);
if (si_update_ngg(sctx)) {
si_shader_change_notify(sctx);
sctx->do_update_shaders = true;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment