mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 19:50:11 +01:00
radv: fill radv_vs_output_info unconditionally for vertex related stages
That shouldn't change anything for VS as LS (or as ES) and for TES as ES because radv_vs_output_info is only used by the last vertex stage. So, if we have TES+GS, radv_vs_output_info for TES will be overwritten by GS. This allows to decouple the shader info pass from other stages. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210>
This commit is contained in:
parent
ee5b9bcc57
commit
2d0500d24a
1 changed files with 4 additions and 14 deletions
|
|
@ -354,18 +354,6 @@ gather_info_output_decl_gs(const nir_shader *nir, const nir_variable *var,
|
|||
info->gs.output_streams[idx] = stream;
|
||||
}
|
||||
|
||||
static struct radv_vs_output_info *
|
||||
get_vs_output_info(const nir_shader *nir, struct radv_shader_info *info)
|
||||
{
|
||||
if ((nir->info.stage == MESA_SHADER_VERTEX && !info->vs.as_ls && !info->vs.as_es) ||
|
||||
(nir->info.stage == MESA_SHADER_TESS_EVAL && !info->tes.as_es) ||
|
||||
nir->info.stage == MESA_SHADER_GEOMETRY || nir->info.stage == MESA_SHADER_MESH) {
|
||||
return &info->outinfo;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gather_info_output_decl(const nir_shader *nir, const nir_variable *var,
|
||||
struct radv_shader_info *info)
|
||||
|
|
@ -491,8 +479,10 @@ radv_nir_shader_info_pass(struct radv_device *device, const struct nir_shader *n
|
|||
nir->info.stage == MESA_SHADER_GEOMETRY)
|
||||
gather_xfb_info(nir, info);
|
||||
|
||||
struct radv_vs_output_info *outinfo = get_vs_output_info(nir, info);
|
||||
if (outinfo) {
|
||||
if (nir->info.stage == MESA_SHADER_VERTEX || nir->info.stage == MESA_SHADER_TESS_EVAL ||
|
||||
nir->info.stage == MESA_SHADER_GEOMETRY || nir->info.stage == MESA_SHADER_MESH) {
|
||||
struct radv_vs_output_info *outinfo = &info->outinfo;
|
||||
|
||||
/* These are not compiled into neither output param nor position exports. */
|
||||
uint64_t special_mask = BITFIELD64_BIT(VARYING_SLOT_PRIMITIVE_COUNT) |
|
||||
BITFIELD64_BIT(VARYING_SLOT_PRIMITIVE_INDICES) |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue