radv: remove small overhead of radv_pipeline_has_ngg()

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4784
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10908>
This commit is contained in:
Samuel Pitoiset
2021-05-20 22:54:51 +02:00
committed by Marge Bot
parent ca783612e7
commit a00be79d80
3 changed files with 9 additions and 6 deletions

View File

@@ -142,7 +142,7 @@ radv_pipeline_get_color_blend_state(const VkGraphicsPipelineCreateInfo *pCreateI
return NULL;
}
bool
static bool
radv_pipeline_has_ngg(const struct radv_pipeline *pipeline)
{
struct radv_shader_variant *variant = NULL;
@@ -5481,6 +5481,8 @@ radv_pipeline_init(struct radv_pipeline *pipeline, struct radv_device *device,
/* 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;