aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_rasterpos.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_cb_rasterpos.c')
-rw-r--r--src/mesa/state_tracker/st_cb_rasterpos.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_rasterpos.c b/src/mesa/state_tracker/st_cb_rasterpos.c
index b9997dacfd2..747b41464ae 100644
--- a/src/mesa/state_tracker/st_cb_rasterpos.c
+++ b/src/mesa/state_tracker/st_cb_rasterpos.c
@@ -39,6 +39,7 @@
#include "main/imports.h"
#include "main/macros.h"
#include "main/feedback.h"
+#include "main/rastpos.h"
#include "st_context.h"
#include "st_atom.h"
@@ -224,6 +225,15 @@ st_RasterPos(struct gl_context *ctx, const GLfloat v[4])
struct rastpos_stage *rs;
const struct gl_client_array **saved_arrays = ctx->Array._DrawArrays;
+ if (ctx->VertexProgram._Current == NULL ||
+ ctx->VertexProgram._Current == ctx->VertexProgram._TnlProgram) {
+ /* No vertex shader/program is enabled, used the simple/fast fixed-
+ * function implementation of RasterPos.
+ */
+ _mesa_RasterPos(ctx, v);
+ return;
+ }
+
if (st->rastpos_stage) {
/* get rastpos stage info */
rs = rastpos_stage(st->rastpos_stage);