X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Finclude%2Fstate_tracker%2Fst_api.h;h=21f2d639b1424d71ffa9f6c2f029ef3d9b401b6a;hb=2c3fb4ecce27f4c2468892241216a06fc77143c4;hp=70ad215bfce57f18321d8dcf220c5527127cb453;hpb=880e3fb09b538f6f0b6fad2db7e0e10e9df43555;p=mesa.git diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h index 70ad215bfce..21f2d639b14 100644 --- a/src/gallium/include/state_tracker/st_api.h +++ b/src/gallium/include/state_tracker/st_api.h @@ -42,14 +42,6 @@ * tracker managers. */ -/** - * The entry points of the state trackers. - */ -#define ST_MODULE_OPENGL_SYMBOL "st_module_OpenGL" -#define ST_MODULE_OPENGL_ES1_SYMBOL "st_module_OpenGL_ES1" -#define ST_MODULE_OPENGL_ES2_SYMBOL "st_module_OpenGL_ES2" -#define ST_MODULE_OPENVG_SYMBOL "st_module_OpenVG" - /** * The supported rendering API of a state tracker. */ @@ -69,7 +61,7 @@ enum st_texture_type { ST_TEXTURE_1D, ST_TEXTURE_2D, ST_TEXTURE_3D, - ST_TEXTURE_RECT, + ST_TEXTURE_RECT }; /** @@ -110,7 +102,7 @@ enum st_context_resource_type { ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_CUBE_MAP_POSITIVE_Z, ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_CUBE_MAP_NEGATIVE_Z, ST_CONTEXT_RESOURCE_OPENGL_RENDERBUFFER, - ST_CONTEXT_RESOURCE_OPENVG_PARENT_IMAGE, + ST_CONTEXT_RESOURCE_OPENVG_PARENT_IMAGE }; /** @@ -119,7 +111,7 @@ enum st_context_resource_type { typedef void (*st_proc_t)(void); struct pipe_context; -struct pipe_texture; +struct pipe_resource; struct pipe_fence_handle; /** @@ -132,7 +124,7 @@ struct st_context_resource void *resource; /* this is owned by the caller */ - struct pipe_texture *texture; + struct pipe_resource *texture; }; /** @@ -145,7 +137,7 @@ struct st_egl_image void *egl_image; /* this is owned by the caller */ - struct pipe_texture *texture; + struct pipe_resource *texture; unsigned face; unsigned level; @@ -239,7 +231,7 @@ struct st_framebuffer_iface boolean (*validate)(struct st_framebuffer_iface *stfbi, const enum st_attachment_type *statts, unsigned count, - struct pipe_texture **out); + struct pipe_resource **out); }; /** @@ -292,7 +284,7 @@ struct st_context_iface */ boolean (*teximage)(struct st_context_iface *stctxi, enum st_texture_type target, int level, enum pipe_format internal_format, - struct pipe_texture *tex, boolean mipmap); + struct pipe_resource *tex, boolean mipmap); /** * Used to implement glXCopyContext. @@ -378,17 +370,6 @@ struct st_api struct st_context_iface *(*get_current)(struct st_api *stapi); }; -/** - * Represent a state tracker. - * - * This is the entry point of a state tracker. - */ -struct st_module -{ - enum st_api_type api; - struct st_api *(*create_api)(void); -}; - /** * Return true if the visual has the specified buffers. */ @@ -399,9 +380,17 @@ st_visual_have_buffers(const struct st_visual *visual, unsigned mask) } /* these symbols may need to be dynamically lookup up */ -extern PUBLIC const struct st_module st_module_OpenGL; -extern PUBLIC const struct st_module st_module_OpenGL_ES1; -extern PUBLIC const struct st_module st_module_OpenGL_ES2; -extern PUBLIC const struct st_module st_module_OpenVG; +extern PUBLIC struct st_api * st_api_create_OpenGL(void); +extern PUBLIC struct st_api * st_api_create_OpenGL_ES1(void); +extern PUBLIC struct st_api * st_api_create_OpenGL_ES2(void); +extern PUBLIC struct st_api * st_api_create_OpenVG(void); + +/** + * The entry points of the state trackers. + */ +#define ST_CREATE_OPENGL_SYMBOL "st_api_create_OpenGL" +#define ST_CREATE_OPENGL_ES1_SYMBOL "st_api_create_OpenGL_ES1" +#define ST_CREATE_OPENGL_ES2_SYMBOL "st_api_create_OpenGL_ES2" +#define ST_CREATE_OPENVG_SYMBOL "st_api_create_OpenVG" #endif /* _ST_API_H_ */