From 301ffe7b26f1c8f68697626490b0e7f1c6aef65e Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 3 Jul 2014 12:01:09 -0600 Subject: [PATCH] st/mesa: minor fix-up in st_GetSamplePosition() If the driver doesn't implement get_sample_position(), let's return some non-garbage values. --- src/mesa/state_tracker/st_cb_msaa.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_msaa.c b/src/mesa/state_tracker/st_cb_msaa.c index bbf2b2c5c46..e9955b62b8f 100644 --- a/src/mesa/state_tracker/st_cb_msaa.c +++ b/src/mesa/state_tracker/st_cb_msaa.c @@ -40,7 +40,7 @@ static void st_GetSamplePosition(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint index, - GLfloat *outValue) + GLfloat *outPos) { struct st_context *st = st_context(ctx); @@ -48,7 +48,9 @@ st_GetSamplePosition(struct gl_context *ctx, if (st->pipe->get_sample_position) st->pipe->get_sample_position(st->pipe, (unsigned) fb->Visual.samples, - index, outValue); + index, outPos); + else + outPos[0] = outPos[1] = 0.5f; } -- 2.30.2