aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_cb_texture.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-02-15 08:22:54 +0100
committermarha <marha@users.sourceforge.net>2013-02-15 08:22:54 +0100
commit0b2fa092281e667dbb02942008b16510af1086ef (patch)
tree350352f14a2a6f98d2f5a5356eb63aeae67d6047 /mesalib/src/mesa/state_tracker/st_cb_texture.c
parent1de47a7fc53a67beccab830178aaa0118ed4734f (diff)
parent6f6a2340d40759b77ef43965efdd24f3e4e623fd (diff)
downloadvcxsrv-0b2fa092281e667dbb02942008b16510af1086ef.tar.gz
vcxsrv-0b2fa092281e667dbb02942008b16510af1086ef.tar.bz2
vcxsrv-0b2fa092281e667dbb02942008b16510af1086ef.zip
Merge remote-tracking branch 'origin/released'
* origin/released: libxcb mesa xserver xkeyboard-config git update 15 Feb 2013
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_texture.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_texture.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c
index ac70e9292..f8ff024db 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c
@@ -560,32 +560,6 @@ st_CompressedTexImage(struct gl_context *ctx, GLuint dims,
}
-static enum pipe_format
-choose_matching_format(struct pipe_screen *screen, unsigned bind,
- GLenum format, GLenum type, GLboolean swapBytes)
-{
- gl_format mesa_format;
-
- for (mesa_format = 1; mesa_format < MESA_FORMAT_COUNT; mesa_format++) {
- if (_mesa_get_format_color_encoding(mesa_format) == GL_SRGB) {
- continue;
- }
-
- if (_mesa_format_matches_format_and_type(mesa_format, format, type,
- swapBytes)) {
- enum pipe_format format = st_mesa_format_to_pipe_format(mesa_format);
-
- if (format &&
- screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0,
- bind)) {
- return format;
- }
- /* It's unlikely to find 2 matching Mesa formats. */
- break;
- }
- }
- return PIPE_FORMAT_NONE;
-}
/**
@@ -683,8 +657,8 @@ st_GetTexImage(struct gl_context * ctx,
/* Choose the destination format by finding the best match
* for the format+type combo. */
- dst_format = choose_matching_format(screen, bind, format, type,
- ctx->Pack.SwapBytes);
+ dst_format = st_choose_matching_format(screen, bind, format, type,
+ ctx->Pack.SwapBytes);
if (dst_format == PIPE_FORMAT_NONE) {
GLenum dst_glformat;