Mesa (staging/19.2): radv/gfx10: fix VK_KHR_pipeline_executable_properties with NGG GS

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Sep 23 18:32:12 UTC 2019


Module: Mesa
Branch: staging/19.2
Commit: 401de43891b83376ca9db4986ce262be1057a121
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=401de43891b83376ca9db4986ce262be1057a121

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Wed Sep 18 16:58:06 2019 +0200

radv/gfx10: fix VK_KHR_pipeline_executable_properties with NGG GS

No GS copy shader if a pipeline enables NGG GS.

This fixes
dEQP-VK.pipeline.executable_properties.graphics.*geometry_stage*.

Fixes: 86864eedd2d ("radv: Implement radv_GetPipelineExecutablePropertiesKHR.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
(cherry picked from commit 99c186fbbe3e2da0f176eadb1db0a8a640786384)

---

 src/amd/vulkan/radv_pipeline.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index e43b77b192e..654f852ab21 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -4817,8 +4817,15 @@ static uint32_t radv_get_executable_count(const struct radv_pipeline *pipeline)
 {
 	uint32_t ret = 0;
 	for (int i = 0; i < MESA_SHADER_STAGES; ++i) {
-		if (pipeline->shaders[i])
-			ret += i == MESA_SHADER_GEOMETRY ? 2u : 1u;
+		if (!pipeline->shaders[i])
+			continue;
+
+		if (i == MESA_SHADER_GEOMETRY &&
+		    !radv_pipeline_has_ngg(pipeline)) {
+			ret += 2u;
+		} else {
+			ret += 1u;
+		}
 		
 	}
 	return ret;
@@ -4837,7 +4844,8 @@ radv_get_shader_from_executable_index(const struct radv_pipeline *pipeline, int
 
 		--index;
 
-		if (i == MESA_SHADER_GEOMETRY) {
+		if (i == MESA_SHADER_GEOMETRY &&
+		    !radv_pipeline_has_ngg(pipeline)) {
 			if (!index) {
 				*stage = i;
 				return pipeline->gs_copy_shader;
@@ -4928,7 +4936,8 @@ VkResult radv_GetPipelineExecutablePropertiesKHR(
 		desc_copy(pProperties[executable_idx].description, description);
 
 		++executable_idx;
-		if (i == MESA_SHADER_GEOMETRY) {
+		if (i == MESA_SHADER_GEOMETRY &&
+		    !radv_pipeline_has_ngg(pipeline)) {
 			assert(pipeline->gs_copy_shader);
 			if (executable_idx >= count)
 				break;




More information about the mesa-commit mailing list