summaryrefslogtreecommitdiff
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-04-17 15:56:46 -0600
committerBrian <brian@yutani.localnet.net>2007-04-17 15:56:46 -0600
commit04bda46739beb0dab7c8820bdbe67136470d42be (patch)
treeeafeeed40432d79fde7cd7e0608f7bd76a1b903c /src/mesa/swrast
parentd2d86a3f0b38716196ea2b3ffa4cbbd0420de1b3 (diff)
Enable texture sampling for vertex programs/shaders.
This is a bit of a hack for now because the tnl module is using the swrast module to fetch texels. The texture fetch/filter code should probably be moved into the main/ module since it doesn't really depend upon other swrast code.
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_context.c4
-rw-r--r--src/mesa/swrast/s_context.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index e113adb689..c8efb962d0 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -488,7 +488,7 @@ _swrast_invalidate_state( GLcontext *ctx, GLbitfield new_state )
}
-static void
+void
_swrast_update_texture_samplers(GLcontext *ctx)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -617,7 +617,7 @@ _swrast_validate_derived( GLcontext *ctx )
_NEW_PROGRAM))
_swrast_update_fragment_program( ctx, swrast->NewState );
- if (swrast->NewState & _NEW_TEXTURE)
+ if (swrast->NewState & (_NEW_TEXTURE | _NEW_PROGRAM))
_swrast_update_texture_samplers( ctx );
if (swrast->NewState & (_NEW_TEXTURE | _NEW_PROGRAM))
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h
index 3a9a48922e..1cf3813fd3 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -228,6 +228,9 @@ typedef struct
extern void
_swrast_validate_derived( GLcontext *ctx );
+extern void
+_swrast_update_texture_samplers(GLcontext *ctx);
+
#define SWRAST_CONTEXT(ctx) ((SWcontext *)ctx->swrast_context)