summaryrefslogtreecommitdiff
path: root/src/mesa/pipe
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-07-25 12:15:02 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-07-25 12:15:02 -0600
commitd24e60a6b10ab3cb365e9c8f9dc0b36864bd485d (patch)
treeb0282054c593ddd99b4e2ad7d585082e80c3b609 /src/mesa/pipe
parenta502c08a255391311c64fa4c39d5026005206d2b (diff)
patch things up enough to allow texture sampling to work
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/tgsi/core/tgsi_exec.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/pipe/tgsi/core/tgsi_exec.c b/src/mesa/pipe/tgsi/core/tgsi_exec.c
index e0387b514d..db965ccbec 100644
--- a/src/mesa/pipe/tgsi/core/tgsi_exec.c
+++ b/src/mesa/pipe/tgsi/core/tgsi_exec.c
@@ -1,6 +1,15 @@
#include "tgsi_platform.h"
#include "tgsi_core.h"
+#define MESA 1
+#if MESA
+#include "main/context.h"
+#include "main/macros.h"
+#include "main/colormac.h"
+#include "swrast/swrast.h"
+#include "swrast/s_context.h"
+#endif
+
#define TILE_BOTTOM_LEFT 0
#define TILE_BOTTOM_RIGHT 1
#define TILE_TOP_LEFT 2
@@ -1039,6 +1048,10 @@ fetch_texel_1d( GLcontext *ctx,
lambdas[3] = lambda;
}
+ if (!swrast->TextureSample[unit]) {
+ _swrast_update_texture_samplers(ctx);
+ }
+
/* XXX use a float-valued TextureSample routine here!!! */
swrast->TextureSample[unit] (ctx,
ctx->Texture.Unit[unit]._Current,
@@ -1123,6 +1136,10 @@ fetch_texel_2d( GLcontext *ctx,
lambdas[3] = lambda;
}
+ if (!swrast->TextureSample[unit]) {
+ _swrast_update_texture_samplers(ctx);
+ }
+
/* XXX use a float-valued TextureSample routine here!!! */
swrast->TextureSample[unit](
ctx,
@@ -1214,6 +1231,10 @@ fetch_texel_3d( GLcontext *ctx,
lambdas[3] = lambda;
}
+ if (!swrast->TextureSample[unit]) {
+ _swrast_update_texture_samplers(ctx);
+ }
+
/* XXX use a float-valued TextureSample routine here!!! */
swrast->TextureSample[unit] (ctx,
ctx->Texture.Unit[unit]._Current,