mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
nv50/ir: force-enable derivatives on TXD ops
This matters especially in vertex shaders, where derivatives are
disabled by default. This fixes textureGrad in vertex shaders on nv50.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit d2445b0083)
This commit is contained in:
parent
6771e866d0
commit
7521241091
2 changed files with 4 additions and 1 deletions
|
|
@ -1609,7 +1609,9 @@ CodeEmitterNV50::emitTEX(const TexInstruction *i)
|
|||
code[1] |= (i->tex.mask & 0xc) << 12;
|
||||
|
||||
if (i->tex.liveOnly)
|
||||
code[1] |= 4;
|
||||
code[1] |= 1 << 2;
|
||||
if (i->tex.derivAll)
|
||||
code[1] |= 1 << 3;
|
||||
|
||||
defId(i->def(0), 2);
|
||||
|
||||
|
|
|
|||
|
|
@ -916,6 +916,7 @@ NV50LoweringPreSSA::handleTXD(TexInstruction *i)
|
|||
|
||||
handleTEX(i);
|
||||
i->op = OP_TEX; // no need to clone dPdx/dPdy later
|
||||
i->tex.derivAll = true;
|
||||
|
||||
for (c = 0; c < dim; ++c)
|
||||
crd[c] = bld.getScratch();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue