Module: Mesa
Branch: main
Commit: d0c9ab529e9808c5c2ffea4f6afe42231284f2d0
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d0c9ab529e9808c5c2ffea4f6afe42231284f2d0

Author: Jason Ekstrand <[email protected]>
Date:   Mon Oct 31 22:49:00 2022 -0500

nouveau/codegen: Support bindless texture queries

Reviewed-by: Karol Herbst <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19431>

---

 src/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/nouveau/codegen/nv50_ir_lowering_nvc0.cpp 
b/src/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
index 2655c71b333..5eea5c52c24 100644
--- a/src/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
+++ b/src/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
@@ -1385,9 +1385,14 @@ NVC0LoweringPass::handleTXQ(TexInstruction *txq)
       txq->moveSources(0, 1);
       txq->setSrc(0, src);
    } else {
-      Value *hnd = loadTexHandle(txq->getIndirectR(), txq->tex.r);
-      txq->tex.r = 0xff;
-      txq->tex.s = 0x1f;
+      Value *hnd;
+      if (txq->tex.bindless) {
+         hnd = txq->getIndirectR();
+      } else {
+         hnd = loadTexHandle(txq->getIndirectR(), txq->tex.r);
+         txq->tex.r = 0xff;
+         txq->tex.s = 0x1f;
+      }
 
       txq->setIndirectR(NULL);
       txq->moveSources(0, 1);

Reply via email to