st/mesa: minor fix-up in st_GetSamplePosition()
authorBrian Paul <brianp@vmware.com>
Thu, 3 Jul 2014 18:01:09 +0000 (12:01 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 9 Jul 2014 12:43:25 +0000 (06:43 -0600)
If the driver doesn't implement get_sample_position(), let's return
some non-garbage values.

src/mesa/state_tracker/st_cb_msaa.c

index bbf2b2c5c464890e61db51002b2ecb4623f3754a..e9955b62b8f9adcaa5c027492b66487d7d537257 100644 (file)
@@ -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;
 }