Mesa (main): radv: fix dynamic rasterizer discard enable state
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 14 16:47:40 UTC 2021
Module: Mesa
Branch: main
Commit: 16d5939ff5e97bf17547164f6e44a36d14aa14eb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=16d5939ff5e97bf17547164f6e44a36d14aa14eb
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Tue Jun 8 16:18:20 2021 +0200
radv: fix dynamic rasterizer discard enable state
If a pipeline enables rasterizerDiscardEnable statically we have to
properly initialize the value, otherwise it won't be updated when a
new pipeline is bound.
Fixes few dEQP-VK.pipeline.extended_dynamic_state.*disable_raster.
Fixes: dd19bf9d7dd ("radv: implement dynamic rasterizer discard enable")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11242>
---
src/amd/vulkan/radv_pipeline.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 8ebe0cd9f81..a8b028a568a 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -1392,13 +1392,14 @@ radv_pipeline_needed_dynamic_state(const VkGraphicsPipelineCreateInfo *pCreateIn
/* If rasterization is disabled we do not care about any of the
* dynamic states, since they are all rasterization related only,
- * except primitive topology, primitive restart enable and vertex
- * binding stride.
+ * except primitive topology, primitive restart enable, vertex
+ * binding stride and rasterization discard itself.
*/
if (pCreateInfo->pRasterizationState->rasterizerDiscardEnable &&
- !radv_is_state_dynamic(pCreateInfo, VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT))
+ !radv_is_state_dynamic(pCreateInfo, VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT)) {
return RADV_DYNAMIC_PRIMITIVE_TOPOLOGY | RADV_DYNAMIC_VERTEX_INPUT_BINDING_STRIDE |
- RADV_DYNAMIC_PRIMITIVE_RESTART_ENABLE;
+ RADV_DYNAMIC_PRIMITIVE_RESTART_ENABLE | RADV_DYNAMIC_RASTERIZER_DISCARD_ENABLE;
+ }
if (!pCreateInfo->pRasterizationState->depthBiasEnable &&
!radv_is_state_dynamic(pCreateInfo, VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT))
More information about the mesa-commit
mailing list