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()). Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]> --- 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 _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
