[Mesa-dev] [PATCH] i915: Re-enable Z16/Z24 formats.
Eric Anholt
eric at anholt.net
Wed Aug 8 15:16:00 PDT 2012
Reimar Döffinger <Reimar.Doeffinger at 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.Doeffinger at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120808/e9de36a1/attachment.pgp>
More information about the mesa-dev
mailing list