summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-07-16 16:39:16 +0200
committerSamuel Pitoiset <[email protected]>2019-07-17 08:32:33 +0200
commitedf1af696f74b4ac4efa4a7f62b33099a36b3a30 (patch)
tree5a5bf669e94f9fcf50a82d57ad79a9e871e4175b /src
parentae4b1fc095abb086a50c10ec7849645f571e5b81 (diff)
radv/gfx10: fallback to the legacy path if tess and extreme geometry
This is unsupported and hangs. This fixes GPU hangs with dEQP-VK.tessellation.geometry_interaction.limits.output_required_*. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_pipeline.c12
-rw-r--r--src/amd/vulkan/radv_shader.c2
2 files changed, 13 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index d1eede172dc..a22e605ca1c 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -2306,6 +2306,18 @@ radv_fill_shader_keys(struct radv_device *device,
} else {
keys[MESA_SHADER_VERTEX].vs_common_out.as_ngg = true;
}
+
+ if (nir[MESA_SHADER_TESS_CTRL] &&
+ nir[MESA_SHADER_GEOMETRY] &&
+ nir[MESA_SHADER_GEOMETRY]->info.gs.invocations *
+ nir[MESA_SHADER_GEOMETRY]->info.gs.vertices_out > 256) {
+ /* Fallback to the legacy path if tessellation is
+ * enabled with extreme geometry because
+ * EN_MAX_VERT_OUT_PER_GS_INSTANCE doesn't work and it
+ * might hang.
+ */
+ keys[MESA_SHADER_TESS_EVAL].vs_common_out.as_ngg = false;
+ }
}
for(int i = 0; i < MESA_SHADER_STAGES; ++i)
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 1e9399de193..6bafcb2f869 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -796,7 +796,7 @@ static void radv_postprocess_config(const struct radv_physical_device *pdevice,
break;
}
- if (pdevice->rad_info.chip_class >= GFX10 &&
+ if (pdevice->rad_info.chip_class >= GFX10 && info->is_ngg &&
(stage == MESA_SHADER_VERTEX || stage == MESA_SHADER_TESS_EVAL || stage == MESA_SHADER_GEOMETRY)) {
unsigned gs_vgpr_comp_cnt, es_vgpr_comp_cnt;
gl_shader_stage es_stage = stage;