[Mesa-dev] [PATCH] i965 meta up/downsample: Fix renderbuffer _BaseFormat
Kenneth Graunke
kenneth at whitecape.org
Wed May 14 23:56:53 PDT 2014
On 05/14/2014 11:39 PM, Jordan Justen wrote:
> mt->format is of type mesa_format, and therefore can't be
> used with _mesa_base_fbo_format which requires a GLenum input.
>
> On gen8, this fixes various piglit fbo-depthstencil tests with
> samples > 1.
>
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> Cc: Topi Pohjolainen <topi.pohjolainen at intel.com>
> Cc: Kenneth Graunke <kenneth at whitecape.org>
> ---
> This was tested on Ken's broadwell branch, which includes
> Topi's recent gen8 stencil series, but the patch is based
> on the current master tree.
>
> src/mesa/drivers/dri/i965/brw_meta_updownsample.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_meta_updownsample.c b/src/mesa/drivers/dri/i965/brw_meta_updownsample.c
> index de25bf4..a35b7e1 100644
> --- a/src/mesa/drivers/dri/i965/brw_meta_updownsample.c
> +++ b/src/mesa/drivers/dri/i965/brw_meta_updownsample.c
> @@ -27,6 +27,7 @@
>
> #include "main/blit.h"
> #include "main/buffers.h"
> +#include "main/enums.h"
> #include "main/fbobject.h"
>
> #include "drivers/common/meta.h"
> @@ -62,7 +63,7 @@ brw_get_rb_for_first_slice(struct brw_context *brw, struct intel_mipmap_tree *mt
> irb = intel_renderbuffer(rb);
>
> rb->Format = mt->format;
> - rb->_BaseFormat = _mesa_base_fbo_format(ctx, mt->format);
> + rb->_BaseFormat = _mesa_get_format_base_format(mt->format);
>
> rb->NumSamples = mt->num_samples;
> rb->Width = mt->logical_width0;
>
Man, I wish we had type safety.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140514/83563710/attachment-0001.sig>
More information about the mesa-dev
mailing list