};
/* we need this to get a common lds index for vs/tcs/tes input/outputs */
-int r600_get_lds_unique_index(unsigned semantic_name, unsigned index)
+int r600_get_lds_unique_index(unsigned semantic_name, unsigned index, bool texcoord_semantics)
{
switch (semantic_name) {
case TGSI_SEMANTIC_POSITION:
return 2 + index;
case TGSI_SEMANTIC_GENERIC:
if (index <= 63-4)
- return 4 + index - 9;
+ return 4 + index - (texcoord_semantics ? 0 : 9);
else
/* same explanation as in the default statement,
* the only user hitting this is st/nine.
break;
else if (d->Semantic.Name == TGSI_SEMANTIC_TESSINNER ||
d->Semantic.Name == TGSI_SEMANTIC_TESSOUTER) {
- int param = r600_get_lds_unique_index(d->Semantic.Name, 0);
+ int param = r600_get_lds_unique_index(d->Semantic.Name, 0, false);
int dreg = d->Semantic.Name == TGSI_SEMANTIC_TESSINNER ? 3 : 2;
unsigned temp_reg = r600_get_temp(ctx);
return r;
param = r600_get_lds_unique_index(name[first],
- index[first]);
+ index[first], false);
} else {
param = r600_get_lds_unique_index(name[reg.Register.Index],
- index[reg.Register.Index]);
+ index[reg.Register.Index], false);
}
/* add to base_addr - passed in temp_reg.x */
for (i = 0; i < ctx->shader->noutput; i++) {
struct r600_bytecode_alu alu;
- int param = r600_get_lds_unique_index(ctx->shader->output[i].name, ctx->shader->output[i].sid);
+ int param = r600_get_lds_unique_index(ctx->shader->output[i].name,
+ ctx->shader->output[i].sid, false);
if (param) {
r = single_alu_op2(ctx, ALU_OP2_ADD_INT,
int dreg = ctx->shader->output[output_idx].gpr;
int r;
- param = r600_get_lds_unique_index(name, 0);
+ param = r600_get_lds_unique_index(name, 0, false);
r = get_lds_offset0(ctx, 1, temp_reg, true);
if (r)
return r;
TGSI_INTERPOLATE_LOC_CENTER/SAMPLE/COUNT. Other input values return -1. */
int eg_get_interpolator_index(unsigned interpolate, unsigned location);
-int r600_get_lds_unique_index(unsigned semantic_name, unsigned index);
+int r600_get_lds_unique_index(unsigned semantic_name, unsigned index, bool texcoord_semantics);
int generate_gs_copy_shader(struct r600_context *rctx,
struct r600_pipe_shader *gs,
case PIPE_SHADER_TESS_CTRL:
sel->lds_patch_outputs_written_mask = 0;
sel->lds_outputs_written_mask = 0;
+ bool texxcoord_semantic = ctx->screen->get_param(ctx->screen, PIPE_CAP_TGSI_TEXCOORD);
for (i = 0; i < sel->info.num_outputs; i++) {
unsigned name = sel->info.output_semantic_name[i];
case TGSI_SEMANTIC_TESSOUTER:
case TGSI_SEMANTIC_PATCH:
sel->lds_patch_outputs_written_mask |=
- 1ull << r600_get_lds_unique_index(name, index);
+ 1ull << r600_get_lds_unique_index(name, index, texxcoord_semantic);
break;
default:
sel->lds_outputs_written_mask |=
- 1ull << r600_get_lds_unique_index(name, index);
+ 1ull << r600_get_lds_unique_index(name, index, texxcoord_semantic);
}
}
break;