#include "intel_image.h"
#include "intel_buffers.h"
#include "intel_pixel.h"
-#include "intel_reg.h"
#define FILE_DEBUG_FLAG DEBUG_PIXEL
static inline int
y_flip(struct gl_framebuffer *fb, int y, int height)
{
- if (_mesa_is_user_fbo(fb))
- return y;
- else
+ if (fb->FlipY)
return fb->Height - y - height;
+ else
+ return y;
}
/*
/* The blitter has no idea about fast color clears, so we need to resolve
* the miptree before we do anything.
*/
- intel_miptree_resolve_color(brw, irb->mt, 0);
+ intel_miptree_access_raw(brw, irb->mt, irb->mt_level, irb->mt_layer, true);
/* Chop it all into chunks that can be digested by hardware: */
for (py = 0; py < height; py += DY) {
int h = MIN2(DY, height - py);
int w = MIN2(DX, width - px);
GLuint sz = ALIGN(ALIGN(w,8) * h, 64)/8;
- GLenum logic_op = ctx->Color.ColorLogicOpEnabled ?
- ctx->Color.LogicOp : GL_COPY;
+ const enum gl_logicop_mode logic_op = ctx->Color.ColorLogicOpEnabled ?
+ ctx->Color._LogicOp : COLOR_LOGICOP_COPY;
assert(sz <= sizeof(stipple));
memset(stipple, 0, sz);
w, h,
(GLubyte *)stipple,
8,
- _mesa_is_winsys_fbo(fb));
+ fb->FlipY);
if (count == 0)
continue;
(GLubyte *)stipple,
sz,
color,
- irb->mt->pitch,
+ irb->mt->surf.row_pitch_B,
irb->mt->bo,
- 0,
- irb->mt->tiling,
+ irb->mt->offset,
+ irb->mt->surf.tiling,
dstx + px,
dsty + py,
w, h,
const struct gl_pixelstore_attrib *unpack,
const GLubyte * pixels)
{
+ struct brw_context *brw = brw_context(ctx);
+
if (!_mesa_check_conditional_render(ctx))
return;
- if (do_blit_bitmap(ctx, x, y, width, height,
- unpack, pixels))
+ if (brw->screen->devinfo.gen < 6 &&
+ do_blit_bitmap(ctx, x, y, width, height, unpack, pixels))
return;
_mesa_meta_Bitmap(ctx, x, y, width, height, unpack, pixels);