{
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;
--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;
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;