[Mesa-dev] [PATCH 07/18] i965/gen8: Use miptree format in the surface setup
Topi Pohjolainen
topi.pohjolainen at intel.com
Wed Apr 22 13:47:27 PDT 2015
No functional change but this allows to drop the texture object's
mesa format in later patches.
Stencil buffer has fixed hardware format corresponding to fixed
mesa format. (This is in fact already specfically tested in
intel_fbo.c::intel_validate_framebuffer()).
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/gen8_surface_state.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/gen8_surface_state.c b/src/mesa/drivers/dri/i965/gen8_surface_state.c
index 304e5fe..5a94117 100644
--- a/src/mesa/drivers/dri/i965/gen8_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_surface_state.c
@@ -169,10 +169,11 @@ gen8_update_texture_surface(struct gl_context *ctx,
if (tObj->StencilSampling && firstImage->_BaseFormat == GL_DEPTH_STENCIL) {
mt = mt->stencil_mt;
format = MESA_FORMAT_S_UINT8;
+ assert(mt->format == MESA_FORMAT_S_UINT8);
}
unsigned tiling_mode, pitch;
- if (format == MESA_FORMAT_S_UINT8) {
+ if (mt->format == MESA_FORMAT_S_UINT8) {
tiling_mode = GEN8_SURFACE_TILING_W;
pitch = 2 * mt->pitch;
} else {
--
1.9.3
More information about the mesa-dev
mailing list