diff options
author | Keith Whitwell <[email protected]> | 2005-05-04 11:44:44 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2005-05-04 11:44:44 +0000 |
commit | 47b29f511a8e917c65536fde90397d54d2ad23d3 (patch) | |
tree | c8db61607defe55b4540af3e4614df9831d2021d /src/mesa/swrast/s_triangle.c | |
parent | c3f764f7bb5a0571ddb0bc8b37aff9d663188d79 (diff) |
Add a facility to route all rasterization through a fragment program
which is automatically generated to match the current texture environment
state. Introduces a new value ctx->FragmentProgram._Active which is
true when either _Enabled is true or there is such a fragment program
ready to run.
To test out on a driver running the software rasterizer, set
MESA_TEX_PROG=t in the environment. It goes without saying that performance
is lower for the software rasterizer in this mode.
Diffstat (limited to 'src/mesa/swrast/s_triangle.c')
-rw-r--r-- | src/mesa/swrast/s_triangle.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c index c236e525709..4533980455e 100644 --- a/src/mesa/swrast/s_triangle.c +++ b/src/mesa/swrast/s_triangle.c @@ -1075,7 +1075,7 @@ _swrast_choose_triangle( GLcontext *ctx ) } } - if (ctx->Texture._EnabledCoordUnits || ctx->FragmentProgram._Enabled) { + if (ctx->Texture._EnabledCoordUnits || ctx->FragmentProgram._Active) { /* Ugh, we do a _lot_ of tests to pick the best textured tri func */ const struct gl_texture_object *texObj2D; const struct gl_texture_image *texImg; @@ -1090,7 +1090,7 @@ _swrast_choose_triangle( GLcontext *ctx ) /* First see if we can use an optimized 2-D texture function */ if (ctx->Texture._EnabledCoordUnits == 0x1 - && !ctx->FragmentProgram._Enabled + && !ctx->FragmentProgram._Active && ctx->Texture.Unit[0]._ReallyEnabled == TEXTURE_2D_BIT && texObj2D->WrapS == GL_REPEAT && texObj2D->WrapT == GL_REPEAT |