diff options
author | Brian <brian.paul@tungstengraphics.com> | 2008-12-02 22:40:08 -0700 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2008-12-04 09:58:54 -0700 |
commit | b9604fe7699355584307ee3f38e048914fdfd76b (patch) | |
tree | 9abf9b4273cf2915f3b90471ea18db2383deb438 /src/gallium/drivers/softpipe/sp_context.c | |
parent | f2bccfd3c806a879abf0c40858806ec3825d0628 (diff) |
softpipe: plug in softpipe's texture samplers into draw module.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_context.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_context.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c index cd1e6663d8..99b5274857 100644 --- a/src/gallium/drivers/softpipe/sp_context.c +++ b/src/gallium/drivers/softpipe/sp_context.c @@ -221,6 +221,14 @@ softpipe_create( struct pipe_screen *screen, softpipe->quad[i].output = sp_quad_output_stage(softpipe); } + for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { + softpipe->tgsi.samplers[i].base.get_samples = sp_get_samples; + softpipe->tgsi.samplers[i].unit = i; + softpipe->tgsi.samplers[i].sp = softpipe; + softpipe->tgsi.samplers[i].cache = softpipe->tex_cache[i]; + softpipe->tgsi.samplers_list[i] = &softpipe->tgsi.samplers[i]; + } + /* * Create drawing context and plug our rendering stage into it. */ @@ -228,6 +236,9 @@ softpipe_create( struct pipe_screen *screen, if (!softpipe->draw) goto fail; + draw_texture_samplers(softpipe->draw, + PIPE_MAX_SAMPLERS, softpipe->tgsi.samplers_list); + softpipe->setup = sp_draw_render_stage(softpipe); if (!softpipe->setup) goto fail; |