vl: Adapt to dri changes.

This commit is contained in:
Younes Manton 2010-04-24 15:37:25 -04:00
parent 356473121c
commit f64d0cf524
7 changed files with 30 additions and 30 deletions

View file

@ -1,6 +1,7 @@
#include "pipe/p_screen.h"
#include "nv40_context.h"
#include "nv40_video_context.h"
#include "nv40_screen.h"
#define NV4X_GRCLASS4097_CHIPSETS 0x00000baf
@ -199,6 +200,7 @@ nv40_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
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);

View file

@ -28,14 +28,19 @@
#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,

View file

@ -30,12 +30,9 @@
#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

View file

@ -86,8 +86,13 @@ struct pipe_screen {
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.

View file

@ -358,18 +358,18 @@ vl_video_create(struct vl_screen *vscreen,
/* 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);

View file

@ -15,7 +15,7 @@ INCLUDES = $(DRIVER_INCLUDES) \
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
@ -23,13 +23,7 @@ OBJECTS = $(C_SOURCES:.c=.o) $(TOP)/src/gallium/state_trackers/xorg/xvmc/*.o
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 $@

View file

@ -12,9 +12,6 @@ DRIVER_DEFINES = $(shell pkg-config libdrm libdrm_nouveau --cflags-only-other)
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 \