radv: Add mesh shader specific info.
Use the same old outinfo structure as other NGG shaders. Additionally, store the output primitive type. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13580>
This commit is contained in:
@@ -2349,6 +2349,8 @@ get_vs_output_info(const struct radv_pipeline *pipeline)
|
|||||||
return &pipeline->gs_copy_shader->info.vs.outinfo;
|
return &pipeline->gs_copy_shader->info.vs.outinfo;
|
||||||
else if (radv_pipeline_has_tess(pipeline))
|
else if (radv_pipeline_has_tess(pipeline))
|
||||||
return &pipeline->shaders[MESA_SHADER_TESS_EVAL]->info.tes.outinfo;
|
return &pipeline->shaders[MESA_SHADER_TESS_EVAL]->info.tes.outinfo;
|
||||||
|
else if (radv_pipeline_has_mesh(pipeline))
|
||||||
|
return &pipeline->shaders[MESA_SHADER_MESH]->info.ms.outinfo;
|
||||||
else
|
else
|
||||||
return &pipeline->shaders[MESA_SHADER_VERTEX]->info.vs.outinfo;
|
return &pipeline->shaders[MESA_SHADER_VERTEX]->info.vs.outinfo;
|
||||||
}
|
}
|
||||||
|
@@ -348,6 +348,10 @@ struct radv_shader_info {
|
|||||||
uint8_t num_linked_patch_outputs;
|
uint8_t num_linked_patch_outputs;
|
||||||
bool tes_reads_tess_factors : 1;
|
bool tes_reads_tess_factors : 1;
|
||||||
} tcs;
|
} tcs;
|
||||||
|
struct {
|
||||||
|
struct radv_vs_output_info outinfo;
|
||||||
|
uint16_t output_prim; /* Output primitive type: GL_POINTS, GL_LINES or GL_TRIANGLES. */
|
||||||
|
} ms;
|
||||||
|
|
||||||
struct radv_streamout_info so;
|
struct radv_streamout_info so;
|
||||||
|
|
||||||
|
@@ -493,6 +493,8 @@ get_vs_output_info(const nir_shader *nir, struct radv_shader_info *info)
|
|||||||
if (!info->tes.as_es)
|
if (!info->tes.as_es)
|
||||||
return &info->tes.outinfo;
|
return &info->tes.outinfo;
|
||||||
break;
|
break;
|
||||||
|
case MESA_SHADER_MESH:
|
||||||
|
return &info->ms.outinfo;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -727,6 +729,9 @@ radv_nir_shader_info_pass(struct radv_device *device, const struct nir_shader *n
|
|||||||
break;
|
break;
|
||||||
case MESA_SHADER_VERTEX:
|
case MESA_SHADER_VERTEX:
|
||||||
break;
|
break;
|
||||||
|
case MESA_SHADER_MESH:
|
||||||
|
info->ms.output_prim = nir->info.mesh.primitive_type;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user