gallium: add get_sample_position interface
authorDave Airlie <airlied@redhat.com>
Sun, 3 Mar 2013 20:11:07 +0000 (06:11 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 11 Apr 2013 20:09:28 +0000 (21:09 +0100)
This is to be used to implement glGet GL_SAMPLE_POSITION.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/include/pipe/p_context.h

index 7ed946e2ca957cd9fcba7477c5e6b512aaf96165..da1f5a88a6425ce4669cc4782a379343e6fe580b 100644 (file)
@@ -520,6 +520,19 @@ struct pipe_context {
                        const uint *block_layout, const uint *grid_layout,
                        uint32_t pc, const void *input);
    /*@}*/
+
+   /**
+    * Get sample position for an individual sample point.
+    *
+    * \param sample_count - total number of samples
+    * \param sample_index - sample to get the position values for
+    * \param out_value - return value of 2 floats for x and y position for
+    *                    requested sample.
+    */
+   void (*get_sample_position)(struct pipe_context *context,
+                               unsigned sample_count,
+                               unsigned sample_index,
+                               float *out_value);
 };