radv: remove duplicated code about NGG passthrough determination
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/13243>
This commit is contained in:
@@ -2801,6 +2801,9 @@ radv_determine_ngg_settings(struct radv_pipeline *pipeline,
|
|||||||
DIV_ROUND_UP(lds_bytes_if_culling_off,
|
DIV_ROUND_UP(lds_bytes_if_culling_off,
|
||||||
device->physical_device->rad_info.lds_encode_granularity);
|
device->physical_device->rad_info.lds_encode_granularity);
|
||||||
|
|
||||||
|
/* NGG passthrough mode should be disabled when culling and when the vertex shader exports the
|
||||||
|
* primitive ID.
|
||||||
|
*/
|
||||||
infos[es_stage].is_ngg_passthrough = infos[es_stage].is_ngg_passthrough &&
|
infos[es_stage].is_ngg_passthrough = infos[es_stage].is_ngg_passthrough &&
|
||||||
!infos[es_stage].has_ngg_culling &&
|
!infos[es_stage].has_ngg_culling &&
|
||||||
!(es_stage == MESA_SHADER_VERTEX &&
|
!(es_stage == MESA_SHADER_VERTEX &&
|
||||||
@@ -2911,13 +2914,6 @@ radv_fill_shader_info(struct radv_pipeline *pipeline,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* NGG passthrough mode can't be enabled for vertex shaders
|
|
||||||
* that export the primitive ID.
|
|
||||||
*/
|
|
||||||
if (nir[MESA_SHADER_VERTEX] && infos[MESA_SHADER_VERTEX].vs.outinfo.export_prim_id) {
|
|
||||||
infos[MESA_SHADER_VERTEX].is_ngg_passthrough = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
filled_stages |= (1 << MESA_SHADER_FRAGMENT);
|
filled_stages |= (1 << MESA_SHADER_FRAGMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user