summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv30
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-03-09 11:02:37 +0000
committerKeith Whitwell <keithw@vmware.com>2010-03-09 11:02:37 +0000
commit0c96690a5b6e1c2d114e7ec5f1e9d60a4ff2a330 (patch)
treeeb8aa86b722ac91c775042bd84e152c29970529c /src/gallium/drivers/nv30
parent95c5c69b505f562b61e23fa7dd500dbdd432a70d (diff)
parent6f4ce4a4fed9f0f0f0ee89a63e406ab86dae7150 (diff)
Merge commit 'origin/master' into gallium-sw-api-2
Conflicts: src/gallium/drivers/llvmpipe/lp_setup.c src/gallium/drivers/softpipe/sp_texture.c src/gallium/drivers/softpipe/sp_winsys.h src/gallium/state_trackers/egl/common/egl_g3d.c src/gallium/state_trackers/egl/x11/native_x11.c src/gallium/state_trackers/egl/x11/native_x11.h src/gallium/state_trackers/egl/x11/native_ximage.c
Diffstat (limited to 'src/gallium/drivers/nv30')
-rw-r--r--src/gallium/drivers/nv30/nv30_miptree.c7
-rw-r--r--src/gallium/drivers/nv30/nv30_state.h4
2 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/drivers/nv30/nv30_miptree.c b/src/gallium/drivers/nv30/nv30_miptree.c
index 697b1b92ff..5ef74a832d 100644
--- a/src/gallium/drivers/nv30/nv30_miptree.c
+++ b/src/gallium/drivers/nv30/nv30_miptree.c
@@ -18,7 +18,7 @@ nv30_miptree_layout(struct nv30_miptree *nv30mt)
PIPE_TEXTURE_USAGE_DEPTH_STENCIL |
PIPE_TEXTURE_USAGE_RENDER_TARGET |
PIPE_TEXTURE_USAGE_DISPLAY_TARGET |
- PIPE_TEXTURE_USAGE_PRIMARY);
+ PIPE_TEXTURE_USAGE_SCANOUT);
if (pt->target == PIPE_TEXTURE_CUBE) {
nr_faces = 6;
@@ -78,7 +78,7 @@ nv30_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
pt->height0 & (pt->height0 - 1))
mt->base.tex_usage |= NOUVEAU_TEXTURE_USAGE_LINEAR;
else
- if (pt->tex_usage & (PIPE_TEXTURE_USAGE_PRIMARY |
+ if (pt->tex_usage & (PIPE_TEXTURE_USAGE_SCANOUT |
PIPE_TEXTURE_USAGE_DISPLAY_TARGET |
PIPE_TEXTURE_USAGE_DEPTH_STENCIL))
mt->base.tex_usage |= NOUVEAU_TEXTURE_USAGE_LINEAR;
@@ -232,8 +232,9 @@ void
nv30_screen_init_miptree_functions(struct pipe_screen *pscreen)
{
pscreen->texture_create = nv30_miptree_create;
- pscreen->texture_blanket = nv30_miptree_blanket;
pscreen->texture_destroy = nv30_miptree_destroy;
pscreen->get_tex_surface = nv30_miptree_surface_new;
pscreen->tex_surface_destroy = nv30_miptree_surface_del;
+
+ nouveau_screen(pscreen)->texture_blanket = nv50_miptree_blanket;
}
diff --git a/src/gallium/drivers/nv30/nv30_state.h b/src/gallium/drivers/nv30/nv30_state.h
index e42e872de7..66c26360cb 100644
--- a/src/gallium/drivers/nv30/nv30_state.h
+++ b/src/gallium/drivers/nv30/nv30_state.h
@@ -70,6 +70,8 @@ struct nv30_fragment_program {
struct nouveau_stateobj *so;
};
+#define NV30_MAX_TEXTURE_LEVELS 16
+
struct nv30_miptree {
struct pipe_texture base;
struct nouveau_bo *bo;
@@ -80,7 +82,7 @@ struct nv30_miptree {
struct {
uint pitch;
uint *image_offset;
- } level[PIPE_MAX_TEXTURE_LEVELS];
+ } level[NV30_MAX_TEXTURE_LEVELS];
};
#endif