summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>2018-06-02 14:25:45 +0200
committerDylan Baker <dylan@pnwbakers.com>2018-06-04 11:05:04 -0700
commit1a2205636cc2e66ce5654254ae8ce5d8e1478af8 (patch)
treef34fe79dafd29aa765ab0ee54ca8bbb77b4dbde1
parent44d164537fcaae231031018e5b60225d15d1ffc3 (diff)
downloadmesa-1a2205636cc2e66ce5654254ae8ce5d8e1478af8.tar.gz
radv: Don't pass a TESS_EVAL shader when tesselation is not enabled.
Otherwise on pre-GFX9, if the constant layout allows both TESS_EVAL and GEOMETRY shaders, but the PIPELINE has only GEOMETRY, it would return the GEOMETRY shader for the TESS_EVAL shader. This would cause the flush_constants code to emit the GEOMETRY constants to the TESS_EVAL registers and then conclude that it did not need to set the GEOMETRY shader registers. Fixes: dfff9fb6f8d "radv: Handle GFX9 merged shaders in radv_flush_constants()" CC: 18.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Alex Smith <asmith@feralinteractive.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 2835b6baf446d0ff3b3df6eefc57b248a505af36)
-rw-r--r--src/amd/vulkan/radv_pipeline.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 423dce3deae..e8ec39934af 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -1594,6 +1594,8 @@ radv_get_shader(struct radv_pipeline *pipeline,
if (pipeline->shaders[MESA_SHADER_GEOMETRY])
return pipeline->shaders[MESA_SHADER_GEOMETRY];
} else if (stage == MESA_SHADER_TESS_EVAL) {
+ if (!radv_pipeline_has_tess(pipeline))
+ return NULL;
if (pipeline->shaders[MESA_SHADER_TESS_EVAL])
return pipeline->shaders[MESA_SHADER_TESS_EVAL];
if (pipeline->shaders[MESA_SHADER_GEOMETRY])