summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv40/nv40_miptree.c
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-02-20 18:37:43 +0100
committerYounes Manton <younes.m@gmail.com>2010-03-15 00:03:01 -0400
commitb8e56d4cddbd9c491b940e3ce5974c526802c752 (patch)
tree6ae0a1030c6a43c6596393b787cea3d7b7e23352 /src/gallium/drivers/nv40/nv40_miptree.c
parentd673c92810636dcc6de33d3618d494ce9f5717c1 (diff)
nv30, nv40: unify all structures and headers, except shaders
This patch unifies nv[34]0_screen.h, nv[34]0_context.h and nv[34]0_state.h The unified files are put in a new "nvfx" directory. nv30_context.h and nv40_context.h still exist to hold the function prototypes and include nvfx_context.h nv[34]0_screen.h and nv[34]0_state.h are deleted, replaced by the unified versions. nv40 includes some extra fields for swtnl and user clip planes support. These fields will be unused on nv30 until that functionality gets added to it too (by unification with nv40).
Diffstat (limited to 'src/gallium/drivers/nv40/nv40_miptree.c')
-rw-r--r--src/gallium/drivers/nv40/nv40_miptree.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gallium/drivers/nv40/nv40_miptree.c b/src/gallium/drivers/nv40/nv40_miptree.c
index 62e97bcea4..caec47058f 100644
--- a/src/gallium/drivers/nv40/nv40_miptree.c
+++ b/src/gallium/drivers/nv40/nv40_miptree.c
@@ -10,7 +10,7 @@
static void
-nv40_miptree_layout(struct nv40_miptree *mt)
+nv40_miptree_layout(struct nvfx_miptree *mt)
{
struct pipe_texture *pt = &mt->base;
uint width = pt->width0;
@@ -64,11 +64,11 @@ nv40_miptree_layout(struct nv40_miptree *mt)
static struct pipe_texture *
nv40_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
{
- struct nv40_miptree *mt;
+ struct nvfx_miptree *mt;
unsigned buf_usage = PIPE_BUFFER_USAGE_PIXEL |
NOUVEAU_BUFFER_USAGE_TEXTURE;
- mt = MALLOC(sizeof(struct nv40_miptree));
+ mt = MALLOC(sizeof(struct nvfx_miptree));
if (!mt)
return NULL;
mt->base = *pt;
@@ -127,14 +127,14 @@ static struct pipe_texture *
nv40_miptree_blanket(struct pipe_screen *pscreen, const struct pipe_texture *pt,
const unsigned *stride, struct pipe_buffer *pb)
{
- struct nv40_miptree *mt;
+ struct nvfx_miptree *mt;
/* Only supports 2D, non-mipmapped textures for the moment */
if (pt->target != PIPE_TEXTURE_2D || pt->last_level != 0 ||
pt->depth0 != 1)
return NULL;
- mt = CALLOC_STRUCT(nv40_miptree);
+ mt = CALLOC_STRUCT(nvfx_miptree);
if (!mt)
return NULL;
@@ -155,7 +155,7 @@ nv40_miptree_blanket(struct pipe_screen *pscreen, const struct pipe_texture *pt,
static void
nv40_miptree_destroy(struct pipe_texture *pt)
{
- struct nv40_miptree *mt = (struct nv40_miptree *)pt;
+ struct nvfx_miptree *mt = (struct nvfx_miptree *)pt;
int l;
pipe_buffer_reference(&mt->buffer, NULL);
@@ -172,7 +172,7 @@ nv40_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_texture *pt,
unsigned face, unsigned level, unsigned zslice,
unsigned flags)
{
- struct nv40_miptree *mt = (struct nv40_miptree *)pt;
+ struct nvfx_miptree *mt = (struct nvfx_miptree *)pt;
struct nv04_surface *ns;
ns = CALLOC_STRUCT(nv04_surface);
@@ -202,7 +202,7 @@ nv40_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_texture *pt,
* Note that ns->pitch is always a multiple of 64 for linear surfaces and swizzled surfaces are POT, so
* ns->pitch & 63 is equivalent to (ns->pitch < 64 && swizzled)*/
if((ns->pitch & 63) && (ns->base.usage & (PIPE_BUFFER_USAGE_GPU_WRITE | NOUVEAU_BUFFER_USAGE_NO_RENDER)) == PIPE_BUFFER_USAGE_GPU_WRITE)
- return &nv04_surface_wrap_for_render(pscreen, ((struct nv40_screen*)pscreen)->eng2d, ns)->base;
+ return &nv04_surface_wrap_for_render(pscreen, ((struct nvfx_screen*)pscreen)->eng2d, ns)->base;
return &ns->base;
}
@@ -213,7 +213,7 @@ nv40_miptree_surface_del(struct pipe_surface *ps)
struct nv04_surface* ns = (struct nv04_surface*)ps;
if(ns->backing)
{
- struct nv40_screen* screen = (struct nv40_screen*)ps->texture->screen;
+ struct nvfx_screen* screen = (struct nvfx_screen*)ps->texture->screen;
if(ns->backing->base.usage & PIPE_BUFFER_USAGE_GPU_WRITE)
screen->eng2d->copy(screen->eng2d, &ns->backing->base, 0, 0, ps, 0, 0, ns->base.width, ns->base.height);
nv40_miptree_surface_del(&ns->backing->base);