[Mesa-dev] [PATCH 2/5] gallium: increase the number of available stream output decls
Zack Rusin
zackr at vmware.com
Thu Apr 25 10:44:10 PDT 2013
----- Original Message -----
> Am 24.04.2013 00:58, schrieb Zack Rusin:
> > There can be more stream output decls than shader outputs because
> > individual components from them can be split and distributed
> > among different so buffers.
> >
> > Signed-off-by: Zack Rusin <zackr at vmware.com>
> > ---
> > src/gallium/include/pipe/p_state.h | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/gallium/include/pipe/p_state.h
> > b/src/gallium/include/pipe/p_state.h
> > index c0b2bcd..5830dff 100644
> > --- a/src/gallium/include/pipe/p_state.h
> > +++ b/src/gallium/include/pipe/p_state.h
> > @@ -64,6 +64,7 @@ extern "C" {
> > #define PIPE_MAX_SHADER_RESOURCES 32
> > #define PIPE_MAX_TEXTURE_LEVELS 16
> > #define PIPE_MAX_SO_BUFFERS 4
> > +#define PIPE_MAX_SO_OUTPUT_COMPONENT_COUNT 128
> >
> >
> > struct pipe_reference
> > @@ -198,7 +199,7 @@ struct pipe_stream_output_info
> > unsigned num_components:3; /** 1 to 4 */
> > unsigned output_buffer:3; /**< 0 to PIPE_MAX_SO_BUFFERS */
> > unsigned dst_offset:16; /**< offset into the buffer in dwords */
> > - } output[PIPE_MAX_SHADER_OUTPUTS];
> > + } output[PIPE_MAX_SO_BUFFERS * PIPE_MAX_SO_OUTPUT_COMPONENT_COUNT];
> > };
> >
> >
> >
>
> Are you sure this isn't overkill, that is if you have multiple buffers
> this really increases the total number of attributes you can output? I
> thought this merely allows you to distribute the same number to
> different buffers.
> Also I'm not quite convinced with the 128 number. It looks like d3d10
> has a limit of 64 components, and it seems like OpenGL would be happy
> with that as well.
Yes, I'm sure.
"The number of entries in the stream output declaration ( ranges from 0 to D3D11_SO_STREAM_COUNT * D3D11_SO_OUTPUT_COMPONENT_COUNT )"
http://msdn.microsoft.com/en-US/library/windows/apps/ff476510
D3D10 has a lower limit (64) but I didn't feel it was in our best interest to add something that we'll need to change in a few months again.
z
More information about the mesa-dev
mailing list