i965: Use the miptree format for texture surface format choice.

With separate stencil GL_DEPTH32F_STENCIL8, the miptree will have a
really different format (MESA_FORMAT_Z32_FLOAT) from the teximage
(MESA_FORMAT_Z32_FLOAT_X24S8).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Eric Anholt
2011-12-13 12:40:09 -08:00
parent 353f7ba4ab
commit e71fc6a820
2 changed files with 2 additions and 2 deletions
@@ -632,7 +632,7 @@ brw_update_texture_surface( struct gl_context *ctx, GLuint unit )
surf[0] = (translate_tex_target(tObj->Target) << BRW_SURFACE_TYPE_SHIFT |
BRW_SURFACE_MIPMAPLAYOUT_BELOW << BRW_SURFACE_MIPLAYOUT_SHIFT |
BRW_SURFACE_CUBEFACE_ENABLES |
(translate_tex_format(firstImage->TexFormat,
(translate_tex_format(mt->format,
firstImage->InternalFormat,
sampler->DepthMode,
sampler->sRGBDecode) <<
@@ -76,7 +76,7 @@ gen7_update_texture_surface(struct gl_context *ctx, GLuint unit)
surf->ss0.vertical_alignment = 1;
surf->ss0.surface_type = translate_tex_target(tObj->Target);
surf->ss0.surface_format = translate_tex_format(firstImage->TexFormat,
surf->ss0.surface_format = translate_tex_format(mt->format,
firstImage->InternalFormat,
sampler->DepthMode,
sampler->sRGBDecode);