#include "xmlpool.h"
#include "dri_screen.h"
-#include "dri_context.h"
-#include "dri_drawable.h"
-#include "dri1_helper.h"
#include "util/u_inlines.h"
#include "pipe/p_screen.h"
*/
void
dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen,
- const __GLcontextModes *mode)
+ const struct gl_config *mode)
{
memset(stvis, 0, sizeof(*stvis));
static boolean
dri_get_egl_image(struct st_manager *smapi,
- struct st_context_iface *stctxi,
void *egl_image,
struct st_egl_image *stimg)
{
- struct dri_context *ctx =
- (struct dri_context *)stctxi->st_manager_private;
- struct dri_screen *screen = dri_screen(ctx->sPriv);
+ struct dri_screen *screen = (struct dri_screen *)smapi;
__DRIimage *img = NULL;
if (screen->lookup_egl_image) {
- img = screen->lookup_egl_image(ctx, egl_image);
+ img = screen->lookup_egl_image(screen, egl_image);
}
if (!img)
void
dri_destroy_screen_helper(struct dri_screen * screen)
{
- dri1_destroy_pipe_context(screen);
-
if (screen->st_api && screen->st_api->destroy)
screen->st_api->destroy(screen->st_api);
screen->base.get_egl_image = dri_get_egl_image;
screen->base.get_param = dri_get_param;
- screen->st_api = st_gl_api_create();
+ screen->st_api = st_gl_api_create();
if (!screen->st_api)
return NULL;
+ if(pscreen->get_param(pscreen, PIPE_CAP_NPOT_TEXTURES))
+ screen->target = PIPE_TEXTURE_2D;
+ else
+ screen->target = PIPE_TEXTURE_RECT;
+
driParseOptionInfo(&screen->optionCache,
__driConfigOptions, __driNConfigOptions);