mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 00:38:48 +02:00
Remove the flags argument for intel_meta_draw_quad(). 3D primitives
must always be emitted with cliprects else the drawing origin may not be emitted either.
This commit is contained in:
parent
2560061cfe
commit
7c1348ac8f
6 changed files with 22 additions and 29 deletions
|
|
@ -328,10 +328,11 @@ void intelClearWithBlit(GLcontext *ctx, GLbitfield flags, GLboolean all,
|
|||
b = *box;
|
||||
}
|
||||
|
||||
_mesa_printf("clear %d,%d..%d,%d, flags %x\n",
|
||||
b.x1, b.y1,
|
||||
b.x2, b.y2,
|
||||
flags);
|
||||
if (0)
|
||||
_mesa_printf("clear %d,%d..%d,%d, flags %x\n",
|
||||
b.x1, b.y1,
|
||||
b.x2, b.y2,
|
||||
flags);
|
||||
|
||||
if ( flags & BUFFER_BIT_FRONT_LEFT ) {
|
||||
BEGIN_BATCH(6, INTEL_BATCH_NO_CLIPRECTS);
|
||||
|
|
|
|||
|
|
@ -218,22 +218,15 @@ static void emit_clip_rect_quads(struct intel_context *intel,
|
|||
{
|
||||
GLuint i;
|
||||
|
||||
for (i = 0; i < intel->numClipRects; i++) {
|
||||
drm_clip_rect_t rect;
|
||||
|
||||
if (intel_intersect_cliprects(&rect,
|
||||
clear,
|
||||
&intel->pClipRects[i]))
|
||||
{
|
||||
intel_meta_draw_quad(intel,
|
||||
rect.x1, rect.x2,
|
||||
rect.y1, rect.y2,
|
||||
0,
|
||||
intel->ClearColor,
|
||||
0, 0, 0, 0,
|
||||
INTEL_BATCH_NO_CLIPRECTS);
|
||||
}
|
||||
}
|
||||
/* XXX: Using INTEL_BATCH_NO_CLIPRECTS here is dangerous as the
|
||||
* drawing origin may not be correctly emitted.
|
||||
*/
|
||||
intel_meta_draw_quad(intel,
|
||||
clear->x1, clear->x2,
|
||||
clear->y1, clear->y2,
|
||||
0,
|
||||
intel->ClearColor,
|
||||
0, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -170,8 +170,7 @@ static GLboolean do_texture_copypixels( GLcontext *ctx,
|
|||
0, /* XXX: what z value? */
|
||||
0x00ff00ff,
|
||||
srcx, srcx+width,
|
||||
srcy, srcy+height,
|
||||
INTEL_BATCH_CLIPRECTS);
|
||||
srcy, srcy+height);
|
||||
}
|
||||
|
||||
out:
|
||||
|
|
|
|||
|
|
@ -173,8 +173,7 @@ static GLboolean do_texture_drawpixels( GLcontext *ctx,
|
|||
- ctx->Current.RasterPos[2] * .5,
|
||||
0x00ff00ff,
|
||||
srcx, srcx+width,
|
||||
srcy+height, srcy,
|
||||
INTEL_BATCH_CLIPRECTS);
|
||||
srcy+height, srcy);
|
||||
}
|
||||
|
||||
out:
|
||||
|
|
|
|||
|
|
@ -985,8 +985,7 @@ void intel_meta_draw_quad(struct intel_context *intel,
|
|||
GLfloat z,
|
||||
GLuint color,
|
||||
GLfloat s0, GLfloat s1,
|
||||
GLfloat t0, GLfloat t1,
|
||||
GLuint flags)
|
||||
GLfloat t0, GLfloat t1)
|
||||
{
|
||||
union fi *vb;
|
||||
|
||||
|
|
@ -997,7 +996,10 @@ void intel_meta_draw_quad(struct intel_context *intel,
|
|||
|
||||
intel->vtbl.emit_state( intel );
|
||||
|
||||
intelStartInlinePrimitive( intel, PRIM3D_TRIFAN, flags );
|
||||
/* All 3d primitives should be emitted with INTEL_BATCH_CLIPRECTS,
|
||||
* otherwise the drawing origin (DR4) might not be set correctly.
|
||||
*/
|
||||
intelStartInlinePrimitive( intel, PRIM3D_TRIFAN, INTEL_BATCH_CLIPRECTS );
|
||||
vb = (union fi *)intelExtendInlinePrimitive( intel, 4 * 6 );
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -57,8 +57,7 @@ void intel_meta_draw_quad(struct intel_context *intel,
|
|||
GLfloat z,
|
||||
GLuint color,
|
||||
GLfloat s0, GLfloat s1,
|
||||
GLfloat t0, GLfloat t1,
|
||||
GLuint flags );
|
||||
GLfloat t0, GLfloat t1);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue