Mesa (master): i965: Use the miptree format for texture surface format choice.
Eric Anholt
anholt at kemper.freedesktop.org
Mon Dec 19 21:20:43 UTC 2011
Module: Mesa
Branch: master
Commit: e71fc6a8200cd78037a9788230ec0cc9f451a4b1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e71fc6a8200cd78037a9788230ec0cc9f451a4b1
Author: Eric Anholt <eric at anholt.net>
Date: Tue Dec 13 12:40:09 2011 -0800
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 at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 2 +-
src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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 f9b0b71..d36b6f8 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -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) <<
diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
index 0defa67..1c0183b 100644
--- a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
@@ -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);
More information about the mesa-commit
mailing list