mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 02:50:16 +01:00
vc4: Make sure that vertex shader texture2D() calls use LOD 0.
I noticed this while trying to debug glmark2 terrain (which does vertex shader texturing, but no mipmaps on its textures sampled from the VS).
This commit is contained in:
parent
2c875158e2
commit
70fc3a941a
1 changed files with 10 additions and 0 deletions
|
|
@ -417,6 +417,16 @@ ntq_emit_tex(struct vc4_compile *c, nir_tex_instr *instr)
|
|||
}
|
||||
}
|
||||
|
||||
if (c->stage != QSTAGE_FRAG && !is_txl) {
|
||||
/* From the GLSL 1.20 spec:
|
||||
*
|
||||
* "If it is mip-mapped and running on the vertex shader,
|
||||
* then the base texture is used."
|
||||
*/
|
||||
is_txl = true;
|
||||
lod = qir_uniform_ui(c, 0);
|
||||
}
|
||||
|
||||
if (c->key->tex[unit].force_first_level) {
|
||||
lod = qir_uniform(c, QUNIFORM_TEXTURE_FIRST_LEVEL, unit);
|
||||
is_txl = true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue