diff options
author | marha <marha@users.sourceforge.net> | 2013-02-27 10:48:05 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-02-27 10:48:05 +0100 |
commit | 9bed5520560f553ac8ad4985ed41b31499d903fc (patch) | |
tree | e7e6587df3f87e4d5398da78a6b0761171da7d68 /mesalib/src/gallium/auxiliary/util/u_blitter.c | |
parent | b14c3b05e45201bbbbb3a4beba260c3d6ff31003 (diff) | |
parent | c74ef795c7282681616decc36a9a81cd1b1b6ec7 (diff) | |
download | vcxsrv-9bed5520560f553ac8ad4985ed41b31499d903fc.tar.gz vcxsrv-9bed5520560f553ac8ad4985ed41b31499d903fc.tar.bz2 vcxsrv-9bed5520560f553ac8ad4985ed41b31499d903fc.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
libX11 mesa pixman xkeyboard-config
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_blitter.c')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_blitter.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.c b/mesalib/src/gallium/auxiliary/util/u_blitter.c index 95224020c..e37be4e0a 100644 --- a/mesalib/src/gallium/auxiliary/util/u_blitter.c +++ b/mesalib/src/gallium/auxiliary/util/u_blitter.c @@ -103,7 +103,10 @@ struct blitter_context_priv void *velem_state_readbuf; /* Sampler state. */ - void *sampler_state, *sampler_state_linear; + void *sampler_state; + void *sampler_state_linear; + void *sampler_state_rect; + void *sampler_state_rect_linear; /* Rasterizer state. */ void *rs_state, *rs_state_scissor, *rs_discard_state; @@ -223,10 +226,15 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe) sampler_state.wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE; sampler_state.normalized_coords = 1; ctx->sampler_state = pipe->create_sampler_state(pipe, &sampler_state); + sampler_state.normalized_coords = 0; + ctx->sampler_state_rect = pipe->create_sampler_state(pipe, &sampler_state); sampler_state.min_img_filter = PIPE_TEX_FILTER_LINEAR; sampler_state.mag_img_filter = PIPE_TEX_FILTER_LINEAR; + sampler_state.normalized_coords = 1; ctx->sampler_state_linear = pipe->create_sampler_state(pipe, &sampler_state); + sampler_state.normalized_coords = 0; + ctx->sampler_state_rect_linear = pipe->create_sampler_state(pipe, &sampler_state); /* rasterizer state */ memset(&rs_state, 0, sizeof(rs_state)); @@ -365,8 +373,10 @@ void util_blitter_destroy(struct blitter_context *blitter) ctx->delete_fs_state(pipe, ctx->fs_col_int[i]); } - pipe->delete_sampler_state(pipe, ctx->sampler_state); + pipe->delete_sampler_state(pipe, ctx->sampler_state_rect_linear); + pipe->delete_sampler_state(pipe, ctx->sampler_state_rect); pipe->delete_sampler_state(pipe, ctx->sampler_state_linear); + pipe->delete_sampler_state(pipe, ctx->sampler_state); u_upload_destroy(ctx->upload); FREE(ctx); } @@ -1317,9 +1327,17 @@ void util_blitter_blit_generic(struct blitter_context *blitter, src_samples <= 1 && (dstbox->width != abs(srcbox->width) || dstbox->height != abs(srcbox->height))) { - sampler_state = ctx->sampler_state_linear; + if (src_target == PIPE_TEXTURE_RECT) { + sampler_state = ctx->sampler_state_rect_linear; + } else { + sampler_state = ctx->sampler_state_linear; + } } else { - sampler_state = ctx->sampler_state; + if (src_target == PIPE_TEXTURE_RECT) { + sampler_state = ctx->sampler_state_rect; + } else { + sampler_state = ctx->sampler_state; + } } /* Set samplers. */ |