~ubuntu-branches/ubuntu/precise/mesa/precise-updates

« back to all changes in this revision

Viewing changes to src/gallium/include/state_tracker/st_api.h

  • Committer: Package Import Robot
  • Author(s): Robert Hooker
  • Date: 2012-02-02 12:05:48 UTC
  • mfrom: (1.7.1) (3.3.27 sid)
  • Revision ID: package-import@ubuntu.com-20120202120548-nvkma85jq0h4coix
Tags: 8.0~rc2-0ubuntu4
Drop drisearchdir handling, it is no longer needed with multiarch
and dri-alternates being removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
 */
58
58
enum st_profile_type
59
59
{
60
 
   ST_PROFILE_DEFAULT,
61
 
   ST_PROFILE_OPENGL_CORE,
62
 
   ST_PROFILE_OPENGL_ES1,
63
 
   ST_PROFILE_OPENGL_ES2
 
60
   ST_PROFILE_DEFAULT,                  /**< OpenGL compatibility profile */
 
61
   ST_PROFILE_OPENGL_CORE,              /**< OpenGL 3.2+ core profile */
 
62
   ST_PROFILE_OPENGL_ES1,               /**< OpenGL ES 1.x */
 
63
   ST_PROFILE_OPENGL_ES2                /**< OpenGL ES 2.0 */
64
64
};
65
65
 
66
66
/* for profile_mask in st_api */
71
71
 
72
72
/**
73
73
 * New context flags for GL 3.0 and beyond.
74
 
 */
75
 
#define ST_CONTEXT_FLAG_CORE_PROFILE        (1 << 0)
76
 
#define ST_CONTEXT_FLAG_COMPATIBLE_PROFILE  (1 << 1)
77
 
#define ST_CONTEXT_FLAG_FORWARD_COMPATIBLE  (1 << 2)
78
 
#define ST_CONTEXT_FLAG_DEBUG               (1 << 3)
79
 
#define ST_CONTEXT_FLAG_ROBUST_ACCESS       (1 << 4)
 
74
 *
 
75
 * Profile information (core vs. compatibilty for OpenGL 3.2+) is communicated
 
76
 * through the \c st_profile_type, not through flags.
 
77
 */
 
78
#define ST_CONTEXT_FLAG_DEBUG               (1 << 0)
 
79
#define ST_CONTEXT_FLAG_FORWARD_COMPATIBLE  (1 << 1)
 
80
#define ST_CONTEXT_FLAG_ROBUST_ACCESS       (1 << 2)
 
81
 
 
82
/**
 
83
 * Reasons that context creation might fail.
 
84
 */
 
85
enum st_context_error {
 
86
   ST_CONTEXT_SUCCESS = 0,
 
87
   ST_CONTEXT_ERROR_NO_MEMORY,
 
88
   ST_CONTEXT_ERROR_BAD_API,
 
89
   ST_CONTEXT_ERROR_BAD_VERSION,
 
90
   ST_CONTEXT_ERROR_BAD_FLAG,
 
91
   ST_CONTEXT_ERROR_UNKNOWN_ATTRIBUTE,
 
92
   ST_CONTEXT_ERROR_UNKNOWN_FLAG
 
93
};
80
94
 
81
95
/**
82
96
 * Used in st_context_iface->teximage.
253
267
struct st_framebuffer_iface
254
268
{
255
269
   /**
 
270
    * Atomic stamp which changes when framebuffers need to be updated.
 
271
    */
 
272
 
 
273
   int32_t stamp;
 
274
 
 
275
   /**
256
276
    * Available for the state tracker manager to use.
257
277
    */
258
278
   void *st_manager_private;
315
335
   void (*destroy)(struct st_context_iface *stctxi);
316
336
 
317
337
   /**
318
 
    * Invalidate the current textures that was taken from a framebuffer.
319
 
    *
320
 
    * The state tracker manager calls this function to let the rendering
321
 
    * context know that it should update the textures it got from
322
 
    * st_framebuffer_iface::validate.  It should do so at the latest time possible.
323
 
    * Possible right before sending triangles to the pipe context.
324
 
    *
325
 
    * For certain platforms this function might be called from a thread other
326
 
    * than the thread that the context is currently bound in, and must
327
 
    * therefore be thread safe. But it is the state tracker manager's
328
 
    * responsibility to make sure that the framebuffer is bound to the context
329
 
    * and the API context is current for the duration of this call.
330
 
    *
331
 
    * Thus reducing the sync primitive needed to a single atomic flag.
332
 
    */
333
 
   void (*notify_invalid_framebuffer)(struct st_context_iface *stctxi,
334
 
                                      struct st_framebuffer_iface *stfbi);
335
 
 
336
 
   /**
337
338
    * Flush all drawing from context to the pipe also flushes the pipe.
338
339
    */
339
340
   void (*flush)(struct st_context_iface *stctxi, unsigned flags,
446
447
   struct st_context_iface *(*create_context)(struct st_api *stapi,
447
448
                                              struct st_manager *smapi,
448
449
                                              const struct st_context_attribs *attribs,
 
450
                                              enum st_context_error *error,
449
451
                                              struct st_context_iface *stsharei);
450
452
 
451
453
   /**