[g3dvl] remove pipe_video_context from nouveau
This commit is contained in:
@@ -24,8 +24,7 @@ C_SOURCES = \
|
||||
nvfx_surface.c \
|
||||
nvfx_transfer.c \
|
||||
nvfx_vbo.c \
|
||||
nvfx_vertprog.c \
|
||||
nvfx_video_context.c
|
||||
nvfx_vertprog.c
|
||||
|
||||
LIBRARY_INCLUDES = \
|
||||
$(LIBDRM_CFLAGS) \
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include "draw/draw_context.h"
|
||||
#include "pipe/p_defines.h"
|
||||
#include "util/u_framebuffer.h"
|
||||
#include "vl/vl_decoder.h"
|
||||
#include "vl/vl_video_buffer.h"
|
||||
|
||||
#include "nvfx_context.h"
|
||||
#include "nvfx_screen.h"
|
||||
@@ -88,6 +90,9 @@ nvfx_create(struct pipe_screen *pscreen, void *priv)
|
||||
nvfx->pipe.clear = nvfx_clear;
|
||||
nvfx->pipe.flush = nvfx_flush;
|
||||
|
||||
nvfx->pipe.create_video_decoder = vl_create_decoder;
|
||||
nvfx->pipe.create_video_buffer = vl_video_buffer_create;
|
||||
|
||||
nvfx->is_nv4x = screen->is_nv4x;
|
||||
nvfx->use_nv4x = screen->use_nv4x;
|
||||
/* TODO: it seems that nv30 might have fixed function clipping usable with vertex programs
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
#include "util/u_format.h"
|
||||
#include "util/u_format_s3tc.h"
|
||||
#include "util/u_simple_screen.h"
|
||||
#include "vl/vl_video_buffer.h"
|
||||
|
||||
#include "nouveau/nouveau_screen.h"
|
||||
#include "nouveau/nv_object.xml.h"
|
||||
#include "nvfx_context.h"
|
||||
#include "nvfx_video_context.h"
|
||||
#include "nvfx_screen.h"
|
||||
#include "nvfx_resource.h"
|
||||
#include "nvfx_tex.h"
|
||||
@@ -207,6 +207,19 @@ nvfx_screen_get_paramf(struct pipe_screen *pscreen, enum pipe_cap param)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
nvfx_screen_get_video_param(struct pipe_screen *screen,
|
||||
enum pipe_video_profile profile,
|
||||
enum pipe_video_cap param)
|
||||
{
|
||||
switch (param) {
|
||||
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
|
||||
return 0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static boolean
|
||||
nvfx_screen_is_format_supported(struct pipe_screen *pscreen,
|
||||
enum pipe_format format,
|
||||
@@ -467,9 +480,10 @@ nvfx_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
|
||||
pscreen->get_param = nvfx_screen_get_param;
|
||||
pscreen->get_shader_param = nvfx_screen_get_shader_param;
|
||||
pscreen->get_paramf = nvfx_screen_get_paramf;
|
||||
pscreen->get_video_param = nvfx_screen_get_video_param;
|
||||
pscreen->is_format_supported = nvfx_screen_is_format_supported;
|
||||
pscreen->is_video_format_supported = vl_video_buffer_is_format_supported;
|
||||
pscreen->context_create = nvfx_create;
|
||||
pscreen->video_context_create = nvfx_video_create;
|
||||
|
||||
ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 0, 4096, &screen->fence);
|
||||
if (ret) {
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2009 Younes Manton.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sub license, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the
|
||||
* next paragraph) shall be included in all copies or substantial portions
|
||||
* of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
* IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#include "nvfx_video_context.h"
|
||||
#include "util/u_video.h"
|
||||
#include <vl/vl_context.h>
|
||||
|
||||
struct pipe_video_context *
|
||||
nvfx_video_create(struct pipe_screen *screen, void *priv)
|
||||
{
|
||||
struct pipe_context *pipe;
|
||||
|
||||
assert(screen);
|
||||
|
||||
pipe = screen->context_create(screen, priv);
|
||||
if (!pipe)
|
||||
return NULL;
|
||||
|
||||
return vl_create_context(pipe, true);
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2009 Younes Manton.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sub license, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the
|
||||
* next paragraph) shall be included in all copies or substantial portions
|
||||
* of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
* IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef __NVFX_VIDEO_CONTEXT_H__
|
||||
#define __NVFX_VIDEO_CONTEXT_H__
|
||||
|
||||
#include <pipe/p_video_context.h>
|
||||
|
||||
struct pipe_video_context *
|
||||
nvfx_video_create(struct pipe_screen *screen, void *priv);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user