mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 00:10:10 +01:00
nvc0/ir: do quadops on the right texture coordinates for TXD
handleTEX moves the layer as the first argument. This makes sure that the quadops deal with the texture coordinates. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
1065aa92f4
commit
afea9bae67
1 changed files with 3 additions and 2 deletions
|
|
@ -712,6 +712,7 @@ NVC0LoweringPass::handleManualTXD(TexInstruction *i)
|
||||||
Value *zero = bld.loadImm(bld.getSSA(), 0);
|
Value *zero = bld.loadImm(bld.getSSA(), 0);
|
||||||
int l, c;
|
int l, c;
|
||||||
const int dim = i->tex.target.getDim();
|
const int dim = i->tex.target.getDim();
|
||||||
|
const int array = i->tex.target.isArray();
|
||||||
|
|
||||||
i->op = OP_TEX; // no need to clone dPdx/dPdy later
|
i->op = OP_TEX; // no need to clone dPdx/dPdy later
|
||||||
|
|
||||||
|
|
@ -722,7 +723,7 @@ NVC0LoweringPass::handleManualTXD(TexInstruction *i)
|
||||||
for (l = 0; l < 4; ++l) {
|
for (l = 0; l < 4; ++l) {
|
||||||
// mov coordinates from lane l to all lanes
|
// mov coordinates from lane l to all lanes
|
||||||
for (c = 0; c < dim; ++c)
|
for (c = 0; c < dim; ++c)
|
||||||
bld.mkQuadop(0x00, crd[c], l, i->getSrc(c), zero);
|
bld.mkQuadop(0x00, crd[c], l, i->getSrc(c + array), zero);
|
||||||
// add dPdx from lane l to lanes dx
|
// add dPdx from lane l to lanes dx
|
||||||
for (c = 0; c < dim; ++c)
|
for (c = 0; c < dim; ++c)
|
||||||
bld.mkQuadop(qOps[l][0], crd[c], l, i->dPdx[c].get(), crd[c]);
|
bld.mkQuadop(qOps[l][0], crd[c], l, i->dPdx[c].get(), crd[c]);
|
||||||
|
|
@ -732,7 +733,7 @@ NVC0LoweringPass::handleManualTXD(TexInstruction *i)
|
||||||
// texture
|
// texture
|
||||||
bld.insert(tex = cloneForward(func, i));
|
bld.insert(tex = cloneForward(func, i));
|
||||||
for (c = 0; c < dim; ++c)
|
for (c = 0; c < dim; ++c)
|
||||||
tex->setSrc(c, crd[c]);
|
tex->setSrc(c + array, crd[c]);
|
||||||
// save results
|
// save results
|
||||||
for (c = 0; i->defExists(c); ++c) {
|
for (c = 0; i->defExists(c); ++c) {
|
||||||
Instruction *mov;
|
Instruction *mov;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue