[Mesa-dev] [PATCH] i965: fast clear depth only if depth equals to color buffer depth
Ian Romanick
idr at freedesktop.org
Tue Oct 30 10:25:06 PDT 2012
On 10/30/2012 02:06 AM, Tapani Pälli wrote:
> Patch makes GLBenchmark 2.1.1 , An3DBenchXL and BasemarkES2 work with
> Android on Ivybridge. In all failing cases color buffer is 16bit and
> depth buffer 24bit. I did not find this kind of limitation from the
> available HW specs though, bug does not happen with Sandybridge.
Could we get a piglit test for this? It should be possible to trigger
this using FBOs.
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
> src/mesa/drivers/dri/i965/brw_clear.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_clear.c b/src/mesa/drivers/dri/i965/brw_clear.c
> index 53d8e54..cbaaf26 100644
> --- a/src/mesa/drivers/dri/i965/brw_clear.c
> +++ b/src/mesa/drivers/dri/i965/brw_clear.c
> @@ -138,6 +138,14 @@ brw_fast_clear_depth(struct gl_context *ctx)
> return false;
> }
>
> + /* check that colorbuffer depth equals to depthbuffer depth on IVB */
> + if(intel->gen == 7) {
> + struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0];
> + if (_mesa_get_format_bytes(rb->Format) !=
> + _mesa_get_format_bytes(intel_rb_format(depth_irb)))
> + return false;
> + }
> +
> uint32_t depth_clear_value;
> switch (mt->format) {
> case MESA_FORMAT_Z32_FLOAT_X24S8:
>
More information about the mesa-dev
mailing list