summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2012-07-11 20:52:58 +0200
committerChristoph Bumiller <[email protected]>2012-09-30 23:09:37 +0200
commitc321b1bef15e2807de3f6225c4abcbf48969997a (patch)
treebcdfac23cf93ca7ab9bf0ad77c170786429bc26d /src/gallium/drivers
parent2149ce41ed6b10f7bff65d7b3f23fd03b89753e3 (diff)
nvc0: make sure handles for unbound textures/samplers are uploaded on nve4
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_context.c2
-rw-r--r--src/gallium/drivers/nvc0/nvc0_tex.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_context.c b/src/gallium/drivers/nvc0/nvc0_context.c
index ee131d29bbf..2c032ab7420 100644
--- a/src/gallium/drivers/nvc0/nvc0_context.c
+++ b/src/gallium/drivers/nvc0/nvc0_context.c
@@ -194,6 +194,8 @@ nvc0_create(struct pipe_screen *pscreen, void *priv)
nvc0->base.scratch.bo_size = 2 << 20;
+ memset(nvc0->tex_handles, ~0, sizeof(nvc0->tex_handles));
+
return pipe;
out_err:
diff --git a/src/gallium/drivers/nvc0/nvc0_tex.c b/src/gallium/drivers/nvc0/nvc0_tex.c
index 0930212a350..b52918e1319 100644
--- a/src/gallium/drivers/nvc0/nvc0_tex.c
+++ b/src/gallium/drivers/nvc0/nvc0_tex.c
@@ -338,8 +338,10 @@ nve4_validate_tic(struct nvc0_context *nvc0, unsigned s)
if (dirty)
BCTX_REFN(nvc0->bufctx_3d, TEX(s, i), res, RD);
}
- for (; i < nvc0->state.num_textures[s]; ++i)
+ for (; i < nvc0->state.num_textures[s]; ++i) {
nvc0->tex_handles[s][i] |= NVE4_TIC_ENTRY_INVALID;
+ nvc0->textures_dirty[s] |= 1 << i;
+ }
nvc0->state.num_textures[s] = nvc0->num_textures[s];
@@ -446,8 +448,10 @@ nve4_validate_tsc(struct nvc0_context *nvc0, int s)
nvc0->tex_handles[s][i] &= ~NVE4_TSC_ENTRY_INVALID;
nvc0->tex_handles[s][i] |= tsc->id << 20;
}
- for (; i < nvc0->state.num_samplers[s]; ++i)
+ for (; i < nvc0->state.num_samplers[s]; ++i) {
nvc0->tex_handles[s][i] |= NVE4_TSC_ENTRY_INVALID;
+ nvc0->samplers_dirty[s] |= 1 << i;
+ }
nvc0->state.num_samplers[s] = nvc0->num_samplers[s];