[Mesa-dev] [PATCH 4/4] intel: Support native Z16 depth textures (including as renderbuffer) on i965.
Ian Romanick
idr at freedesktop.org
Fri Nov 11 14:09:51 PST 2011
On 11/11/2011 10:57 AM, Eric Anholt wrote:
> This is required for GL 3.0. The old comment about Z24 is dropped,
> since we support X8_Z24 now.
> ---
> src/mesa/drivers/dri/intel/intel_context.c | 13 ++-----------
> 1 files changed, 2 insertions(+), 11 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
> index d00d5d4..4ee7e35 100644
> --- a/src/mesa/drivers/dri/intel/intel_context.c
> +++ b/src/mesa/drivers/dri/intel/intel_context.c
> @@ -648,21 +648,12 @@ intelInitContext(struct intel_context *intel,
> }
>
> /* Depth and stencil */
> + if (intel->gen>= 4)
> + ctx->TextureFormatSupported[MESA_FORMAT_Z16] = true;
Why is this restricted to GEN4+? i915 can do 16-bit depth, and it looks
like it can handle 16-bit textures.
> ctx->TextureFormatSupported[MESA_FORMAT_S8_Z24] = true;
> ctx->TextureFormatSupported[MESA_FORMAT_X8_Z24] = true;
> ctx->TextureFormatSupported[MESA_FORMAT_S8] = intel->has_separate_stencil;
>
> - /*
> - * This was disabled in initial FBO enabling to avoid combinations
> - * of depth+stencil that wouldn't work together. We since decided
> - * that it was OK, since it's up to the app to come up with the
> - * combo that actually works, so this can probably be re-enabled.
> - */
> - /*
> - ctx->TextureFormatSupported[MESA_FORMAT_Z16] = true;
> - ctx->TextureFormatSupported[MESA_FORMAT_Z24] = true;
> - */
> -
> /* ctx->Extensions.MESA_ycbcr_texture */
> ctx->TextureFormatSupported[MESA_FORMAT_YCBCR] = true;
> ctx->TextureFormatSupported[MESA_FORMAT_YCBCR_REV] = true;
More information about the mesa-dev
mailing list