summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv30/nv30_transfer.c
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-02-20 18:37:43 +0100
committerYounes Manton <[email protected]>2010-03-15 00:03:01 -0400
commitb8e56d4cddbd9c491b940e3ce5974c526802c752 (patch)
tree6ae0a1030c6a43c6596393b787cea3d7b7e23352 /src/gallium/drivers/nv30/nv30_transfer.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/nv30/nv30_transfer.c')
-rw-r--r--src/gallium/drivers/nv30/nv30_transfer.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gallium/drivers/nv30/nv30_transfer.c b/src/gallium/drivers/nv30/nv30_transfer.c
index cfc109bb740..3d71df52b90 100644
--- a/src/gallium/drivers/nv30/nv30_transfer.c
+++ b/src/gallium/drivers/nv30/nv30_transfer.c
@@ -6,8 +6,8 @@
#include "util/u_math.h"
#include "nouveau/nouveau_winsys.h"
#include "nv30_context.h"
-#include "nv30_screen.h"
-#include "nv30_state.h"
+#include "nvfx_screen.h"
+#include "nvfx_state.h"
struct nv30_transfer {
struct pipe_transfer base;
@@ -39,7 +39,7 @@ nv30_transfer_new(struct pipe_context *pcontext, struct pipe_texture *pt,
unsigned x, unsigned y, unsigned w, unsigned h)
{
struct pipe_screen *pscreen = pcontext->screen;
- struct nv30_miptree *mt = (struct nv30_miptree *)pt;
+ struct nvfx_miptree *mt = (struct nvfx_miptree *)pt;
struct nv30_transfer *tx;
struct pipe_texture tx_tex_template, *tx_tex;
@@ -81,7 +81,7 @@ nv30_transfer_new(struct pipe_context *pcontext, struct pipe_texture *pt,
return NULL;
}
- tx->base.stride = ((struct nv30_miptree*)tx_tex)->level[0].pitch;
+ tx->base.stride = ((struct nvfx_miptree*)tx_tex)->level[0].pitch;
tx->surface = pscreen->get_tex_surface(pscreen, tx_tex,
0, 0, 0,
@@ -97,7 +97,7 @@ nv30_transfer_new(struct pipe_context *pcontext, struct pipe_texture *pt,
}
if (usage & PIPE_TRANSFER_READ) {
- struct nv30_screen *nvscreen = nv30_screen(pscreen);
+ struct nvfx_screen *nvscreen = nvfx_screen(pscreen);
struct pipe_surface *src;
src = pscreen->get_tex_surface(pscreen, pt,
@@ -125,7 +125,7 @@ nv30_transfer_del(struct pipe_context *pcontext,
if (!tx->direct && (ptx->usage & PIPE_TRANSFER_WRITE)) {
struct pipe_screen *pscreen = pcontext->screen;
- struct nv30_screen *nvscreen = nv30_screen(pscreen);
+ struct nvfx_screen *nvscreen = nvfx_screen(pscreen);
struct pipe_surface *dst;
dst = pscreen->get_tex_surface(pscreen, ptx->texture,
@@ -152,7 +152,7 @@ nv30_transfer_map(struct pipe_context *pcontext, struct pipe_transfer *ptx)
struct pipe_screen *pscreen = pcontext->screen;
struct nv30_transfer *tx = (struct nv30_transfer *)ptx;
struct nv04_surface *ns = (struct nv04_surface *)tx->surface;
- struct nv30_miptree *mt = (struct nv30_miptree *)tx->surface->texture;
+ struct nvfx_miptree *mt = (struct nvfx_miptree *)tx->surface->texture;
void *map = pipe_buffer_map(pscreen, mt->buffer,
pipe_transfer_buffer_flags(ptx));
@@ -167,16 +167,16 @@ nv30_transfer_unmap(struct pipe_context *pcontext, struct pipe_transfer *ptx)
{
struct pipe_screen *pscreen = pcontext->screen;
struct nv30_transfer *tx = (struct nv30_transfer *)ptx;
- struct nv30_miptree *mt = (struct nv30_miptree *)tx->surface->texture;
+ struct nvfx_miptree *mt = (struct nvfx_miptree *)tx->surface->texture;
pipe_buffer_unmap(pscreen, mt->buffer);
}
void
-nv30_init_transfer_functions(struct nv30_context *nv30)
+nv30_init_transfer_functions(struct nvfx_context *nvfx)
{
- nv30->pipe.get_tex_transfer = nv30_transfer_new;
- nv30->pipe.tex_transfer_destroy = nv30_transfer_del;
- nv30->pipe.transfer_map = nv30_transfer_map;
- nv30->pipe.transfer_unmap = nv30_transfer_unmap;
+ nvfx->pipe.get_tex_transfer = nv30_transfer_new;
+ nvfx->pipe.tex_transfer_destroy = nv30_transfer_del;
+ nvfx->pipe.transfer_map = nv30_transfer_map;
+ nvfx->pipe.transfer_unmap = nv30_transfer_unmap;
}