/* FINISHME: The sf doesn't map VS->FS inputs for us very well. */
for (unsigned int i = 0; i < VERT_RESULT_MAX; i++) {
if (c->key.vp_outputs_written & BITFIELD64_BIT(i)) {
- int fp_index = vert_result_to_frag_attrib(i);
+ int fp_index = _mesa_vert_result_to_frag_attrib(i);
if (fp_index >= 0)
urb_setup[fp_index] = urb_next++;
key.proj_attrib_mask |= 1 << i;
- int vp_index = vert_result_to_frag_attrib(i);
+ int vp_index = _mesa_vert_result_to_frag_attrib(i);
if (vp_index >= 0)
key.vp_outputs_written |= BITFIELD64_BIT(vp_index);
for (vertRes = VERT_RESULT_TEX0; vertRes < VERT_RESULT_MAX; vertRes++) {
/* map vertex program output index to fragment program input index */
- GLint fragAttrib = vert_result_to_frag_attrib(vertRes);
+ GLint fragAttrib = _mesa_vert_result_to_frag_attrib(vertRes);
if (fragAttrib < 0)
continue;
assert(fragAttrib >= FRAG_ATTRIB_TEX0);
} else {
for (j = 0; j < VERT_RESULT_MAX; j++) {
if (c->key.vp_outputs_written & BITFIELD64_BIT(j)) {
- int fp_index = vert_result_to_frag_attrib(j);
+ int fp_index = _mesa_vert_result_to_frag_attrib(j);
nr_interp_regs++;
if (fp_index >= 0)
int fs_attr, bool two_side_color)
{
int attr_override, slot;
- int vs_attr = frag_attrib_to_vert_result(fs_attr);
+ int vs_attr = _mesa_frag_attrib_to_vert_result(fs_attr);
if (vs_attr < 0 || vs_attr == VERT_RESULT_HPOS) {
/* These attributes will be overwritten by the fragment shader's
* interpolation code (see emit_interp() in brw_wm_fp.c), so just let
/**
* Indexes for vertex program result attributes. Note that
- * vert_result_to_frag_attrib() and frag_attrib_to_vert_result() make
+ * _mesa_vert_result_to_frag_attrib() and _mesa_frag_attrib_to_vert_result() make
* assumptions about the layout of this enum.
*/
typedef enum
/**
* Indexes for fragment program input attributes. Note that
- * vert_result_to_frag_attrib() and frag_attrib_to_vert_result() make
+ * _mesa_vert_result_to_frag_attrib() and frag_attrib_to_vert_result() make
* assumptions about the layout of this enum.
*/
typedef enum
* (VERT_RESULT_PSIZ, VERT_RESULT_BFC0, VERT_RESULT_BFC1, and
* VERT_RESULT_EDGE) are converted to a value of -1.
*/
-static INLINE int vert_result_to_frag_attrib(gl_vert_result vert_result)
+static INLINE int _mesa_vert_result_to_frag_attrib(gl_vert_result vert_result)
{
if (vert_result >= VERT_RESULT_VAR0)
return vert_result - VERT_RESULT_VAR0 + FRAG_ATTRIB_VAR0;
* gl_frag_attrib values which have no corresponding gl_vert_result
* (FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC) are converted to a value of -1.
*/
-static INLINE int frag_attrib_to_vert_result(gl_frag_attrib frag_attrib)
+static INLINE int _mesa_frag_attrib_to_vert_result(gl_frag_attrib frag_attrib)
{
if (frag_attrib <= FRAG_ATTRIB_TEX7)
return frag_attrib;