diff options
| author | Karl Schultz <karl.w.schultz@gmail.com> | 2010-02-10 15:22:07 -0700 |
|---|---|---|
| committer | Karl Schultz <karl.w.schultz@gmail.com> | 2010-02-10 15:22:07 -0700 |
| commit | 2717d9066d46bff9b015f3d17dc05ce1335d0883 (patch) | |
| tree | 36970c5c3c8c0b15d2ae5ed28e348a7b927a63cd /src/gallium/drivers | |
| parent | 450524a87c3669e236d2801bd19aadfab91542c0 (diff) | |
| parent | 412ffb7a3ab8c0174aa921a4a10af3eaa03648da (diff) | |
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/mesa
Diffstat (limited to 'src/gallium/drivers')
| -rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup.c | 19 | ||||
| -rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 2 |
2 files changed, 16 insertions, 5 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index 6601fa61b9..538492beba 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -45,6 +45,8 @@ #include "lp_fence.h" #include "lp_rast.h" #include "lp_setup_context.h" +#include "lp_screen.h" +#include "lp_winsys.h" #include "draw/draw_context.h" #include "draw/draw_vbuf.h" @@ -472,11 +474,20 @@ lp_setup_set_sampler_textures( struct setup_context *setup, jit_tex->width = tex->width0; jit_tex->height = tex->height0; jit_tex->stride = lp_tex->stride[0]; - if(!lp_tex->dt) + if(!lp_tex->dt) { jit_tex->data = lp_tex->data; - else - /* FIXME: map the rendertarget */ - assert(0); + } + else { + /* + * XXX: Where should this be unmapped? + */ + + struct llvmpipe_screen *screen = llvmpipe_screen(tex->screen); + struct llvmpipe_winsys *winsys = screen->winsys; + jit_tex->data = winsys->displaytarget_map(winsys, lp_tex->dt, + PIPE_BUFFER_USAGE_CPU_READ); + assert(jit_tex->data); + } /* the scene references this texture */ { diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 5fe9285a4b..99ecae9f5f 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -651,7 +651,7 @@ static void* r300_create_rs_state(struct pipe_context* pipe, rs->point_minmax = ((int)(0.0 * 6.0) << R300_GA_POINT_MINMAX_MIN_SHIFT) | ((int)(4096.0 * 6.0) << R300_GA_POINT_MINMAX_MAX_SHIFT); - } else if (r300screen->caps->is_r500) { + } else if (r300screen->caps->is_r400) { rs->point_minmax = ((int)(0.0 * 6.0) << R300_GA_POINT_MINMAX_MIN_SHIFT) | ((int)(4021.0 * 6.0) << R300_GA_POINT_MINMAX_MAX_SHIFT); |
