diff options
Diffstat (limited to 'src/gallium/drivers/r600/r600_shader.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_shader.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 3f089b4f7d9..9f10c20c4c3 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -706,6 +706,8 @@ static int tgsi_declaration(struct r600_shader_ctx *ctx) break; } else if (d->Semantic.Name == TGSI_SEMANTIC_VERTEXID) break; + else if (d->Semantic.Name == TGSI_SEMANTIC_INVOCATIONID) + break; default: R600_ERR("unsupported file %d declaration\n", d->Declaration.File); return -EINVAL; @@ -811,6 +813,12 @@ static void tgsi_src(struct r600_shader_ctx *ctx, r600_src->swizzle[2] = 0; r600_src->swizzle[3] = 0; r600_src->sel = 0; + } else if (ctx->info.system_value_semantic_name[tgsi_src->Register.Index] == TGSI_SEMANTIC_INVOCATIONID) { + r600_src->swizzle[0] = 3; + r600_src->swizzle[1] = 3; + r600_src->swizzle[2] = 3; + r600_src->swizzle[3] = 3; + r600_src->sel = 1; } } else { if (tgsi_src->Register.Indirect) @@ -1753,6 +1761,9 @@ static int r600_shader_from_tgsi(struct r600_context *rctx, case TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES: shader->gs_max_out_vertices = property->u[0].Data; break; + case TGSI_PROPERTY_GS_INVOCATIONS: + shader->gs_num_invocations = property->u[0].Data; + break; } break; default: |