mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
fix LogicOp/bitmap problem, bug 11133
This commit is contained in:
parent
22b0b2f47e
commit
bd9db5eed2
3 changed files with 12 additions and 5 deletions
|
|
@ -532,12 +532,15 @@ intelEmitImmediateColorExpandBlit(struct intel_context *intel,
|
|||
GLuint dst_offset,
|
||||
GLboolean dst_tiled,
|
||||
GLshort x, GLshort y,
|
||||
GLshort w, GLshort h)
|
||||
GLshort w, GLshort h,
|
||||
GLenum logic_op)
|
||||
{
|
||||
struct xy_setup_blit setup;
|
||||
struct xy_text_immediate_blit text;
|
||||
int dwords = ((src_size + 7) & ~7) / 4;
|
||||
|
||||
assert( logic_op - GL_CLEAR >= 0 );
|
||||
assert( logic_op - GL_CLEAR < 0x10 );
|
||||
|
||||
if (w < 0 || h < 0)
|
||||
return;
|
||||
|
|
@ -561,7 +564,7 @@ intelEmitImmediateColorExpandBlit(struct intel_context *intel,
|
|||
setup.br0.length = (sizeof(setup) / sizeof(int)) - 2;
|
||||
|
||||
setup.br13.dest_pitch = dst_pitch;
|
||||
setup.br13.rop = 0xcc;
|
||||
setup.br13.rop = translate_raster_op(logic_op);
|
||||
setup.br13.color_depth = (cpp == 4) ? BR13_8888 : BR13_565;
|
||||
setup.br13.clipping_enable = 0;
|
||||
setup.br13.mono_source_transparency = 1;
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ intelEmitImmediateColorExpandBlit(struct intel_context *intel,
|
|||
GLuint dst_offset,
|
||||
GLboolean dst_tiled,
|
||||
GLshort dst_x, GLshort dst_y,
|
||||
GLshort w, GLshort h);
|
||||
GLshort w, GLshort h,
|
||||
GLenum logic_op );
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -260,7 +260,9 @@ do_blit_bitmap( GLcontext *ctx,
|
|||
int h = MIN2(DY, box_h - py);
|
||||
int w = MIN2(DX, box_w - px);
|
||||
GLuint sz = align(align(w,8) * h, 64)/8;
|
||||
|
||||
GLenum logic_op = ctx->Color.ColorLogicOpEnabled ?
|
||||
ctx->Color.LogicOp : GL_COPY;
|
||||
|
||||
assert(sz <= sizeof(stipple));
|
||||
memset(stipple, 0, sz);
|
||||
|
||||
|
|
@ -288,7 +290,8 @@ do_blit_bitmap( GLcontext *ctx,
|
|||
dst->tiled,
|
||||
rect.x1 + px,
|
||||
rect.y2 - (py + h),
|
||||
w, h);
|
||||
w, h,
|
||||
logic_op);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue