Reimar Döffinger <reimar.doeffin...@gmx.de> writes:

> This allows MPlayer to (mis-)use depth textures to quickly upload
> and render 16-bit per component YUV video.
> There is still the issue that the actual precision is only around
> 10-bits, at least when using it in the way MPlayer does.
> If someone knows an explanation for that I'd like to hear it, however
> it is not related to this change as the precision is the same
> with Z16 disable which ends up converting to X8Z24 first.

The floats in the fragment shader only have about 10 bits of precision.

> Signed-off-by: Reimar Döffinger <reimar.doeffin...@gmx.de>
> ---
>  src/mesa/drivers/dri/i915/i915_context.c |    9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i915/i915_context.c 
> b/src/mesa/drivers/dri/i915/i915_context.c
> index dc32292..4de49f5 100644
> --- a/src/mesa/drivers/dri/i915/i915_context.c
> +++ b/src/mesa/drivers/dri/i915/i915_context.c
> @@ -113,17 +113,8 @@ intel_init_texture_formats(struct gl_context *ctx)
>     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;
> -   */

Before pushing a change like this, we'd need to add FBO validation code
for the combinations that don't work (16 vs 32bpp between depth and
color).

Also, there is no Z24 (that's 3 bytes per pixel) support in the
hardware.  I would guess that a piglit run would have shown that.

Attachment: pgp3N60bZCz9l.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to