nouveau: gallium directory structure changed again..

This commit is contained in:
Ben Skeggs 2008-09-11 06:41:18 +10:00
parent 7158203b08
commit f302fca5eb
71 changed files with 58 additions and 78 deletions

View file

@ -1,7 +1,6 @@
#ifndef __NOUVEAU_STATEOBJ_H__
#define __NOUVEAU_STATEOBJ_H__
#include "pipe/p_util.h"
#include "pipe/p_debug.h"
struct nouveau_stateobj_reloc {

View file

@ -1,7 +1,6 @@
#include "draw/draw_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_winsys.h"
#include "pipe/p_util.h"
#include "nv04_context.h"
#include "nv04_screen.h"

View file

@ -4,6 +4,10 @@
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_state.h"
#include "pipe/p_compiler.h"
#include "util/u_memory.h"
#include "util/u_math.h"
#include "draw/draw_vertex.h"

View file

@ -1,7 +1,6 @@
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_state.h"
#include "pipe/p_util.h"
#include "pipe/p_shader_tokens.h"
#include "tgsi/tgsi_parse.h"

View file

@ -1,6 +1,5 @@
#include "pipe/p_state.h"
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
#include "pipe/p_inlines.h"
#include "nv04_context.h"
@ -72,7 +71,6 @@ nv04_miptree_create(struct pipe_screen *screen, const struct pipe_texture *pt)
static void
nv04_miptree_release(struct pipe_screen *screen, struct pipe_texture **pt)
{
struct pipe_winsys *ws = screen->winsys;
struct pipe_texture *mt = *pt;
*pt = NULL;
@ -80,7 +78,7 @@ nv04_miptree_release(struct pipe_screen *screen, struct pipe_texture **pt)
struct nv04_miptree *nv04mt = (struct nv04_miptree *)mt;
int l;
pipe_buffer_reference(ws, &nv04mt->buffer, NULL);
pipe_buffer_reference(screen, &nv04mt->buffer, NULL);
for (l = 0; l <= mt->last_level; l++) {
if (nv04mt->level[l].image_offset)
FREE(nv04mt->level[l].image_offset);
@ -101,7 +99,7 @@ nv04_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_texture *pt,
ps = ws->surface_alloc(ws);
if (!ps)
return NULL;
pipe_buffer_reference(ws, &ps->buffer, nv04mt->buffer);
pipe_buffer_reference(pscreen, &ps->buffer, nv04mt->buffer);
ps->format = pt->format;
ps->width = pt->width[level];
ps->height = pt->height[level];

View file

@ -1,9 +1,10 @@
#include "draw/draw_vbuf.h"
#include "pipe/p_debug.h"
#include "pipe/p_util.h"
#include "pipe/p_inlines.h"
#include "pipe/p_winsys.h"
#include "pipe/p_compiler.h"
#include "draw/draw_vbuf.h"
#include "nv04_context.h"
#include "nv04_state.h"

View file

@ -1,5 +1,4 @@
#include "pipe/p_screen.h"
#include "pipe/p_util.h"
#include "nv04_context.h"
#include "nv04_screen.h"

View file

@ -1,7 +1,6 @@
#include "draw/draw_context.h"
#include "pipe/p_state.h"
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
#include "pipe/p_shader_tokens.h"
#include "tgsi/tgsi_parse.h"

View file

@ -28,10 +28,9 @@
#include "nv04_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
#include "pipe/p_winsys.h"
#include "pipe/p_inlines.h"
#include "util/p_tile.h"
#include "util/u_tile.h"
static void
nv04_surface_copy(struct pipe_context *pipe, unsigned do_flip,

View file

@ -1,7 +1,6 @@
#include "draw/draw_context.h"
#include "pipe/p_context.h"
#include "pipe/p_state.h"
#include "pipe/p_util.h"
#include "nv04_context.h"
#include "nv04_state.h"

View file

@ -1,7 +1,6 @@
#include "draw/draw_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_winsys.h"
#include "pipe/p_util.h"
#include "nv10_context.h"
#include "nv10_screen.h"

View file

@ -4,6 +4,10 @@
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_state.h"
#include "pipe/p_compiler.h"
#include "util/u_memory.h"
#include "util/u_math.h"
#include "draw/draw_vertex.h"

View file

@ -1,7 +1,6 @@
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_state.h"
#include "pipe/p_util.h"
#include "pipe/p_shader_tokens.h"
#include "tgsi/tgsi_parse.h"

View file

@ -1,6 +1,5 @@
#include "pipe/p_state.h"
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
#include "pipe/p_inlines.h"
#include "nv10_context.h"
@ -79,7 +78,6 @@ nv10_miptree_create(struct pipe_screen *screen, const struct pipe_texture *pt)
static void
nv10_miptree_release(struct pipe_screen *screen, struct pipe_texture **pt)
{
struct pipe_winsys *ws = screen->winsys;
struct pipe_texture *mt = *pt;
*pt = NULL;
@ -87,7 +85,7 @@ nv10_miptree_release(struct pipe_screen *screen, struct pipe_texture **pt)
struct nv10_miptree *nv10mt = (struct nv10_miptree *)mt;
int l;
pipe_buffer_reference(ws, &nv10mt->buffer, NULL);
pipe_buffer_reference(screen, &nv10mt->buffer, NULL);
for (l = 0; l <= mt->last_level; l++) {
if (nv10mt->level[l].image_offset)
FREE(nv10mt->level[l].image_offset);
@ -115,7 +113,7 @@ nv10_miptree_surface_get(struct pipe_screen *screen, struct pipe_texture *pt,
ps = ws->surface_alloc(ws);
if (!ps)
return NULL;
pipe_buffer_reference(ws, &ps->buffer, nv10mt->buffer);
pipe_buffer_reference(screen, &ps->buffer, nv10mt->buffer);
ps->format = pt->format;
ps->width = pt->width[level];
ps->height = pt->height[level];

View file

@ -38,15 +38,14 @@
*/
#include "draw/draw_vbuf.h"
#include "pipe/p_debug.h"
#include "pipe/p_util.h"
#include "pipe/p_inlines.h"
#include "pipe/p_winsys.h"
#include "nv10_context.h"
#include "nv10_state.h"
#include "draw/draw_vbuf.h"
/**
* Primitive renderer for nv10.
@ -180,10 +179,11 @@ nv10_vbuf_render_release_vertices( struct vbuf_render *render,
struct nv10_vbuf_render *nv10_render = nv10_vbuf_render(render);
struct nv10_context *nv10 = nv10_render->nv10;
struct pipe_winsys *winsys = nv10->pipe.winsys;
struct pipe_screen *pscreen = &nv10->screen->pipe;
assert(nv10_render->buffer);
winsys->buffer_unmap(winsys, nv10_render->buffer);
pipe_buffer_reference(winsys, &nv10_render->buffer, NULL);
pipe_buffer_reference(pscreen, &nv10_render->buffer, NULL);
}

View file

@ -1,5 +1,4 @@
#include "pipe/p_screen.h"
#include "pipe/p_util.h"
#include "nv10_context.h"
#include "nv10_screen.h"

View file

@ -1,7 +1,6 @@
#include "draw/draw_context.h"
#include "pipe/p_state.h"
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
#include "pipe/p_shader_tokens.h"
#include "tgsi/tgsi_parse.h"

View file

@ -1,5 +1,3 @@
#include "pipe/p_util.h"
#include "nv10_context.h"
#include "nv10_state.h"

View file

@ -28,10 +28,9 @@
#include "nv10_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
#include "pipe/p_winsys.h"
#include "pipe/p_inlines.h"
#include "util/p_tile.h"
#include "util/u_tile.h"
static void
nv10_surface_copy(struct pipe_context *pipe, unsigned do_flip,

View file

@ -1,7 +1,6 @@
#include "draw/draw_context.h"
#include "pipe/p_context.h"
#include "pipe/p_state.h"
#include "pipe/p_util.h"
#include "nv10_context.h"
#include "nv10_state.h"

View file

@ -1,7 +1,6 @@
#include "draw/draw_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_winsys.h"
#include "pipe/p_util.h"
#include "nv30_context.h"
#include "nv30_screen.h"

View file

@ -4,6 +4,10 @@
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_state.h"
#include "pipe/p_compiler.h"
#include "util/u_memory.h"
#include "util/u_math.h"
#include "draw/draw_vertex.h"

View file

@ -1,5 +1,4 @@
#include "draw/draw_pipe.h"
#include "pipe/p_util.h"
#include "nv30_context.h"

View file

@ -1,6 +1,5 @@
#include "pipe/p_state.h"
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
#include "pipe/p_inlines.h"
#include "nv30_context.h"
@ -33,7 +32,7 @@ nv30_miptree_layout(struct nv30_miptree *nv30mt)
if (swizzled)
pitch = pt->nblocksx[l];
pitch = align_int(pitch, 64);
pitch = align(pitch, 64);
nv30mt->level[l].pitch = pitch * pt->block.size;
nv30mt->level[l].image_offset =
@ -84,7 +83,6 @@ nv30_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
static void
nv30_miptree_release(struct pipe_screen *pscreen, struct pipe_texture **pt)
{
struct pipe_winsys *ws = pscreen->winsys;
struct pipe_texture *mt = *pt;
*pt = NULL;
@ -92,7 +90,7 @@ nv30_miptree_release(struct pipe_screen *pscreen, struct pipe_texture **pt)
struct nv30_miptree *nv30mt = (struct nv30_miptree *)mt;
int l;
pipe_buffer_reference(ws, &nv30mt->buffer, NULL);
pipe_buffer_reference(pscreen, &nv30mt->buffer, NULL);
for (l = 0; l <= mt->last_level; l++) {
if (nv30mt->level[l].image_offset)
FREE(nv30mt->level[l].image_offset);
@ -106,7 +104,6 @@ nv30_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_texture *pt,
unsigned face, unsigned level, unsigned zslice,
unsigned flags)
{
struct pipe_winsys *ws = pscreen->winsys;
struct nv30_miptree *nv30mt = (struct nv30_miptree *)pt;
struct pipe_surface *ps;
@ -114,7 +111,7 @@ nv30_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_texture *pt,
if (!ps)
return NULL;
pipe_texture_reference(&ps->texture, pt);
pipe_buffer_reference(ws, &ps->buffer, nv30mt->buffer);
pipe_buffer_reference(pscreen, &ps->buffer, nv30mt->buffer);
ps->format = pt->format;
ps->width = pt->width[level];
ps->height = pt->height[level];

View file

@ -1,5 +1,4 @@
#include "pipe/p_screen.h"
#include "pipe/p_util.h"
#include "nv30_context.h"
#include "nv30_screen.h"

View file

@ -1,6 +1,5 @@
#include "pipe/p_state.h"
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
#include "pipe/p_inlines.h"
#include "tgsi/tgsi_parse.h"

View file

@ -28,10 +28,10 @@
#include "nv30_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
#include "pipe/p_winsys.h"
#include "pipe/p_inlines.h"
#include "util/p_tile.h"
#include "util/u_tile.h"
static void
nv30_surface_copy(struct pipe_context *pipe, unsigned do_flip,

View file

@ -1,6 +1,5 @@
#include "pipe/p_context.h"
#include "pipe/p_state.h"
#include "pipe/p_util.h"
#include "nv30_context.h"
#include "nv30_state.h"

View file

@ -1,7 +1,6 @@
#include "draw/draw_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_winsys.h"
#include "pipe/p_util.h"
#include "nv40_context.h"
#include "nv40_screen.h"

View file

@ -4,6 +4,10 @@
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_state.h"
#include "pipe/p_compiler.h"
#include "util/u_memory.h"
#include "util/u_math.h"
#include "draw/draw_vertex.h"

View file

@ -1,6 +1,7 @@
#include "pipe/p_util.h"
#include "pipe/p_shader_tokens.h"
#include "util/u_pack_color.h"
#include "draw/draw_context.h"
#include "draw/draw_vertex.h"
#include "draw/draw_pipe.h"

View file

@ -1,6 +1,5 @@
#include "pipe/p_state.h"
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
#include "pipe/p_inlines.h"
#include "nv40_context.h"
@ -33,7 +32,7 @@ nv40_miptree_layout(struct nv40_miptree *nv40mt)
if (swizzled)
pitch = pt->nblocksx[l];
pitch = align_int(pitch, 64);
pitch = align(pitch, 64);
nv40mt->level[l].pitch = pitch * pt->block.size;
nv40mt->level[l].image_offset =
@ -84,7 +83,6 @@ nv40_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
static void
nv40_miptree_release(struct pipe_screen *pscreen, struct pipe_texture **pt)
{
struct pipe_winsys *ws = pscreen->winsys;
struct pipe_texture *mt = *pt;
*pt = NULL;
@ -92,7 +90,7 @@ nv40_miptree_release(struct pipe_screen *pscreen, struct pipe_texture **pt)
struct nv40_miptree *nv40mt = (struct nv40_miptree *)mt;
int l;
pipe_buffer_reference(ws, &nv40mt->buffer, NULL);
pipe_buffer_reference(pscreen, &nv40mt->buffer, NULL);
for (l = 0; l <= mt->last_level; l++) {
if (nv40mt->level[l].image_offset)
FREE(nv40mt->level[l].image_offset);
@ -106,7 +104,6 @@ nv40_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_texture *pt,
unsigned face, unsigned level, unsigned zslice,
unsigned flags)
{
struct pipe_winsys *ws = pscreen->winsys;
struct nv40_miptree *nv40mt = (struct nv40_miptree *)pt;
struct pipe_surface *ps;
@ -114,7 +111,7 @@ nv40_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_texture *pt,
if (!ps)
return NULL;
pipe_texture_reference(&ps->texture, pt);
pipe_buffer_reference(ws, &ps->buffer, nv40mt->buffer);
pipe_buffer_reference(pscreen, &ps->buffer, nv40mt->buffer);
ps->format = pt->format;
ps->width = pt->width[level];
ps->height = pt->height[level];
@ -148,7 +145,7 @@ nv40_miptree_surface_del(struct pipe_screen *pscreen,
return;
pipe_texture_reference(&ps->texture, NULL);
pipe_buffer_reference(pscreen->winsys, &ps->buffer, NULL);
pipe_buffer_reference(pscreen, &ps->buffer, NULL);
FREE(ps);
}

View file

@ -1,5 +1,4 @@
#include "pipe/p_screen.h"
#include "pipe/p_util.h"
#include "nv40_context.h"
#include "nv40_screen.h"

View file

@ -1,6 +1,5 @@
#include "pipe/p_state.h"
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
#include "pipe/p_inlines.h"
#include "draw/draw_context.h"

View file

@ -28,10 +28,10 @@
#include "nv40_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
#include "pipe/p_winsys.h"
#include "pipe/p_inlines.h"
#include "util/p_tile.h"
#include "util/u_tile.h"
static void
nv40_surface_copy(struct pipe_context *pipe, boolean do_flip,

View file

@ -1,6 +1,5 @@
#include "pipe/p_context.h"
#include "pipe/p_state.h"
#include "pipe/p_util.h"
#include "nv40_context.h"
#include "nv40_state.h"

View file

@ -23,7 +23,6 @@
#include "draw/draw_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_winsys.h"
#include "pipe/p_util.h"
#include "nv50_context.h"
#include "nv50_screen.h"

View file

@ -4,6 +4,10 @@
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_state.h"
#include "pipe/p_compiler.h"
#include "util/u_memory.h"
#include "util/u_math.h"
#include "draw/draw_vertex.h"

View file

@ -21,7 +21,6 @@
*/
#include "draw/draw_pipe.h"
#include "pipe/p_util.h"
#include "nv50_context.h"

View file

@ -22,7 +22,6 @@
#include "pipe/p_state.h"
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
#include "pipe/p_inlines.h"
#include "nv50_context.h"
@ -62,7 +61,6 @@ nv50_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
static void
nv50_miptree_release(struct pipe_screen *pscreen, struct pipe_texture **ppt)
{
struct pipe_winsys *ws = pscreen->winsys;
struct pipe_texture *pt = *ppt;
*ppt = NULL;
@ -70,7 +68,7 @@ nv50_miptree_release(struct pipe_screen *pscreen, struct pipe_texture **ppt)
if (--pt->refcount <= 0) {
struct nv50_miptree *mt = nv50_miptree(pt);
pipe_buffer_reference(ws, &mt->buffer, NULL);
pipe_buffer_reference(pscreen, &mt->buffer, NULL);
FREE(mt);
}
}
@ -80,7 +78,6 @@ nv50_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_texture *pt,
unsigned face, unsigned level, unsigned zslice,
unsigned flags)
{
struct pipe_winsys *ws = pscreen->winsys;
struct nv50_miptree *mt = nv50_miptree(pt);
struct nv50_surface *s;
struct pipe_surface *ps;
@ -91,7 +88,7 @@ nv50_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_texture *pt,
ps = &s->base;
ps->refcount = 1;
ps->winsys = ws;
ps->winsys = pscreen->winsys;
ps->format = pt->format;
ps->width = pt->width[level];
ps->height = pt->height[level];
@ -104,7 +101,7 @@ nv50_miptree_surface_new(struct pipe_screen *pscreen, struct pipe_texture *pt,
ps->status = PIPE_SURFACE_STATUS_DEFINED;
pipe_texture_reference(&ps->texture, pt);
pipe_buffer_reference(ws, &ps->buffer, mt->buffer);
pipe_buffer_reference(pscreen, &ps->buffer, mt->buffer);
return ps;
}
@ -113,7 +110,6 @@ static void
nv50_miptree_surface_del(struct pipe_screen *pscreen,
struct pipe_surface **psurface)
{
struct pipe_winsys *ws = pscreen->winsys;
struct pipe_surface *ps = *psurface;
struct nv50_surface *s = nv50_surface(ps);
@ -121,7 +117,7 @@ nv50_miptree_surface_del(struct pipe_screen *pscreen,
if (--ps->refcount <= 0) {
pipe_texture_reference(&ps->texture, NULL);
pipe_buffer_reference(ws, &ps->buffer, NULL);
pipe_buffer_reference(pscreen, &ps->buffer, NULL);
FREE(s);
}
}

View file

@ -21,7 +21,6 @@
*/
#include "pipe/p_screen.h"
#include "pipe/p_util.h"
#include "nv50_context.h"
#include "nv50_screen.h"

View file

@ -22,7 +22,6 @@
#include "pipe/p_state.h"
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
#include "pipe/p_inlines.h"
#include "tgsi/tgsi_parse.h"

View file

@ -22,10 +22,10 @@
#include "nv50_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
#include "pipe/p_winsys.h"
#include "pipe/p_inlines.h"
#include "util/p_tile.h"
#include "util/u_tile.h"
static void
nv50_surface_copy(struct pipe_context *pipe, boolean flip,
@ -90,10 +90,10 @@ nv50_surface_map(struct pipe_screen *screen, struct pipe_surface *ps,
}
static void
nv50_surface_unmap(struct pipe_screen *screen, struct pipe_surface *ps)
nv50_surface_unmap(struct pipe_screen *pscreen, struct pipe_surface *ps)
{
struct nouveau_winsys *nvws = nv50_screen(screen)->nvws;
struct pipe_winsys *ws = screen->winsys;
struct nouveau_winsys *nvws = nv50_screen(pscreen)->nvws;
struct pipe_winsys *ws = pscreen->winsys;
struct nv50_surface *s = nv50_surface(ps);
struct nv50_surface m = *s;
@ -104,7 +104,7 @@ nv50_surface_unmap(struct pipe_screen *screen, struct pipe_surface *ps)
nvws->surface_copy(nvws, &s->base, 0, 0, &m.base, 0, 0,
ps->width, ps->height);
pipe_buffer_reference(ws, &s->untiled, NULL);
pipe_buffer_reference(pscreen, &s->untiled, NULL);
}
void

View file

@ -22,7 +22,6 @@
#include "pipe/p_context.h"
#include "pipe/p_state.h"
#include "pipe/p_util.h"
#include "nv50_context.h"

View file

@ -1,4 +1,4 @@
#include "pipe/p_util.h"
#include "util/u_memory.h"
#include "nouveau_context.h"
#include "nouveau_screen.h"

View file

@ -1,8 +1,9 @@
#include "pipe/p_winsys.h"
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
#include "pipe/p_inlines.h"
#include "util/u_memory.h"
#include "nouveau_context.h"
#include "nouveau_local.h"
#include "nouveau_screen.h"