uint32_t ngg_gs_state = 0;
uint32_t base_reg;
- if (!radv_pipeline_has_gs(pipeline) || !radv_pipeline_has_ngg(pipeline))
+ if (!radv_pipeline_has_gs(pipeline) || !pipeline->graphics.is_ngg)
return;
/* By default NGG GS queries are disabled but they are enabled if the
if (cmd_buffer->device->physical_device->rad_info.has_vgt_flush_ngg_legacy_bug &&
cmd_buffer->state.emitted_pipeline &&
- radv_pipeline_has_ngg(cmd_buffer->state.emitted_pipeline) &&
- !radv_pipeline_has_ngg(cmd_buffer->state.pipeline)) {
+ cmd_buffer->state.emitted_pipeline->graphics.is_ngg &&
+ !cmd_buffer->state.pipeline->graphics.is_ngg) {
/* Transitioning from NGG to legacy GS requires
* VGT_FLUSH on GFX10 and Sienna Cichlid. VGT_FLUSH
* is also emitted at the beginning of IBs when legacy
return NULL;
}
-bool
+static bool
radv_pipeline_has_ngg(const struct radv_pipeline *pipeline)
{
struct radv_shader_variant *variant = NULL;
/* Find the last vertex shader stage that eventually uses streamout. */
pipeline->streamout_shader = radv_pipeline_get_streamout_shader(pipeline);
+ pipeline->graphics.is_ngg = radv_pipeline_has_ngg(pipeline);
+
radv_pipeline_generate_pm4(pipeline, pCreateInfo, extra, &blend);
return result;
/* Used for rbplus */
uint32_t col_format;
uint32_t cb_target_mask;
+
+ /* Whether the pipeline uses NGG (GFX10+). */
+ bool is_ngg;
} graphics;
};
return pipeline->shaders[MESA_SHADER_TESS_CTRL] ? true : false;
}
-bool radv_pipeline_has_ngg(const struct radv_pipeline *pipeline);
-
bool radv_pipeline_has_ngg_passthrough(const struct radv_pipeline *pipeline);
bool radv_pipeline_has_gs_copy_shader(const struct radv_pipeline *pipeline);