[Mesa-dev] RFC: Increase gallium PIPE_MAX_SHADER_INPUTS/OUTPUTS
Keith Whitwell
keithw at vmware.com
Thu Jul 8 08:40:56 PDT 2010
On Thu, 2010-07-08 at 08:36 -0700, Brian Paul wrote:
> PIPE_MAX_SHADER_INPUTS/OUTPUTS are currently set to 16 in p_state.h
>
> That's actually not enough to accomodate OpenGL's needs. For example,
> a Mesa vertex shader has these inputs:
>
> typedef enum
> {
> VERT_ATTRIB_POS = 0,
> VERT_ATTRIB_WEIGHT = 1,
> VERT_ATTRIB_NORMAL = 2,
> VERT_ATTRIB_COLOR0 = 3,
> VERT_ATTRIB_COLOR1 = 4,
> VERT_ATTRIB_FOG = 5,
> VERT_ATTRIB_COLOR_INDEX = 6,
> VERT_ATTRIB_POINT_SIZE = 6, /*alias*/
> VERT_ATTRIB_EDGEFLAG = 7,
> VERT_ATTRIB_TEX0 = 8,
> VERT_ATTRIB_TEX1 = 9,
> VERT_ATTRIB_TEX2 = 10,
> VERT_ATTRIB_TEX3 = 11,
> VERT_ATTRIB_TEX4 = 12,
> VERT_ATTRIB_TEX5 = 13,
> VERT_ATTRIB_TEX6 = 14,
> VERT_ATTRIB_TEX7 = 15,
> VERT_ATTRIB_GENERIC0 = 16,
> VERT_ATTRIB_GENERIC1 = 17,
> VERT_ATTRIB_GENERIC2 = 18,
> VERT_ATTRIB_GENERIC3 = 19,
> VERT_ATTRIB_GENERIC4 = 20,
> VERT_ATTRIB_GENERIC5 = 21,
> VERT_ATTRIB_GENERIC6 = 22,
> VERT_ATTRIB_GENERIC7 = 23,
> VERT_ATTRIB_GENERIC8 = 24,
> VERT_ATTRIB_GENERIC9 = 25,
> VERT_ATTRIB_GENERIC10 = 26,
> VERT_ATTRIB_GENERIC11 = 27,
> VERT_ATTRIB_GENERIC12 = 28,
> VERT_ATTRIB_GENERIC13 = 29,
> VERT_ATTRIB_GENERIC14 = 30,
> VERT_ATTRIB_GENERIC15 = 31,
> VERT_ATTRIB_MAX = 32
> } gl_vert_attrib;
>
> With PIPE_MAX_SHADER_INPUTS=16 there's potentially little or no space
> left for any user-defined inputs if most of the conventional
> attributes are used.
>
> I propose bumping these limits to 32 each. Any concerns?
Sounds good. There's also the confusingly almost related value
"PIPE_MAX_ATTRIBS" which is already 32.
Keith
More information about the mesa-dev
mailing list