diff options
author | Dave Airlie <[email protected]> | 2009-03-20 10:52:17 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2009-03-20 10:52:17 +1000 |
commit | 407e8ae5b167b0193e1e5b1266a5d61ed836dfb5 (patch) | |
tree | 2d9d05a5c3122f41a13aa8bd9ae921c1176e6b0d /src/gallium/auxiliary/draw/draw_pipe_pstipple.c | |
parent | bdaa0341caffc353fd26bbd91865c2d86eed11c1 (diff) | |
parent | 114bb54324f22cb53bcd14607234d0acd74d37bd (diff) |
Merge remote branch 'main/master' into radeon-rewrite
Conflicts:
src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/r300/r300_state.c
src/mesa/drivers/dri/r300/r300_swtcl.c
src/mesa/drivers/dri/r300/radeon_ioctl.c
src/mesa/drivers/dri/radeon/radeon_screen.c
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe_pstipple.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pipe_pstipple.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c index a0f9716dac2..04e59152c5c 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c +++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c @@ -34,7 +34,6 @@ */ -#include "pipe/p_inlines.h" #include "pipe/p_context.h" #include "pipe/p_defines.h" #include "pipe/p_shader_tokens.h" @@ -372,7 +371,7 @@ pstip_update_texture(struct pstip_stage *pstip) static const uint bit31 = 1 << 31; struct pipe_context *pipe = pstip->pipe; struct pipe_screen *screen = pipe->screen; - struct pipe_surface *surface; + struct pipe_transfer *transfer; const uint *stipple = pstip->state.stipple->stipple; uint i, j; ubyte *data; @@ -381,10 +380,9 @@ pstip_update_texture(struct pstip_stage *pstip) */ pipe->flush( pipe, PIPE_FLUSH_TEXTURE_CACHE, NULL ); - surface = screen->get_tex_surface(screen, pstip->texture, 0, 0, 0, - PIPE_BUFFER_USAGE_CPU_WRITE); - data = screen->surface_map(screen, surface, - PIPE_BUFFER_USAGE_CPU_WRITE); + transfer = screen->get_tex_transfer(screen, pstip->texture, 0, 0, 0, + PIPE_TRANSFER_WRITE, 0, 0, 32, 32); + data = screen->transfer_map(screen, transfer); /* * Load alpha texture. @@ -396,18 +394,18 @@ pstip_update_texture(struct pstip_stage *pstip) for (j = 0; j < 32; j++) { if (stipple[i] & (bit31 >> j)) { /* fragment "on" */ - data[i * surface->stride + j] = 0; + data[i * transfer->stride + j] = 0; } else { /* fragment "off" */ - data[i * surface->stride + j] = 255; + data[i * transfer->stride + j] = 255; } } } /* unmap */ - screen->surface_unmap(screen, surface); - screen->tex_surface_release(screen, &surface); + screen->transfer_unmap(screen, transfer); + screen->tex_transfer_destroy(transfer); } @@ -573,7 +571,7 @@ pstip_destroy(struct draw_stage *stage) pstip->pipe->delete_sampler_state(pstip->pipe, pstip->sampler_cso); - pipe_texture_release(&pstip->texture); + pipe_texture_reference(&pstip->texture, NULL); draw_free_temp_verts( stage ); FREE( stage ); |