diff options
| author | Ben Skeggs <skeggsb@gmail.com> | 2008-04-29 09:00:48 +1000 |
|---|---|---|
| committer | Ben Skeggs <skeggsb@gmail.com> | 2008-04-29 09:00:48 +1000 |
| commit | 95295081a8557f0b63cd89f387205d5abe772788 (patch) | |
| tree | bbc1ee8f36fdb2d2ba34f15cf406292e1439a87d /src/mesa/state_tracker/st_cb_drawpixels.c | |
| parent | 480ab1b7893290505efba925ea95d3b173aa97d4 (diff) | |
| parent | 059ab50c60f19fd6dd30c574644c0e4e5747a330 (diff) | |
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/mesa/state_tracker/st_cb_drawpixels.c')
| -rw-r--r-- | src/mesa/state_tracker/st_cb_drawpixels.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 047ea3816b..7597ea323c 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -983,22 +983,8 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy, else { /* srcFormat can't be used as a texture format */ if (type == GL_DEPTH) { - static const enum pipe_format zFormats[] = { - PIPE_FORMAT_Z16_UNORM, - PIPE_FORMAT_Z32_UNORM, - PIPE_FORMAT_S8Z24_UNORM, - PIPE_FORMAT_Z24S8_UNORM - }; - uint i; - texFormat = 0; - for (i = 0; i < Elements(zFormats); i++) { - if (screen->is_format_supported(screen, zFormats[i], - PIPE_TEXTURE)) { - texFormat = zFormats[i]; - break; - } - } - assert(texFormat); /* XXX no depth texture formats??? */ + texFormat = st_choose_format(pipe, GL_DEPTH_COMPONENT, PIPE_TEXTURE); + assert(texFormat != PIPE_FORMAT_NONE); /* XXX no depth texture formats??? */ } else { /* todo */ |
