r600: update correct hw shaders depending on configuration.
authorDave Airlie <airlied@redhat.com>
Mon, 30 Nov 2015 00:48:14 +0000 (10:48 +1000)
committerDave Airlie <airlied@redhat.com>
Sun, 6 Dec 2015 23:59:00 +0000 (09:59 +1000)
This updates the tess hw shaders from the sw ones routing
things correctly.

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_shader.c

index 84bacb20368ad5df1a9c3980f3eef6eb651c0d34..ef024e626c96b811eb2f669f55b958bc1a7c3163 100644 (file)
@@ -209,6 +209,15 @@ int r600_pipe_shader_create(struct pipe_context *ctx,
 
        /* Build state. */
        switch (shader->shader.processor_type) {
+       case TGSI_PROCESSOR_TESS_CTRL:
+               evergreen_update_hs_state(ctx, shader);
+               break;
+       case TGSI_PROCESSOR_TESS_EVAL:
+               if (key.tes.as_es)
+                       evergreen_update_es_state(ctx, shader);
+               else
+                       evergreen_update_vs_state(ctx, shader);
+               break;
        case TGSI_PROCESSOR_GEOMETRY:
                if (rctx->b.chip_class >= EVERGREEN) {
                        evergreen_update_gs_state(ctx, shader);
@@ -221,7 +230,9 @@ int r600_pipe_shader_create(struct pipe_context *ctx,
        case TGSI_PROCESSOR_VERTEX:
                export_shader = key.vs.as_es;
                if (rctx->b.chip_class >= EVERGREEN) {
-                       if (export_shader)
+                       if (key.vs.as_ls)
+                               evergreen_update_ls_state(ctx, shader);
+                       else if (key.vs.as_es)
                                evergreen_update_es_state(ctx, shader);
                        else
                                evergreen_update_vs_state(ctx, shader);