radeonsi: update si_get_vs_info and si_get_vs_state for tessellation
authorMarek Olšák <marek.olsak@amd.com>
Sun, 22 Feb 2015 15:07:04 +0000 (16:07 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 22 Jul 2015 22:59:32 +0000 (00:59 +0200)
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_shader.h

index 2cba96f958758efc9539d9517233fe9e2fc2dc92..374021817cd0076ca2772bf8742df1797d9878ae 100644 (file)
@@ -268,14 +268,20 @@ struct si_shader {
 
 static inline struct tgsi_shader_info *si_get_vs_info(struct si_context *sctx)
 {
-       return sctx->gs_shader ? &sctx->gs_shader->info
-                               : &sctx->vs_shader->info;
+       if (sctx->gs_shader)
+               return &sctx->gs_shader->info;
+       else if (sctx->tes_shader)
+               return &sctx->tes_shader->info;
+       else
+               return &sctx->vs_shader->info;
 }
 
 static inline struct si_shader* si_get_vs_state(struct si_context *sctx)
 {
        if (sctx->gs_shader)
                return sctx->gs_shader->current->gs_copy_shader;
+       else if (sctx->tes_shader)
+               return sctx->tes_shader->current;
        else
                return sctx->vs_shader->current;
 }