diff options
author | Roland Scheidegger <sroland@vmware.com> | 2010-03-30 01:52:13 +0200 |
---|---|---|
committer | Roland Scheidegger <sroland@vmware.com> | 2010-03-30 01:52:13 +0200 |
commit | 733df0059f04e3fd7e3265d3c80dd8029f939c60 (patch) | |
tree | 5073edcb41611b86c9a62fa75c2c089fd2babf48 /src/gallium/state_trackers/python/st_sample.c | |
parent | 6fb364a1717858d8201b2caf234076ce5d4832ac (diff) | |
parent | 5fa09846618ed702493f054a1d4b0ec2a28fbbd0 (diff) | |
download | external_mesa3d-733df0059f04e3fd7e3265d3c80dd8029f939c60.zip external_mesa3d-733df0059f04e3fd7e3265d3c80dd8029f939c60.tar.gz external_mesa3d-733df0059f04e3fd7e3265d3c80dd8029f939c60.tar.bz2 |
Merge branch 'master' into gallium-new-formats
Conflicts:
src/gallium/auxiliary/util/u_format.csv
Diffstat (limited to 'src/gallium/state_trackers/python/st_sample.c')
-rw-r--r-- | src/gallium/state_trackers/python/st_sample.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/gallium/state_trackers/python/st_sample.c b/src/gallium/state_trackers/python/st_sample.c index f962253..e2c1e06 100644 --- a/src/gallium/state_trackers/python/st_sample.c +++ b/src/gallium/state_trackers/python/st_sample.c @@ -521,12 +521,13 @@ st_sample_pixel_block(enum pipe_format format, } } -#if 0 + void -st_sample_surface(struct st_surface *surface, float *rgba) +st_sample_surface(struct pipe_context *pipe, + struct st_surface *surface, + float *rgba) { struct pipe_texture *texture = surface->texture; - struct pipe_screen *screen = texture->screen; unsigned width = u_minify(texture->width0, surface->level); unsigned height = u_minify(texture->height0, surface->level); uint rgba_stride = width * 4; @@ -534,18 +535,18 @@ st_sample_surface(struct st_surface *surface, float *rgba) void *raw; transfer = pipe->get_tex_transfer(pipe, - surface->texture, - surface->face, - surface->level, - surface->zslice, - PIPE_TRANSFER_WRITE, - 0, 0, - width, - height); + surface->texture, + surface->face, + surface->level, + surface->zslice, + PIPE_TRANSFER_WRITE, + 0, 0, + width, + height); if (!transfer) return; - raw = screen->transfer_map(screen, transfer); + raw = pipe->transfer_map(pipe, transfer); if (raw) { enum pipe_format format = texture->format; uint x, y; @@ -567,9 +568,8 @@ st_sample_surface(struct st_surface *surface, float *rgba) } } - screen->transfer_unmap(screen, transfer); + pipe->transfer_unmap(pipe, transfer); } - screen->tex_transfer_destroy(transfer); + pipe->tex_transfer_destroy(pipe, transfer); } -#endif |