From: Brian Date: Mon, 1 Oct 2007 19:55:16 +0000 (-0600) Subject: don't crash in RasterPos if feedback not implemented yet X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a24031d50c6b4c584aae08316dc3c00e18e24b58;p=mesa.git don't crash in RasterPos if feedback not implemented yet --- 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); }