struct pipe_blend_color
{
- /**
- * Making the color array explicitly 16-byte aligned provides a hint to
- * compilers to make more efficient auto-vectorization optimizations.
- * The actual performance gains from vectorizing the blend color array are
- * fairly minimal, if any, but the alignment is necessary to work around
- * buggy vectorization in some compilers which fail to generate the correct
- * unaligned accessors resulting in a segfault. Specifically several
- * versions of the Intel compiler are known to be affected but it's likely
- * others are as well.
- */
- PIPE_ALIGN_VAR(16) float color[4];
+ float color[4];
};
unsigned last_level:8; /**< last mipmap level to use */
} tex;
struct {
- unsigned first_element;
- unsigned last_element;
+ unsigned offset; /**< offset in bytes */
+ unsigned size; /**< size of the readable sub-range in bytes */
} buf;
} u;
unsigned swizzle_r:3; /**< PIPE_SWIZZLE_x for red component */
unsigned level:8; /**< mipmap level to use */
} tex;
struct {
- unsigned first_element;
- unsigned last_element;
+ unsigned offset; /**< offset in bytes */
+ unsigned size; /**< size of the accessible sub-range in bytes */
} buf;
} u;
};
unsigned bind; /**< bitmask of PIPE_BIND_x */
unsigned flags; /**< bitmask of PIPE_RESOURCE_FLAG_x */
+
+ /**
+ * For planar images, ie. YUV EGLImage external, etc, pointer to the
+ * next plane.
+ */
+ struct pipe_resource *next;
};
*/
struct pipe_debug_callback
{
+ /**
+ * When set to \c true, the callback may be called asynchronously from a
+ * driver-created thread.
+ */
+ bool async;
+
/**
* Callback for the driver to report debug/performance/etc information back
* to the state tracker.
void *data;
};
+/**
+ * Structure that contains a callback for device reset messages from the driver
+ * back to the state tracker.
+ *
+ * The callback must not be called from driver-created threads.
+ */
+struct pipe_device_reset_callback
+{
+ /**
+ * Callback for the driver to report when a device reset is detected.
+ *
+ * \param data user-supplied data pointer
+ * \param status PIPE_*_RESET
+ */
+ void (*reset)(void *data, enum pipe_reset_status status);
+
+ void *data;
+};
+
/**
* Information about memory usage. All sizes are in kilobytes.
*/