ac: ac_gpu_info::has_vgt_flush_ngg_legacy_bug
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10911>
This commit is contained in:
parent
ae6bc7a9d0
commit
726cb2d6f6
|
@ -892,6 +892,12 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
|
|||
*/
|
||||
info->has_two_planes_iterate256_bug = info->chip_class == GFX10;
|
||||
|
||||
/* GE has a bug when a legacy GS draw follows an NGG draw and it requires
|
||||
* a VGT_FLUSH to fix that.
|
||||
*/
|
||||
info->has_vgt_flush_ngg_legacy_bug = info->chip_class == GFX10 ||
|
||||
info->family == CHIP_SIENNA_CICHLID;
|
||||
|
||||
/* Support for GFX10.3 was added with F32_ME_FEATURE_VERSION_31 but the
|
||||
* firmware version wasn't bumped.
|
||||
*/
|
||||
|
|
|
@ -78,6 +78,7 @@ struct radeon_info {
|
|||
bool has_zero_index_buffer_bug;
|
||||
bool has_image_load_dcc_bug;
|
||||
bool has_two_planes_iterate256_bug;
|
||||
bool has_vgt_flush_ngg_legacy_bug;
|
||||
bool has_32bit_predication;
|
||||
bool has_3d_cube_border_color_mipmap;
|
||||
|
||||
|
|
|
@ -4376,8 +4376,7 @@ radv_CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipeline
|
|||
/* Prefetch all pipeline shaders at first draw time. */
|
||||
cmd_buffer->state.prefetch_L2_mask |= RADV_PREFETCH_SHADERS;
|
||||
|
||||
if ((cmd_buffer->device->physical_device->rad_info.chip_class == GFX10 ||
|
||||
cmd_buffer->device->physical_device->rad_info.family == CHIP_SIENNA_CICHLID) &&
|
||||
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)) {
|
||||
|
|
|
@ -3099,7 +3099,7 @@ bool si_update_ngg(struct si_context *sctx)
|
|||
* VGT_FLUSH is also emitted at the beginning of IBs when legacy GS ring
|
||||
* pointers are set.
|
||||
*/
|
||||
if ((sctx->chip_class == GFX10 || sctx->family == CHIP_SIENNA_CICHLID) && !new_ngg) {
|
||||
if (sctx->screen->info.has_vgt_flush_ngg_legacy_bug && !new_ngg) {
|
||||
sctx->flags |= SI_CONTEXT_VGT_FLUSH;
|
||||
if (sctx->chip_class == GFX10) {
|
||||
/* Workaround for https://gitlab.freedesktop.org/mesa/mesa/-/issues/2941 */
|
||||
|
|
Loading…
Reference in New Issue