summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv50/nv50_tex.c
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-03-11 17:27:12 +0100
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-03-11 17:27:12 +0100
commit4da5d369fb6a724a03a3c2e79ed6623980fc72ac (patch)
treecf842048014dda8464e08b79151f9b25fa508ea6 /src/gallium/drivers/nv50/nv50_tex.c
parent530b9910c2fd25344e6d28b6d9aa0eaad31618e7 (diff)
nv50: fix damage from merging master into sampler-view
Fixed the state array sizes at 3 (instead of PIPE_SHADER_TYPES) because we'll never have domain and hull shaders on nv50; also the numbering doesn't correspond to the hw numbering.
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_tex.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_tex.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gallium/drivers/nv50/nv50_tex.c b/src/gallium/drivers/nv50/nv50_tex.c
index 7ed73eac50..aa885e7168 100644
--- a/src/gallium/drivers/nv50/nv50_tex.c
+++ b/src/gallium/drivers/nv50/nv50_tex.c
@@ -54,8 +54,8 @@ static const uint32_t nv50_texture_formats[PIPE_FORMAT_COUNT] =
_(A8_UNORM, UNORM, ZERO, ZERO, ZERO, C0, 8),
_(I8_UNORM, UNORM, C0, C0, C0, C0, 8),
- _(A8L8_UNORM, UNORM, C0, C0, C0, C1, 8_8),
- _(A8L8_SRGB, UNORM, C0, C0, C0, C1, 8_8),
+ _(L8A8_UNORM, UNORM, C0, C0, C0, C1, 8_8),
+ _(L8A8_SRGB, UNORM, C0, C0, C0, C1, 8_8),
_(DXT1_RGB, UNORM, C0, C1, C2, ONE, DXT1),
_(DXT1_RGBA, UNORM, C0, C1, C2, C3, DXT1),
@@ -221,23 +221,25 @@ nv50_tex_relocs(struct nv50_context *nv50)
int p, unit;
p = PIPE_SHADER_FRAGMENT;
- for (unit = 0; unit < nv50->miptree_nr[p]; unit++) {
- if (!nv50->miptree[p][unit])
+ for (unit = 0; unit < nv50->sampler_view_nr[p]; unit++) {
+ struct pipe_sampler_view *view = nv50->sampler_views[p][unit];
+ if (!view)
continue;
nouveau_reloc_emit(chan, nv50->screen->tic,
((p * 32) + unit) * 32, NULL,
- nv50->miptree[p][unit]->base.bo, 0, 0,
+ nv50_miptree(view->texture)->base.bo, 0, 0,
NOUVEAU_BO_VRAM | NOUVEAU_BO_LOW |
NOUVEAU_BO_RD, 0, 0);
}
p = PIPE_SHADER_VERTEX;
- for (unit = 0; unit < nv50->miptree_nr[p]; unit++) {
- if (!nv50->miptree[p][unit])
+ for (unit = 0; unit < nv50->sampler_view_nr[p]; unit++) {
+ struct pipe_sampler_view *view = nv50->sampler_views[p][unit];
+ if (!view)
continue;
nouveau_reloc_emit(chan, nv50->screen->tic,
((p * 32) + unit) * 32, NULL,
- nv50->miptree[p][unit]->base.bo, 0, 0,
+ nv50_miptree(view->texture)->base.bo, 0, 0,
NOUVEAU_BO_VRAM | NOUVEAU_BO_LOW |
NOUVEAU_BO_RD, 0, 0);
}