From a24031d50c6b4c584aae08316dc3c00e18e24b58 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 1 Oct 2007 13:55:16 -0600 Subject: [PATCH] don't crash in RasterPos if feedback not implemented yet --- src/mesa/state_tracker/st_cb_rasterpos.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_rasterpos.c b/src/mesa/state_tracker/st_cb_rasterpos.c index 661d155e6da..13580e400bd 100644 --- a/src/mesa/state_tracker/st_cb_rasterpos.c +++ b/src/mesa/state_tracker/st_cb_rasterpos.c @@ -101,7 +101,8 @@ setup_feedback(GLcontext *ctx) feedback.num_attribs++; } - pipe->set_feedback_state(pipe, &feedback); + if (pipe->set_feedback_state) + pipe->set_feedback_state(pipe, &feedback); } @@ -294,7 +295,8 @@ st_RasterPos(GLcontext *ctx, const GLfloat v[4]) pipe->winsys->buffer_data(pipe->winsys, fb_buf.buffer, fb_buf.size, NULL); /* data */ - pipe->set_feedback_buffer(pipe, 0, &fb_buf); + if (pipe->set_feedback_buffer) + pipe->set_feedback_buffer(pipe, 0, &fb_buf); } @@ -347,7 +349,8 @@ st_RasterPos(GLcontext *ctx, const GLfloat v[4]) pipe->winsys->buffer_reference(pipe->winsys, &fb_buf.buffer, NULL); /* restore pipe state */ - pipe->set_feedback_state(pipe, &st->state.feedback); + if (pipe->set_feedback_state) + pipe->set_feedback_state(pipe, &st->state.feedback); } -- 2.30.2