Module: Mesa
Branch: staging/18.1
Commit: 3ddbe5d4d7f9ac5ef77fb445242d062c44b9f15d
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=3ddbe5d4d7f9ac5ef77fb445242d062c44b9f15d

Author: Samuel Pitoiset <[email protected]>
Date:   Thu Jul  5 18:56:55 2018 +0200

radv: fix emitting the view index on GFX9

For merged shaders, VS as HS for example.

Cc: <[email protected]>
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
(cherry picked from commit 85865dbe0d96f18ac768b4063da94f52ee67a7fd)

---

 src/amd/vulkan/radv_cmd_buffer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 2426bd1ff3..f7f0cb0c8d 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -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;

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to