diff options
author | José Fonseca <[email protected]> | 2010-01-03 00:47:30 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-01-03 00:50:13 +0000 |
commit | cdb445f3a9285e2d8f042a07021ade78b94e0156 (patch) | |
tree | de16097633746d5ce2d273ca9751b5cbf804153f /src/gallium/drivers/svga/svga_context.c | |
parent | 904917dcc67e15830a4fe106a243eb57dde985ea (diff) |
svga: Use a shader id as low as possible.
Diffstat (limited to 'src/gallium/drivers/svga/svga_context.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_context.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c index 3e7663d6e1a..af99c9de37c 100644 --- a/src/gallium/drivers/svga/svga_context.c +++ b/src/gallium/drivers/svga/svga_context.c @@ -29,6 +29,7 @@ #include "pipe/p_inlines.h" #include "pipe/p_screen.h" #include "util/u_memory.h" +#include "util/u_bitmask.h" #include "util/u_upload_mgr.h" #include "svga_context.h" @@ -61,6 +62,9 @@ static void svga_destroy( struct pipe_context *pipe ) u_upload_destroy( svga->upload_vb ); u_upload_destroy( svga->upload_ib ); + util_bitmask_destroy( svga->vs_bm ); + util_bitmask_destroy( svga->fs_bm ); + for(shader = 0; shader < PIPE_SHADER_TYPES; ++shader) pipe_buffer_reference( &svga->curr.cb[shader], NULL ); @@ -167,6 +171,14 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen ) if (!svga_init_swtnl(svga)) goto no_swtnl; + svga->fs_bm = util_bitmask_create(); + if (svga->fs_bm == NULL) + goto no_fs_bm; + + svga->vs_bm = util_bitmask_create(); + if (svga->vs_bm == NULL) + goto no_vs_bm; + svga->upload_ib = u_upload_create( svga->pipe.screen, 32 * 1024, 16, @@ -216,6 +228,10 @@ no_hwtnl: no_upload_vb: u_upload_destroy( svga->upload_ib ); no_upload_ib: + util_bitmask_destroy( svga->vs_bm ); +no_vs_bm: + util_bitmask_destroy( svga->fs_bm ); +no_fs_bm: svga_destroy_swtnl(svga); no_swtnl: svga->swc->destroy(svga->swc); |