mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-14 00:00:32 +01:00
mesa: remove DD_TRI_OFFSET flag
Make it a local macro for the i915 driver. v2: use conditional operator instead of bit shifting Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
c6a81448f8
commit
dfb1474aac
4 changed files with 5 additions and 26 deletions
|
|
@ -944,6 +944,7 @@ intelFastRenderClippedPoly(struct gl_context * ctx, const GLuint * elts, GLuint
|
|||
|
||||
|
||||
|
||||
#define DD_TRI_OFFSET (1 << 5)
|
||||
#define DD_LINE_STIPPLE (1 << 7)
|
||||
#define DD_POINT_ATTEN (1 << 9)
|
||||
|
||||
|
|
@ -956,6 +957,9 @@ intelChooseRenderState(struct gl_context * ctx)
|
|||
TNLcontext *tnl = TNL_CONTEXT(ctx);
|
||||
struct intel_context *intel = intel_context(ctx);
|
||||
GLuint flags = ctx->_TriangleCaps |
|
||||
((ctx->Polygon.OffsetPoint ||
|
||||
ctx->Polygon.OffsetLine ||
|
||||
ctx->Polygon.OffsetFill) ? DD_TRI_OFFSET : 0) |
|
||||
(ctx->Line.StippleFlag ? DD_LINE_STIPPLE : 0) |
|
||||
(ctx->Point._Attenuated ? DD_POINT_ATTEN : 0);
|
||||
const struct gl_fragment_program *fprog = ctx->FragmentProgram._Current;
|
||||
|
|
|
|||
|
|
@ -100,13 +100,12 @@ void
|
|||
_mesa_print_tri_caps( const char *name, GLuint flags )
|
||||
{
|
||||
_mesa_debug(NULL,
|
||||
"%s: (0x%x) %s%s%s%s%s\n",
|
||||
"%s: (0x%x) %s%s%s%s\n",
|
||||
name,
|
||||
flags,
|
||||
(flags & DD_TRI_LIGHT_TWOSIDE) ? "tri-light-twoside, " : "",
|
||||
(flags & DD_TRI_UNFILLED) ? "tri-unfilled, " : "",
|
||||
(flags & DD_TRI_STIPPLE) ? "tri-stipple, " : "",
|
||||
(flags & DD_TRI_OFFSET) ? "tri-offset, " : "",
|
||||
(flags & DD_TRI_SMOOTH) ? "tri-smooth, " : ""
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3171,7 +3171,6 @@ struct gl_matrix_stack
|
|||
#define DD_TRI_UNFILLED (1 << 2)
|
||||
#define DD_TRI_SMOOTH (1 << 3)
|
||||
#define DD_TRI_STIPPLE (1 << 4)
|
||||
#define DD_TRI_OFFSET (1 << 5)
|
||||
/*@}*/
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -314,22 +314,6 @@ update_twoside(struct gl_context *ctx)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Check polygon state and set DD_TRI_OFFSET
|
||||
* in ctx->_TriangleCaps if needed.
|
||||
*/
|
||||
static void
|
||||
update_polygon(struct gl_context *ctx)
|
||||
{
|
||||
ctx->_TriangleCaps &= ~DD_TRI_OFFSET;
|
||||
|
||||
if ( ctx->Polygon.OffsetPoint
|
||||
|| ctx->Polygon.OffsetLine
|
||||
|| ctx->Polygon.OffsetFill)
|
||||
ctx->_TriangleCaps |= DD_TRI_OFFSET;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update the ctx->_TriangleCaps bitfield.
|
||||
* XXX that bitfield should really go away someday!
|
||||
|
|
@ -353,10 +337,6 @@ update_tricaps(struct gl_context *ctx, GLbitfield new_state)
|
|||
if (ctx->Polygon.FrontMode != GL_FILL
|
||||
|| ctx->Polygon.BackMode != GL_FILL)
|
||||
ctx->_TriangleCaps |= DD_TRI_UNFILLED;
|
||||
if (ctx->Polygon.OffsetPoint ||
|
||||
ctx->Polygon.OffsetLine ||
|
||||
ctx->Polygon.OffsetFill)
|
||||
ctx->_TriangleCaps |= DD_TRI_OFFSET;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -426,9 +406,6 @@ _mesa_update_state_locked( struct gl_context *ctx )
|
|||
if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT))
|
||||
_mesa_update_draw_buffer_bounds( ctx );
|
||||
|
||||
if (new_state & _NEW_POLYGON)
|
||||
update_polygon( ctx );
|
||||
|
||||
if (new_state & _NEW_LIGHT)
|
||||
_mesa_update_lighting( ctx );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue