#include "pipe/p_screen.h"
#include "nv40_context.h"
+#include "nv40_video_context.h"
#include "nv40_screen.h"
#define NV4X_GRCLASS4097_CHIPSETS 0x00000baf
pscreen->get_paramf = nv40_screen_get_paramf;
pscreen->is_format_supported = nv40_screen_surface_format_supported;
pscreen->context_create = nv40_create;
+ pscreen->video_context_create = nv40_video_create;
nv40_screen_init_miptree_functions(pscreen);
nv40_screen_init_transfer_functions(pscreen);
#include "nv40_video_context.h"
#include <softpipe/sp_video_context.h>
-
struct pipe_video_context *
-nv40_video_create(struct pipe_context *pipe, enum pipe_video_profile profile,
+nv40_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
enum pipe_video_chroma_format chroma_format,
- unsigned width, unsigned height,
- unsigned pvctx_id)
+ unsigned width, unsigned height, void *priv)
{
- assert(pipe);
+ struct pipe_context *pipe;
+
+ assert(screen);
+
+ pipe = screen->context_create(screen, priv);
+ if (!pipe)
+ return NULL;
+
return sp_video_create_ex(pipe, profile, chroma_format, width, height,
VL_MPEG12_MC_RENDERER_BUFFER_PICTURE,
VL_MPEG12_MC_RENDERER_EMPTY_BLOCK_XFER_ONE,
#include <pipe/p_video_context.h>
-struct pipe_context;
-
-struct pipe_video_context*
-nv40_video_create(struct pipe_context *pipe, enum pipe_video_profile profile,
+struct pipe_video_context *
+nv40_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
enum pipe_video_chroma_format chroma_format,
- unsigned width, unsigned height,
- unsigned pvctx_id);
+ unsigned width, unsigned height, void *priv);
#endif
float (*get_paramf)( struct pipe_screen *, int param );
struct pipe_context * (*context_create)( struct pipe_screen *,
- void *priv );
-
+ void *priv );
+
+ struct pipe_video_context * (*video_context_create)( struct pipe_screen *screen,
+ enum pipe_video_profile profile,
+ enum pipe_video_chroma_format chroma_format,
+ unsigned width, unsigned height, void *priv );
+
/**
* Check if the given pipe_format is supported as a texture or
* drawing surface.
/* XXX: Is default visual correct/sufficient here? */
driCreateContext(vl_dri_scrn->dri_screen, vl_dri_scrn->visual, &vl_dri_ctx->dri_context);
- if (!vl_dri_scrn->api->create_video_context) {
+ if (!vscreen->pscreen->video_context_create) {
debug_printf("[G3DVL] No video support found on %s/%s.\n",
- vl_dri_scrn->base.pscreen->get_vendor(vl_dri_scrn->base.pscreen),
- vl_dri_scrn->base.pscreen->get_name(vl_dri_scrn->base.pscreen));
+ vscreen->pscreen->get_vendor(vscreen->pscreen),
+ vscreen->pscreen->get_name(vscreen->pscreen));
FREE(vl_dri_ctx);
return NULL;
}
- vl_dri_ctx->base.vpipe = vl_dri_scrn->api->create_video_context(vl_dri_scrn->api,
- vscreen->pscreen,
+ vl_dri_ctx->base.vpipe = vscreen->pscreen->video_context_create(vscreen->pscreen,
profile, chroma_format,
- width, height);
+ width, height,
+ vl_dri_ctx->dri_context);
if (!vl_dri_ctx->base.vpipe) {
FREE(vl_dri_ctx);
DEFINES += $(DRIVER_DEFINES) \
-DGALLIUM_SOFTPIPE \
- -DGALLIUM_TRACE
+ -DGALLIUM_TRACE
# XXX: Hack, if we include libxvmctracker.a in LIBS none of the symbols are
# pulled in by the linker because xsp_winsys.c doesn't refer to them
LIBS = $(TOP)/src/gallium/winsys/g3dvl/dri/libvldri.a \
$(PIPE_DRIVERS) \
- $(TOP)/src/gallium/auxiliary/vl/libvl.a \
- $(TOP)/src/gallium/auxiliary/draw/libdraw.a \
- $(TOP)/src/gallium/auxiliary/tgsi/libtgsi.a \
- $(TOP)/src/gallium/auxiliary/translate/libtranslate.a \
- $(TOP)/src/gallium/auxiliary/cso_cache/libcso_cache.a \
- $(TOP)/src/gallium/auxiliary/rtasm/librtasm.a \
- $(TOP)/src/gallium/auxiliary/util/libutil.a
+ $(TOP)/src/gallium/auxiliary/libgallium.a
.c.o:
$(CC) -c $(INCLUDES) $(DEFINES) $(CFLAGS) $< -o $@
PIPE_DRIVERS = \
$(TOP)/src/gallium/winsys/drm/nouveau/drm/libnouveaudrm.a \
- $(TOP)/src/gallium/drivers/nv04/libnv04.a \
- $(TOP)/src/gallium/drivers/nv10/libnv10.a \
- $(TOP)/src/gallium/drivers/nv20/libnv20.a \
$(TOP)/src/gallium/drivers/nv30/libnv30.a \
$(TOP)/src/gallium/drivers/nv40/libnv40.a \
$(TOP)/src/gallium/drivers/nv50/libnv50.a \