diff options
author | marha <marha@users.sourceforge.net> | 2013-03-25 10:20:34 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-04-11 11:13:37 +0200 |
commit | dde22e946ccfb0bd937224daf42403b80528c2a6 (patch) | |
tree | c4235cb922c8cd854bc3ef2e670bb6802dc743de /mesalib/src/mesa/state_tracker/st_cb_texture.c | |
parent | accd8a3364ffd1e91a4ab52b06b5e3b9d250ae92 (diff) | |
download | vcxsrv-dde22e946ccfb0bd937224daf42403b80528c2a6.tar.gz vcxsrv-dde22e946ccfb0bd937224daf42403b80528c2a6.tar.bz2 vcxsrv-dde22e946ccfb0bd937224daf42403b80528c2a6.zip |
fontconfig mesa pixman xserver git update 25 Mar 2013
xserver commit 2967391c6d35f03121afa8003e0fb94b62495129
pixman commit d8ac35af1208a4fa4d67f03fee10b5449fb8495a
fontconfig commit b561ff2016ce84eef3c81f16dfb0481be6a13f9b
mesa commit 92b8a37fdfff9e83f39b8885f51ed2f60326ab6a
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_texture.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_cb_texture.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c index c922a3164..94fbbf7be 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_texture.c +++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c @@ -68,7 +68,7 @@ #define DBG if (0) printf -static enum pipe_texture_target +enum pipe_texture_target gl_target_to_pipe(GLenum target) { switch (target) { @@ -542,8 +542,8 @@ prep_teximage(struct gl_context *ctx, struct gl_texture_image *texImage, * Return a writemask for the gallium blit. The parameters can be base * formats or "format" from glDrawPixels/glTexImage/glGetTexImage. */ -static unsigned -get_blit_mask(GLenum srcFormat, GLenum dstFormat) +unsigned +st_get_blit_mask(GLenum srcFormat, GLenum dstFormat) { switch (dstFormat) { case GL_DEPTH_STENCIL: @@ -608,6 +608,10 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims, unsigned bind; GLubyte *map; + if (!st->prefer_blit_based_texture_transfer) { + goto fallback; + } + if (!dst) { goto fallback; } @@ -769,7 +773,7 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims, blit.src.box.width = blit.dst.box.width = width; blit.src.box.height = blit.dst.box.height = height; blit.src.box.depth = blit.dst.box.depth = depth; - blit.mask = get_blit_mask(format, texImage->_BaseFormat); + blit.mask = st_get_blit_mask(format, texImage->_BaseFormat); blit.filter = PIPE_TEX_FILTER_NEAREST; blit.scissor_enable = FALSE; @@ -860,6 +864,10 @@ st_GetTexImage(struct gl_context * ctx, ubyte *map = NULL; boolean done = FALSE; + if (!st->prefer_blit_based_texture_transfer) { + goto fallback; + } + if (!stImage->pt) { goto fallback; } @@ -996,7 +1004,7 @@ st_GetTexImage(struct gl_context * ctx, blit.src.box.width = blit.dst.box.width = width; blit.src.box.height = blit.dst.box.height = height; blit.src.box.depth = blit.dst.box.depth = depth; - blit.mask = get_blit_mask(texImage->_BaseFormat, format); + blit.mask = st_get_blit_mask(texImage->_BaseFormat, format); blit.filter = PIPE_TEX_FILTER_NEAREST; blit.scissor_enable = FALSE; @@ -1370,7 +1378,7 @@ st_CopyTexSubImage(struct gl_context *ctx, GLuint dims, blit.dst.box.width = width; blit.dst.box.height = height; blit.dst.box.depth = 1; - blit.mask = get_blit_mask(rb->_BaseFormat, texImage->_BaseFormat); + blit.mask = st_get_blit_mask(rb->_BaseFormat, texImage->_BaseFormat); blit.filter = PIPE_TEX_FILTER_NEAREST; /* 1D array textures need special treatment. |