From 9ed0686e8e6157ce38c9fa284cd7399289a2e698 Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Tue, 3 Aug 2010 06:24:22 +0200 Subject: nvfx: new 2D: use new 2D engine in Gallium This patch implements nv04_surface_copy/fill using the new 2D engine module. It supports falling back to the 3D engine using the u_blitter module, which will be added in a later patch. Also adds support for using the 3D engine, reusing the u_blitter module created for r300. This is used for unswizzling and copies between swizzled surfaces. --- src/gallium/drivers/nvfx/nvfx_miptree.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src/gallium/drivers/nvfx/nvfx_miptree.c') diff --git a/src/gallium/drivers/nvfx/nvfx_miptree.c b/src/gallium/drivers/nvfx/nvfx_miptree.c index 27bfa24b28..b8ec726624 100644 --- a/src/gallium/drivers/nvfx/nvfx_miptree.c +++ b/src/gallium/drivers/nvfx/nvfx_miptree.c @@ -8,8 +8,7 @@ #include "state_tracker/drm_driver.h" #include "nouveau/nouveau_winsys.h" #include "nouveau/nouveau_screen.h" -#include "nv04_surface_2d.h" -#include "nvfx_context.h" +#include "nvfx_screen.h" #include "nvfx_resource.h" #include "nvfx_transfer.h" @@ -231,9 +230,9 @@ nvfx_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_resource *pt, unsigned face, unsigned level, unsigned zslice, unsigned flags) { - struct nv04_surface *ns; + struct nvfx_surface *ns; - ns = CALLOC_STRUCT(nv04_surface); + ns = CALLOC_STRUCT(nvfx_surface); if (!ns) return NULL; pipe_resource_reference(&ns->base.texture, pt); @@ -254,15 +253,6 @@ nvfx_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_resource *pt, void nvfx_miptree_surface_del(struct pipe_surface *ps) { - struct nv04_surface* ns = (struct nv04_surface*)ps; - if(ns->backing) - { - struct nvfx_screen* screen = (struct nvfx_screen*)ps->texture->screen; - if(1 /*ns->backing->base.usage & PIPE_BIND_BLIT_DESTINATION*/) - screen->eng2d->copy(screen->eng2d, &ns->backing->base, 0, 0, ps, 0, 0, ns->base.width, ns->base.height); - nvfx_miptree_surface_del(&ns->backing->base); - } - pipe_resource_reference(&ps->texture, NULL); FREE(ps); } -- cgit v1.2.3