From 9851644435f991a1a1bbb145333a97601627b37d Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Mon, 25 Jan 2010 12:36:50 +0100 Subject: gallium: Enable multiple constant buffers for vertex and geometry shaders. --- src/gallium/auxiliary/draw/draw_private.h | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'src/gallium/auxiliary/draw/draw_private.h') diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h index ef49e575366..ecb17cbbe2f 100644 --- a/src/gallium/auxiliary/draw/draw_private.h +++ b/src/gallium/auxiliary/draw/draw_private.h @@ -153,8 +153,8 @@ struct draw_context const void *vbuffer[PIPE_MAX_ATTRIBS]; /** constant buffer (for vertex/geometry shader) */ - const void *vs_constants; - const void *gs_constants; + const void *vs_constants[PIPE_MAX_CONSTANT]; + const void *gs_constants[PIPE_MAX_CONSTANT]; } user; boolean test_fse; /* enable FSE even though its not correct (eg for softpipe) */ @@ -202,10 +202,10 @@ struct draw_context struct aos_machine *aos_machine; - const float (*aligned_constants)[4]; + const void *aligned_constants[PIPE_MAX_CONSTANT]; - const float (*aligned_constant_storage)[4]; - unsigned const_storage_size; + const void *aligned_constant_storage[PIPE_MAX_CONSTANT]; + unsigned const_storage_size[PIPE_MAX_CONSTANT]; struct translate *fetch; @@ -256,9 +256,11 @@ void draw_vs_destroy( struct draw_context *draw ); void draw_vs_set_viewport( struct draw_context *, const struct pipe_viewport_state * ); -void draw_vs_set_constants( struct draw_context *, - const float (*constants)[4], - unsigned size ); +void +draw_vs_set_constants(struct draw_context *, + unsigned slot, + const void *constants, + unsigned size); @@ -266,9 +268,13 @@ void draw_vs_set_constants( struct draw_context *, * Geometry shading code: */ boolean draw_gs_init( struct draw_context *draw ); -void draw_gs_set_constants( struct draw_context *, - const float (*constants)[4], - unsigned size ); + +void +draw_gs_set_constants(struct draw_context *, + unsigned slot, + const void *constants, + unsigned size); + void draw_gs_destroy( struct draw_context *draw ); /******************************************************************************* -- cgit v1.2.3