summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc5
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2017-11-21 16:32:33 -0800
committerEric Anholt <[email protected]>2017-11-22 10:56:31 -0800
commit6a78416dabdf0b7b80471dd0c636164c8f4012e0 (patch)
treedb95538b434d7e66e87588d42be86db1fdd5344a /src/gallium/drivers/vc5
parentc55813c22e2099d59dbff81b9202b5ce70926e45 (diff)
broadcom/vc5: Fix BASE_LEVEL handling with txl.
The HW doesn't add the base level anywhere (the min/max lod clamping is what does base level), so we need to add it manually in this case. Fixes piglit tex-miplevel-selection *Lod 2D.
Diffstat (limited to 'src/gallium/drivers/vc5')
-rw-r--r--src/gallium/drivers/vc5/vc5_uniforms.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc5/vc5_uniforms.c b/src/gallium/drivers/vc5/vc5_uniforms.c
index 37354b8bb84..5e181344e73 100644
--- a/src/gallium/drivers/vc5/vc5_uniforms.c
+++ b/src/gallium/drivers/vc5/vc5_uniforms.c
@@ -324,6 +324,10 @@ vc5_write_uniforms(struct vc5_context *vc5, struct vc5_compiled_shader *shader,
break;
case QUNIFORM_TEXTURE_FIRST_LEVEL:
+ cl_aligned_f(&uniforms,
+ texstate->textures[uinfo->data[i]]->u.tex.first_level);
+ break;
+
case QUNIFORM_TEXTURE_BORDER_COLOR:
/* XXX */
break;