summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-11-30 10:37:21 +1000
committerDave Airlie <airlied@redhat.com>2015-11-30 11:08:00 +1000
commitd72299c5315b4c9ff40209a14543e3eae9308081 (patch)
tree43cb1a69d67896609001907074b2643e9c3e9c8a /src/gallium
parent58e0122d86c824c67ac72c8ac4f1c1de4f53eb06 (diff)
r600: move per-type settings into a switch statement
This will allow adding tess stuff much cleaner later. Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r600/r600_shader.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 560197c82b5..d25fc3b85a2 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -1909,13 +1909,23 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
shader->processor_type = ctx.type;
ctx.bc->type = shader->processor_type;
- if (ctx.type == TGSI_PROCESSOR_VERTEX) {
+ switch (ctx.type) {
+ case TGSI_PROCESSOR_VERTEX:
shader->vs_as_gs_a = key.vs.as_gs_a;
shader->vs_as_es = key.vs.as_es;
+ if (shader->vs_as_es)
+ ring_outputs = true;
+ break;
+ case TGSI_PROCESSOR_GEOMETRY:
+ ring_outputs = true;
+ break;
+ case TGSI_PROCESSOR_FRAGMENT:
+ shader->two_side = key.ps.color_two_side;
+ break;
+ default:
+ break;
}
- ring_outputs = shader->vs_as_es || ctx.type == TGSI_PROCESSOR_GEOMETRY;
-
if (shader->vs_as_es) {
ctx.gs_for_vs = &rctx->gs_shader->current->shader;
} else {
@@ -1936,8 +1946,6 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
shader->nr_ps_color_exports = 0;
shader->nr_ps_max_color_exports = 0;
- if (ctx.type == TGSI_PROCESSOR_FRAGMENT)
- shader->two_side = key.ps.color_two_side;
/* register allocations */
/* Values [0,127] correspond to GPR[0..127].