Module: Mesa
Branch: master
Commit: 4e3b950c70721b826c712636d37197dd5a76b910
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4e3b950c70721b826c712636d37197dd5a76b910

Author: Luca Barbieri <l...@luca-barbieri.com>
Date:   Mon Mar 22 18:36:16 2010 +0100

nvfx: fix sampler views support

The code was half converted, resulting in texturing being totally broken.

---

 src/gallium/drivers/nvfx/nv30_fragtex.c |    2 +-
 src/gallium/drivers/nvfx/nv40_fragtex.c |    2 +-
 src/gallium/drivers/nvfx/nvfx_context.h |    1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/nvfx/nv30_fragtex.c 
b/src/gallium/drivers/nvfx/nv30_fragtex.c
index 2b56f45..54e4757 100644
--- a/src/gallium/drivers/nvfx/nv30_fragtex.c
+++ b/src/gallium/drivers/nvfx/nv30_fragtex.c
@@ -91,7 +91,7 @@ struct nouveau_stateobj *
 nv30_fragtex_build(struct nvfx_context *nvfx, int unit)
 {
        struct nvfx_sampler_state *ps = nvfx->tex_sampler[unit];
-       struct nvfx_miptree *nv30mt = nvfx->tex_miptree[unit];
+       struct nvfx_miptree *nv30mt = (struct nvfx_miptree 
*)nvfx->fragment_sampler_views[unit]->texture;
        struct pipe_texture *pt = &nv30mt->base;
        struct nouveau_bo *bo = nouveau_bo(nv30mt->buffer);
        struct nv30_texture_format *tf;
diff --git a/src/gallium/drivers/nvfx/nv40_fragtex.c 
b/src/gallium/drivers/nvfx/nv40_fragtex.c
index 5889b5e..05506e2 100644
--- a/src/gallium/drivers/nvfx/nv40_fragtex.c
+++ b/src/gallium/drivers/nvfx/nv40_fragtex.c
@@ -109,7 +109,7 @@ struct nouveau_stateobj *
 nv40_fragtex_build(struct nvfx_context *nvfx, int unit)
 {
        struct nvfx_sampler_state *ps = nvfx->tex_sampler[unit];
-       struct nvfx_miptree *nv40mt = nvfx->tex_miptree[unit];
+       struct nvfx_miptree *nv40mt = (struct nvfx_miptree 
*)nvfx->fragment_sampler_views[unit]->texture;
        struct nouveau_bo *bo = nouveau_bo(nv40mt->buffer);
        struct pipe_texture *pt = &nv40mt->base;
        struct nv40_texture_format *tf;
diff --git a/src/gallium/drivers/nvfx/nvfx_context.h 
b/src/gallium/drivers/nvfx/nvfx_context.h
index 001b19e..ab7225c 100644
--- a/src/gallium/drivers/nvfx/nvfx_context.h
+++ b/src/gallium/drivers/nvfx/nvfx_context.h
@@ -158,7 +158,6 @@ struct nvfx_context {
        struct pipe_buffer *idxbuf;
        unsigned idxbuf_format;
        struct nvfx_sampler_state *tex_sampler[PIPE_MAX_SAMPLERS];
-       struct nvfx_miptree *tex_miptree[PIPE_MAX_SAMPLERS];
        struct pipe_sampler_view *fragment_sampler_views[PIPE_MAX_SAMPLERS];
        unsigned nr_samplers;
        unsigned nr_textures;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to