i965 meta up/downsample: Fix renderbuffer _BaseFormat
authorJordan Justen <jordan.l.justen@intel.com>
Thu, 15 May 2014 06:06:47 +0000 (06:06 +0000)
committerJordan Justen <jordan.l.justen@intel.com>
Thu, 15 May 2014 17:49:05 +0000 (10:49 -0700)
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@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "10.2" <mesa-stable@lists.freedesktop.org>
src/mesa/drivers/dri/i965/brw_meta_updownsample.c

index de25bf4f7aaa476c85fa7221c4025fdc8e3540cf..a35b7e14f618385593adee36ddff00cac4958ce5 100644 (file)
@@ -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;