}
spi_interp = S_0286D4_FLAT_SHADE_ENA(1);
- if (state->sprite_coord_enable) {
- spi_interp |= S_0286D4_PNT_SPRITE_ENA(1) |
- S_0286D4_PNT_SPRITE_OVRD_X(2) |
- S_0286D4_PNT_SPRITE_OVRD_Y(3) |
- S_0286D4_PNT_SPRITE_OVRD_Z(0) |
- S_0286D4_PNT_SPRITE_OVRD_W(1);
- if (state->sprite_coord_mode != PIPE_SPRITE_COORD_UPPER_LEFT) {
- spi_interp |= S_0286D4_PNT_SPRITE_TOP_1(1);
- }
+ spi_interp |= S_0286D4_PNT_SPRITE_ENA(1) |
+ S_0286D4_PNT_SPRITE_OVRD_X(2) |
+ S_0286D4_PNT_SPRITE_OVRD_Y(3) |
+ S_0286D4_PNT_SPRITE_OVRD_Z(0) |
+ S_0286D4_PNT_SPRITE_OVRD_W(1);
+ if (state->sprite_coord_mode != PIPE_SPRITE_COORD_UPPER_LEFT) {
+ spi_interp |= S_0286D4_PNT_SPRITE_TOP_1(1);
}
r600_store_context_reg_seq(&rs->buffer, R_028A00_PA_SU_POINT_SIZE, 3);
tmp |= S_028644_FLAT_SHADE(1);
}
- if (rshader->input[i].name == TGSI_SEMANTIC_GENERIC &&
- (sprite_coord_enable & (1 << rshader->input[i].sid))) {
+ if (rshader->input[i].name == TGSI_SEMANTIC_PCOORD ||
+ (rshader->input[i].name == TGSI_SEMANTIC_TEXCOORD &&
+ (sprite_coord_enable & (1 << rshader->input[i].sid)))) {
tmp |= S_028644_PT_SPRITE_TEX(1);
}
return rscreen->b.chip_class > R700;
case PIPE_CAP_TGSI_TEXCOORD:
- return is_nir_enabled(&rscreen->b);
+ return 1;
case PIPE_CAP_FAKE_SW_MSAA:
return 0;
else {
if (name == TGSI_SEMANTIC_GENERIC) {
/* For generic params simply use sid from tgsi */
+ index = 9 + io->sid;
+ } else if (name == TGSI_SEMANTIC_TEXCOORD) {
index = io->sid;
} else {
/* For non-generic params - pack name and sid into 8 bits */
};
/* 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, bool texcoord_semantics)
+int r600_get_lds_unique_index(unsigned semantic_name, unsigned index)
{
switch (semantic_name) {
case TGSI_SEMANTIC_POSITION:
case TGSI_SEMANTIC_CLIPDIST:
assert(index <= 1);
return 2 + index;
+ case TGSI_SEMANTIC_TEXCOORD:
+ return 4 + index;
case TGSI_SEMANTIC_GENERIC:
if (index <= 63-4)
- return 4 + index - (texcoord_semantics ? 0 : 9);
+ return 4 + index;
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, false);
+ int param = r600_get_lds_unique_index(d->Semantic.Name, 0);
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], false);
+ index[first]);
} else {
param = r600_get_lds_unique_index(name[reg.Register.Index],
- index[reg.Register.Index], false);
+ index[reg.Register.Index]);
}
/* 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, false);
+ ctx->shader->output[i].sid);
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, false);
+ param = r600_get_lds_unique_index(name, 0);
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, bool texcoord_semantics);
+int r600_get_lds_unique_index(unsigned semantic_name, unsigned index);
int generate_gs_copy_shader(struct r600_context *rctx,
struct r600_pipe_shader *gs,
}
spi_interp = S_0286D4_FLAT_SHADE_ENA(1);
- if (state->sprite_coord_enable) {
- spi_interp |= S_0286D4_PNT_SPRITE_ENA(1) |
- S_0286D4_PNT_SPRITE_OVRD_X(2) |
- S_0286D4_PNT_SPRITE_OVRD_Y(3) |
- S_0286D4_PNT_SPRITE_OVRD_Z(0) |
- S_0286D4_PNT_SPRITE_OVRD_W(1);
- if (state->sprite_coord_mode != PIPE_SPRITE_COORD_UPPER_LEFT) {
- spi_interp |= S_0286D4_PNT_SPRITE_TOP_1(1);
- }
+ spi_interp |= S_0286D4_PNT_SPRITE_ENA(1) |
+ S_0286D4_PNT_SPRITE_OVRD_X(2) |
+ S_0286D4_PNT_SPRITE_OVRD_Y(3) |
+ S_0286D4_PNT_SPRITE_OVRD_Z(0) |
+ S_0286D4_PNT_SPRITE_OVRD_W(1);
+ if (state->sprite_coord_mode != PIPE_SPRITE_COORD_UPPER_LEFT) {
+ spi_interp |= S_0286D4_PNT_SPRITE_TOP_1(1);
}
r600_store_context_reg_seq(&rs->buffer, R_028A00_PA_SU_POINT_SIZE, 3);
rctx->rasterizer && rctx->rasterizer->flatshade))
tmp |= S_028644_FLAT_SHADE(1);
- if (rshader->input[i].name == TGSI_SEMANTIC_GENERIC &&
- sprite_coord_enable & (1 << rshader->input[i].sid)) {
+ if (rshader->input[i].name == TGSI_SEMANTIC_PCOORD ||
+ (rshader->input[i].name == TGSI_SEMANTIC_TEXCOORD &&
+ sprite_coord_enable & (1 << rshader->input[i].sid))) {
tmp |= S_028644_PT_SPRITE_TEX(1);
}
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, texxcoord_semantic);
+ 1ull << r600_get_lds_unique_index(name, index);
break;
default:
sel->lds_outputs_written_mask |=
- 1ull << r600_get_lds_unique_index(name, index, texxcoord_semantic);
+ 1ull << r600_get_lds_unique_index(name, index);
}
}
break;