Browse Source

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: 86864eedd2 ("radv: Implement radv_GetPipelineExecutablePropertiesKHR.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
tags/19.3-branchpoint
Samuel Pitoiset 7 years ago
parent
commit
99c186fbbe
1 changed files with 13 additions and 4 deletions
  1. 13
    4
      src/amd/vulkan/radv_pipeline.c

+ 13
- 4
src/amd/vulkan/radv_pipeline.c View File

{ {
uint32_t ret = 0; uint32_t ret = 0;
for (int i = 0; i < MESA_SHADER_STAGES; ++i) { 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; return ret;


--index; --index;


if (i == MESA_SHADER_GEOMETRY) {
if (i == MESA_SHADER_GEOMETRY &&
!radv_pipeline_has_ngg(pipeline)) {
if (!index) { if (!index) {
*stage = i; *stage = i;
return pipeline->gs_copy_shader; return pipeline->gs_copy_shader;
desc_copy(pProperties[executable_idx].description, description); desc_copy(pProperties[executable_idx].description, description);


++executable_idx; ++executable_idx;
if (i == MESA_SHADER_GEOMETRY) {
if (i == MESA_SHADER_GEOMETRY &&
!radv_pipeline_has_ngg(pipeline)) {
assert(pipeline->gs_copy_shader); assert(pipeline->gs_copy_shader);
if (executable_idx >= count) if (executable_idx >= count)
break; break;

Loading…
Cancel
Save