summaryrefslogtreecommitdiffstats
path: root/src/amd/common/ac_shader_info.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2017-08-16 09:09:56 +0200
committerBas Nieuwenhuizen <[email protected]>2017-08-24 19:20:47 +0200
commit180c1b924e1ed3a2918fad9c5cbb653524de8233 (patch)
tree78cd87baa56ed17fcaa11ceb96aed74c301aed18 /src/amd/common/ac_shader_info.c
parent2e86f6b2597df85bc106780763ead0b20b3bc8e4 (diff)
ac/nir: Add shader support for multiviews.
It uses an user SGPR to pass the view index to the shaders, except for the fragment shader where we use layer=view (which comes in handy when we want to do the NV ext that allows us to execute pre-FS stages once instead of per view). Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/common/ac_shader_info.c')
-rw-r--r--src/amd/common/ac_shader_info.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/amd/common/ac_shader_info.c b/src/amd/common/ac_shader_info.c
index ca59965e2db..979b120b731 100644
--- a/src/amd/common/ac_shader_info.c
+++ b/src/amd/common/ac_shader_info.c
@@ -51,6 +51,9 @@ gather_intrinsic_info(nir_intrinsic_instr *instr, struct ac_shader_info *info)
case nir_intrinsic_load_sample_pos:
info->ps.force_persample = true;
break;
+ case nir_intrinsic_load_view_index:
+ info->needs_multiview_view_index = true;
+ break;
case nir_intrinsic_vulkan_resource_index:
info->desc_set_used_mask |= (1 << nir_intrinsic_desc_set(instr));
break;