radv: fix emitting the view index on GFX9

For merged shaders, VS as HS for example.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
(cherry picked from commit 85865dbe0d)
This commit is contained in:
Samuel Pitoiset 2018-07-05 18:56:55 +02:00 committed by Dylan Baker
parent 7333112ed0
commit 3ddbe5d4d7

View file

@ -3003,8 +3003,9 @@ static void radv_emit_view_index(struct radv_cmd_buffer *cmd_buffer, unsigned in
{
struct radv_pipeline *pipeline = cmd_buffer->state.pipeline;
for (unsigned stage = 0; stage < MESA_SHADER_STAGES; ++stage) {
if (!pipeline->shaders[stage])
if (!radv_get_shader(pipeline, stage))
continue;
struct radv_userdata_info *loc = radv_lookup_user_sgpr(pipeline, stage, AC_UD_VIEW_INDEX);
if (loc->sgpr_idx == -1)
continue;