diff options
author | Xiang, Haihao <[email protected]> | 2007-08-10 16:37:30 +0800 |
---|---|---|
committer | Xiang, Haihao <[email protected]> | 2007-08-10 16:37:30 +0800 |
commit | db928291dcbda2a820dbb1668c43d2fb4266be7c (patch) | |
tree | 55a4527f8f48fee888ed0b5eb8f3d3e0022504a0 | |
parent | 8ea66fa2ec9eeb6a7e869ff08d713f5e77d795e0 (diff) |
i965: roland's DXTn format texture patch(bug10347)
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_tex.c | 12 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 12 |
2 files changed, 19 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_tex.c b/src/mesa/drivers/dri/i965/brw_tex.c index a62395a4327..ad29316a42a 100644 --- a/src/mesa/drivers/dri/i965/brw_tex.c +++ b/src/mesa/drivers/dri/i965/brw_tex.c @@ -154,13 +154,19 @@ brwChooseTextureFormat( GLcontext *ctx, GLint internalFormat, case GL_RGB_S3TC: case GL_RGB4_S3TC: + case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: + return &_mesa_texformat_rgb_dxt1; + + case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: + return &_mesa_texformat_rgba_dxt1; + case GL_RGBA_S3TC: case GL_RGBA4_S3TC: case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: + return &_mesa_texformat_rgba_dxt3; + case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: - case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: - case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: - return &_mesa_texformat_rgb_dxt1; /* there is no rgba support? */ + return &_mesa_texformat_rgba_dxt5; case GL_DEPTH_COMPONENT: case GL_DEPTH_COMPONENT16: diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index acf5771e779..0a45164a0fd 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -116,9 +116,17 @@ static GLuint translate_tex_format( GLuint mesa_format ) case MESA_FORMAT_Z16: return BRW_SURFACEFORMAT_I16_UNORM; - case MESA_FORMAT_RGBA_DXT1: case MESA_FORMAT_RGB_DXT1: - return BRW_SURFACEFORMAT_DXT1_RGB; + return BRW_SURFACEFORMAT_DXT1_RGB; + + case MESA_FORMAT_RGBA_DXT1: + return BRW_SURFACEFORMAT_BC1_UNORM; + + case MESA_FORMAT_RGBA_DXT3: + return BRW_SURFACEFORMAT_BC2_UNORM; + + case MESA_FORMAT_RGBA_DXT5: + return BRW_SURFACEFORMAT_BC3_UNORM; case MESA_FORMAT_SRGBA8: return BRW_SURFACEFORMAT_R8G8B8A8_UNORM_SRGB; |