diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2011-02-26 23:53:30 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2011-02-26 23:53:30 +0100 |
commit | f3bb93b495204a8cf2351113863f10151e0098fc (patch) | |
tree | 15640b610a8b4dea15675b3f085471eb9ef15c81 | |
parent | 7a26eafb0f5c4318d823b29fcc6e2587687101ef (diff) |
i915g: cleanup translate_texture_format
- kill big-endian variants (Intel is all little endian).
- group compressed and depth formats together.
- consistently sample depth as luminosity.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | src/gallium/drivers/i915/i915_state_sampler.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/gallium/drivers/i915/i915_state_sampler.c b/src/gallium/drivers/i915/i915_state_sampler.c index 916cb76753..3f81ebc738 100644 --- a/src/gallium/drivers/i915/i915_state_sampler.c +++ b/src/gallium/drivers/i915/i915_state_sampler.c @@ -206,12 +206,6 @@ static uint translate_texture_format(enum pipe_format pipeFormat) return MAPSURF_32BIT | MT_32BIT_ARGB8888; case PIPE_FORMAT_B8G8R8X8_UNORM: return MAPSURF_32BIT | MT_32BIT_XRGB8888; - case PIPE_FORMAT_R8G8B8A8_UNORM: - return MAPSURF_32BIT | MT_32BIT_ABGR8888; -#if 0 - case PIPE_FORMAT_R8G8B8X8_UNORM: - return MAPSURF_32BIT | MT_32BIT_XBGR8888; -#endif case PIPE_FORMAT_YUYV: return (MAPSURF_422 | MT_422_YCRCB_NORMAL); case PIPE_FORMAT_UYVY: @@ -220,10 +214,6 @@ static uint translate_texture_format(enum pipe_format pipeFormat) case PIPE_FORMAT_RGB_FXT1: case PIPE_FORMAT_RGBA_FXT1: return (MAPSURF_COMPRESSED | MT_COMPRESS_FXT1); -#endif - case PIPE_FORMAT_Z16_UNORM: - return (MAPSURF_16BIT | MT_16BIT_L16); -#if 0 case PIPE_FORMAT_RGBA_DXT1: case PIPE_FORMAT_RGB_DXT1: return (MAPSURF_COMPRESSED | MT_COMPRESS_DXT1); @@ -232,9 +222,11 @@ static uint translate_texture_format(enum pipe_format pipeFormat) case PIPE_FORMAT_RGBA_DXT5: return (MAPSURF_COMPRESSED | MT_COMPRESS_DXT4_5); #endif + case PIPE_FORMAT_Z16_UNORM: + return (MAPSURF_16BIT | MT_16BIT_L16); case PIPE_FORMAT_Z24_UNORM_S8_USCALED: case PIPE_FORMAT_Z24X8_UNORM: - return (MAPSURF_32BIT | MT_32BIT_xI824); + return (MAPSURF_32BIT | MT_32BIT_xL824); default: debug_printf("i915: translate_texture_format() bad image format %x\n", pipeFormat); |