aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nv50/nv50_tex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50/nv50_tex.c')
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_tex.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_tex.c b/src/gallium/drivers/nouveau/nv50/nv50_tex.c
index ad230186427..741e350c273 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_tex.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_tex.c
@@ -380,6 +380,16 @@ nv50_validate_tsc(struct nv50_context *nv50, int s)
}
nv50->state.num_samplers[s] = nv50->num_samplers[s];
+ // TXF, in unlinked tsc mode, will always use sampler 0. So we have to
+ // ensure that it remains bound. Its contents don't matter, all samplers we
+ // ever create have the SRGB_CONVERSION bit set, so as long as the first
+ // entry is initialized, we're good to go. This is the only bit that has
+ // any effect on what TXF does.
+ if (!nv50->samplers[s][0]) {
+ BEGIN_NV04(push, NV50_3D(BIND_TSC(s)), 1);
+ PUSH_DATA (push, 1);
+ }
+
return need_flush;
}
@@ -451,3 +461,14 @@ void nv50_upload_ms_info(struct nouveau_pushbuf *push)
BEGIN_NI04(push, NV50_3D(CB_DATA(0)), ARRAY_SIZE(msaa_sample_xy_offsets));
PUSH_DATAp(push, msaa_sample_xy_offsets, ARRAY_SIZE(msaa_sample_xy_offsets));
}
+
+void nv50_upload_tsc0(struct nv50_context *nv50)
+{
+ struct nouveau_pushbuf *push = nv50->base.pushbuf;
+ u32 data[8] = { G80_TSC_0_SRGB_CONVERSION };
+ nv50_sifc_linear_u8(&nv50->base, nv50->screen->txc,
+ 65536 /* + tsc->id * 32 */,
+ NOUVEAU_BO_VRAM, 32, data);
+ BEGIN_NV04(push, NV50_3D(TSC_FLUSH), 1);
+ PUSH_DATA (push, 0);
+}