ENUM(SYSTEM_VALUE_DEVICE_INDEX),
ENUM(SYSTEM_VALUE_VIEW_INDEX),
ENUM(SYSTEM_VALUE_VERTEX_CNT),
- ENUM(SYSTEM_VALUE_VARYING_COORD),
+ ENUM(SYSTEM_VALUE_BARYCENTRIC_PIXEL),
+ ENUM(SYSTEM_VALUE_BARYCENTRIC_SAMPLE),
+ ENUM(SYSTEM_VALUE_BARYCENTRIC_CENTROID),
+ ENUM(SYSTEM_VALUE_BARYCENTRIC_SIZE),
};
STATIC_ASSERT(ARRAY_SIZE(names) == SYSTEM_VALUE_MAX);
return NAME(sysval);
SYSTEM_VALUE_VERTEX_CNT,
/**
- * Driver internal varying-coord, used for varying-fetch instructions.
+ * Driver internal varying-coords, used for varying-fetch instructions.
* Not externally visible.
+ *
+ * The _SIZE value is "primitive size", used to scale i/j in primitive
+ * space to pixel space.
*/
- SYSTEM_VALUE_VARYING_COORD,
+ SYSTEM_VALUE_BARYCENTRIC_PIXEL,
+ SYSTEM_VALUE_BARYCENTRIC_SAMPLE,
+ SYSTEM_VALUE_BARYCENTRIC_CENTROID,
+ SYSTEM_VALUE_BARYCENTRIC_SIZE,
SYSTEM_VALUE_MAX /**< Number of values */
} gl_system_value;
* because sysvals need to be appended after varyings:
*/
if (vcoord) {
- add_sysval_input_compmask(ctx, SYSTEM_VALUE_VARYING_COORD,
+ add_sysval_input_compmask(ctx, SYSTEM_VALUE_BARYCENTRIC_PIXEL,
0x3, vcoord);
}
break;
case MESA_SHADER_FRAGMENT:
dump_reg(out, "pos (bary)",
- ir3_find_sysval_regid(so, SYSTEM_VALUE_VARYING_COORD));
+ ir3_find_sysval_regid(so, SYSTEM_VALUE_BARYCENTRIC_PIXEL));
dump_output(out, so, FRAG_RESULT_DEPTH, "posz");
if (so->color0_mrt) {
dump_output(out, so, FRAG_RESULT_COLOR, "color");
? (fragcoord_xy_regid + 2)
: fragcoord_xy_regid;
const uint32_t varyingcoord_regid =
- ir3_find_sysval_regid(fs, SYSTEM_VALUE_VARYING_COORD);
+ ir3_find_sysval_regid(fs, SYSTEM_VALUE_BARYCENTRIC_PIXEL);
tu_cs_emit_pkt4(cs, REG_A6XX_HLSQ_CONTROL_1_REG, 5);
tu_cs_emit(cs, 0x7);
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_VARYING_COORD);
+ vcoord_regid = ir3_find_sysval_regid(fp, SYSTEM_VALUE_BARYCENTRIC_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_VARYING_COORD);
+ vcoord_regid = ir3_find_sysval_regid(s[FS].v, SYSTEM_VALUE_BARYCENTRIC_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_VARYING_COORD);
+ vcoord_regid = ir3_find_sysval_regid(s[FS].v, SYSTEM_VALUE_BARYCENTRIC_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 = next_regid(coord_regid, 2);
- vcoord_regid = ir3_find_sysval_regid(s[FS].v, SYSTEM_VALUE_VARYING_COORD);
+ vcoord_regid = ir3_find_sysval_regid(s[FS].v, SYSTEM_VALUE_BARYCENTRIC_PIXEL);
posz_regid = ir3_find_output_regid(s[FS].v, FRAG_RESULT_DEPTH);
/* we could probably divide this up into things that need to be
case SYSTEM_VALUE_LOCAL_INVOCATION_INDEX:
case SYSTEM_VALUE_GLOBAL_INVOCATION_ID:
case SYSTEM_VALUE_VERTEX_CNT:
- case SYSTEM_VALUE_VARYING_COORD:
+ case SYSTEM_VALUE_BARYCENTRIC_PIXEL:
+ case SYSTEM_VALUE_BARYCENTRIC_SAMPLE:
+ case SYSTEM_VALUE_BARYCENTRIC_CENTROID:
+ case SYSTEM_VALUE_BARYCENTRIC_SIZE:
default:
assert(!"Unexpected SYSTEM_VALUE_ enum");
return TGSI_SEMANTIC_COUNT;