summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_shader.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2015-11-30 10:45:19 +1000
committerDave Airlie <[email protected]>2015-12-07 09:58:59 +1000
commitb1da110b71b20509e4689475e82e88750f69b8fc (patch)
tree078bd6fd8dd3b5ce39ba61d270d957c2892142de /src/gallium/drivers/r600/r600_shader.c
parenta131ac73e6e653962723669dd5403fff061aa90f (diff)
r600: add shader key entries for tcs and tes.
with tessellation vs can now run on ls, and tes can run on vs or es, tcs runs on hs. Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_shader.c')
-rw-r--r--src/gallium/drivers/r600/r600_shader.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 4142c3e30e5..84bacb20368 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -1933,12 +1933,21 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
case TGSI_PROCESSOR_VERTEX:
shader->vs_as_gs_a = key.vs.as_gs_a;
shader->vs_as_es = key.vs.as_es;
+ shader->vs_as_ls = key.vs.as_ls;
if (shader->vs_as_es)
ring_outputs = true;
break;
case TGSI_PROCESSOR_GEOMETRY:
ring_outputs = true;
break;
+ case TGSI_PROCESSOR_TESS_CTRL:
+ shader->tcs_prim_mode = key.tcs.prim_mode;
+ break;
+ case TGSI_PROCESSOR_TESS_EVAL:
+ shader->tes_as_es = key.tes.as_es;
+ if (shader->tes_as_es)
+ ring_outputs = true;
+ break;
case TGSI_PROCESSOR_FRAGMENT:
shader->two_side = key.ps.color_two_side;
break;
@@ -1946,7 +1955,7 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
break;
}
- if (shader->vs_as_es) {
+ if (shader->vs_as_es || shader->tes_as_es) {
ctx.gs_for_vs = &rctx->gs_shader->current->shader;
} else {
ctx.gs_for_vs = NULL;
@@ -2357,7 +2366,7 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
convert_edgeflag_to_int(&ctx);
if (ring_outputs) {
- if (shader->vs_as_es) {
+ if (shader->vs_as_es || shader->tes_as_es) {
ctx.gs_export_gpr_tregs[0] = r600_get_temp(&ctx);
ctx.gs_export_gpr_tregs[1] = -1;
ctx.gs_export_gpr_tregs[2] = -1;