Browse Source

r600g: fix parsing TGSI declarations

It was a lucky coincidence that it worked.
tags/mesa-8.0-rc1
Marek Olšák 14 years ago
parent
commit
024ac93e60
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/gallium/drivers/r600/r600_shader.c

+ 2
- 2
src/gallium/drivers/r600/r600_shader.c View File

ctx->shader->input[i].sid = d->Semantic.Index; ctx->shader->input[i].sid = d->Semantic.Index;
ctx->shader->input[i].interpolate = d->Declaration.Interpolate; ctx->shader->input[i].interpolate = d->Declaration.Interpolate;
ctx->shader->input[i].centroid = d->Declaration.Centroid; ctx->shader->input[i].centroid = d->Declaration.Centroid;
ctx->shader->input[i].gpr = ctx->file_offset[TGSI_FILE_INPUT] + i;
ctx->shader->input[i].gpr = ctx->file_offset[TGSI_FILE_INPUT] + d->Range.First;
if (ctx->type == TGSI_PROCESSOR_FRAGMENT && ctx->bc->chip_class >= EVERGREEN) { if (ctx->type == TGSI_PROCESSOR_FRAGMENT && ctx->bc->chip_class >= EVERGREEN) {
/* turn input into interpolate on EG */ /* turn input into interpolate on EG */
if (ctx->shader->input[i].name != TGSI_SEMANTIC_POSITION && if (ctx->shader->input[i].name != TGSI_SEMANTIC_POSITION &&
i = ctx->shader->noutput++; i = ctx->shader->noutput++;
ctx->shader->output[i].name = d->Semantic.Name; ctx->shader->output[i].name = d->Semantic.Name;
ctx->shader->output[i].sid = d->Semantic.Index; ctx->shader->output[i].sid = d->Semantic.Index;
ctx->shader->output[i].gpr = ctx->file_offset[TGSI_FILE_OUTPUT] + i;
ctx->shader->output[i].gpr = ctx->file_offset[TGSI_FILE_OUTPUT] + d->Range.First;
ctx->shader->output[i].interpolate = d->Declaration.Interpolate; ctx->shader->output[i].interpolate = d->Declaration.Interpolate;
if (ctx->type == TGSI_PROCESSOR_VERTEX) { if (ctx->type == TGSI_PROCESSOR_VERTEX) {
/* these don't count as vertex param exports */ /* these don't count as vertex param exports */

Loading…
Cancel
Save