We need the LINEAR versions for AMD_shader_explicit_vertex_parameter.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3578>
ENUM(SYSTEM_VALUE_DEVICE_INDEX),
ENUM(SYSTEM_VALUE_VIEW_INDEX),
ENUM(SYSTEM_VALUE_VERTEX_CNT),
- ENUM(SYSTEM_VALUE_BARYCENTRIC_PIXEL),
- ENUM(SYSTEM_VALUE_BARYCENTRIC_SAMPLE),
- ENUM(SYSTEM_VALUE_BARYCENTRIC_CENTROID),
- ENUM(SYSTEM_VALUE_BARYCENTRIC_SIZE),
+ ENUM(SYSTEM_VALUE_BARYCENTRIC_PERSP_PIXEL),
+ ENUM(SYSTEM_VALUE_BARYCENTRIC_PERSP_SAMPLE),
+ ENUM(SYSTEM_VALUE_BARYCENTRIC_PERSP_CENTROID),
+ ENUM(SYSTEM_VALUE_BARYCENTRIC_PERSP_SIZE),
ENUM(SYSTEM_VALUE_GS_HEADER_IR3),
ENUM(SYSTEM_VALUE_TCS_HEADER_IR3),
};
* The _SIZE value is "primitive size", used to scale i/j in primitive
* space to pixel space.
*/
- SYSTEM_VALUE_BARYCENTRIC_PIXEL,
- SYSTEM_VALUE_BARYCENTRIC_SAMPLE,
- SYSTEM_VALUE_BARYCENTRIC_CENTROID,
- SYSTEM_VALUE_BARYCENTRIC_SIZE,
+ SYSTEM_VALUE_BARYCENTRIC_PERSP_PIXEL,
+ SYSTEM_VALUE_BARYCENTRIC_PERSP_SAMPLE,
+ SYSTEM_VALUE_BARYCENTRIC_PERSP_CENTROID,
+ SYSTEM_VALUE_BARYCENTRIC_PERSP_SIZE,
/**
* IR3 specific geometry shader and tesselation control shader system
struct ir3_instruction *xy[2];
struct ir3_instruction *ij;
- ij = create_sysval_input(ctx, SYSTEM_VALUE_BARYCENTRIC_CENTROID, 0x3);
+ ij = create_sysval_input(ctx, SYSTEM_VALUE_BARYCENTRIC_PERSP_CENTROID, 0x3);
ir3_split_dest(ctx->block, xy, ij, 0, 2);
ctx->ij_centroid = ir3_create_collect(ctx, xy, 2);
struct ir3_instruction *xy[2];
struct ir3_instruction *ij;
- ij = create_sysval_input(ctx, SYSTEM_VALUE_BARYCENTRIC_SAMPLE, 0x3);
+ ij = create_sysval_input(ctx, SYSTEM_VALUE_BARYCENTRIC_PERSP_SAMPLE, 0x3);
ir3_split_dest(ctx->block, xy, ij, 0, 2);
ctx->ij_sample = ir3_create_collect(ctx, xy, 2);
case nir_intrinsic_load_size_ir3:
if (!ctx->ij_size) {
ctx->ij_size =
- create_sysval_input(ctx, SYSTEM_VALUE_BARYCENTRIC_SIZE, 0x1);
+ create_sysval_input(ctx, SYSTEM_VALUE_BARYCENTRIC_PERSP_SIZE, 0x1);
}
dst[0] = ctx->ij_size;
break;
* because sysvals need to be appended after varyings:
*/
if (vcoord) {
- add_sysval_input_compmask(ctx, SYSTEM_VALUE_BARYCENTRIC_PIXEL,
+ add_sysval_input_compmask(ctx, SYSTEM_VALUE_BARYCENTRIC_PERSP_PIXEL,
0x3, vcoord);
}
int idx = 0;
foreach_input(instr, ir) {
- if (instr->input.sysval != SYSTEM_VALUE_BARYCENTRIC_PIXEL)
+ if (instr->input.sysval != SYSTEM_VALUE_BARYCENTRIC_PERSP_PIXEL)
continue;
assert(idx < ARRAY_SIZE(precolor));
*/
if (so->num_sampler_prefetch &&
(instr->opc == OPC_META_INPUT) &&
- (instr->input.sysval == SYSTEM_VALUE_BARYCENTRIC_PIXEL))
+ (instr->input.sysval == SYSTEM_VALUE_BARYCENTRIC_PERSP_PIXEL))
continue;
instr->flags |= IR3_INSTR_UNUSED;
}
break;
case MESA_SHADER_FRAGMENT:
dump_reg(out, "pos (ij_pixel)",
- ir3_find_sysval_regid(so, SYSTEM_VALUE_BARYCENTRIC_PIXEL));
+ ir3_find_sysval_regid(so, SYSTEM_VALUE_BARYCENTRIC_PERSP_PIXEL));
dump_reg(out, "pos (ij_centroid)",
- ir3_find_sysval_regid(so, SYSTEM_VALUE_BARYCENTRIC_CENTROID));
+ ir3_find_sysval_regid(so, SYSTEM_VALUE_BARYCENTRIC_PERSP_CENTROID));
dump_reg(out, "pos (ij_size)",
- ir3_find_sysval_regid(so, SYSTEM_VALUE_BARYCENTRIC_SIZE));
+ ir3_find_sysval_regid(so, SYSTEM_VALUE_BARYCENTRIC_PERSP_SIZE));
dump_output(out, so, FRAG_RESULT_DEPTH, "posz");
if (so->color0_mrt) {
dump_output(out, so, FRAG_RESULT_COLOR, "color");
face_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_FRONT_FACE);
coord_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_FRAG_COORD);
zwcoord_regid = VALIDREG(coord_regid) ? coord_regid + 2 : regid(63, 0);
- ij_pix_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_BARYCENTRIC_PIXEL);
- ij_samp_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_BARYCENTRIC_SAMPLE);
- ij_cent_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_BARYCENTRIC_CENTROID);
- ij_size_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_BARYCENTRIC_SIZE);
+ ij_pix_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_BARYCENTRIC_PERSP_PIXEL);
+ ij_samp_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_BARYCENTRIC_PERSP_SAMPLE);
+ ij_cent_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_BARYCENTRIC_PERSP_CENTROID);
+ ij_size_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_BARYCENTRIC_PERSP_SIZE);
if (fs->num_sampler_prefetch > 0) {
assert(VALIDREG(ij_pix_regid));
face_regid = ir3_find_sysval_regid(fp, SYSTEM_VALUE_FRONT_FACE);
coord_regid = ir3_find_sysval_regid(fp, SYSTEM_VALUE_FRAG_COORD);
zwcoord_regid = (coord_regid == regid(63,0)) ? regid(63,0) : (coord_regid + 2);
- vcoord_regid = ir3_find_sysval_regid(fp, SYSTEM_VALUE_BARYCENTRIC_PIXEL);
+ vcoord_regid = ir3_find_sysval_regid(fp, SYSTEM_VALUE_BARYCENTRIC_PERSP_PIXEL);
/* adjust regids for alpha output formats. there is no alpha render
* format, so it's just treated like red
face_regid = ir3_find_sysval_regid(s[FS].v, SYSTEM_VALUE_FRONT_FACE);
coord_regid = ir3_find_sysval_regid(s[FS].v, SYSTEM_VALUE_FRAG_COORD);
zwcoord_regid = (coord_regid == regid(63,0)) ? regid(63,0) : (coord_regid + 2);
- vcoord_regid = ir3_find_sysval_regid(s[FS].v, SYSTEM_VALUE_BARYCENTRIC_PIXEL);
+ vcoord_regid = ir3_find_sysval_regid(s[FS].v, SYSTEM_VALUE_BARYCENTRIC_PERSP_PIXEL);
/* we could probably divide this up into things that need to be
* emitted if frag-prog is dirty vs if vert-prog is dirty..
face_regid = ir3_find_sysval_regid(s[FS].v, SYSTEM_VALUE_FRONT_FACE);
coord_regid = ir3_find_sysval_regid(s[FS].v, SYSTEM_VALUE_FRAG_COORD);
zwcoord_regid = (coord_regid == regid(63,0)) ? regid(63,0) : (coord_regid + 2);
- vcoord_regid = ir3_find_sysval_regid(s[FS].v, SYSTEM_VALUE_BARYCENTRIC_PIXEL);
+ vcoord_regid = ir3_find_sysval_regid(s[FS].v, SYSTEM_VALUE_BARYCENTRIC_PERSP_PIXEL);
/* we could probably divide this up into things that need to be
* emitted if frag-prog is dirty vs if vert-prog is dirty..
face_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_FRONT_FACE);
coord_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_FRAG_COORD);
zwcoord_regid = next_regid(coord_regid, 2);
- ij_pix_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_BARYCENTRIC_PIXEL);
- ij_samp_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_BARYCENTRIC_SAMPLE);
- ij_cent_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_BARYCENTRIC_CENTROID);
- ij_size_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_BARYCENTRIC_SIZE);
+ ij_pix_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_BARYCENTRIC_PERSP_PIXEL);
+ ij_samp_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_BARYCENTRIC_PERSP_SAMPLE);
+ ij_cent_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_BARYCENTRIC_PERSP_CENTROID);
+ ij_size_regid = ir3_find_sysval_regid(fs, SYSTEM_VALUE_BARYCENTRIC_PERSP_SIZE);
posz_regid = ir3_find_output_regid(fs, FRAG_RESULT_DEPTH);
smask_regid = ir3_find_output_regid(fs, FRAG_RESULT_SAMPLE_MASK);
case SYSTEM_VALUE_LOCAL_INVOCATION_INDEX:
case SYSTEM_VALUE_GLOBAL_INVOCATION_ID:
case SYSTEM_VALUE_VERTEX_CNT:
- case SYSTEM_VALUE_BARYCENTRIC_PIXEL:
- case SYSTEM_VALUE_BARYCENTRIC_SAMPLE:
- case SYSTEM_VALUE_BARYCENTRIC_CENTROID:
- case SYSTEM_VALUE_BARYCENTRIC_SIZE:
+ case SYSTEM_VALUE_BARYCENTRIC_PERSP_PIXEL:
+ case SYSTEM_VALUE_BARYCENTRIC_PERSP_SAMPLE:
+ case SYSTEM_VALUE_BARYCENTRIC_PERSP_CENTROID:
+ case SYSTEM_VALUE_BARYCENTRIC_PERSP_SIZE:
default:
assert(!"Unexpected SYSTEM_VALUE_ enum");
return TGSI_SEMANTIC_COUNT;