[Mesa-dev] [PATCH 2/2] nvc0: remove magic values in nve4_set_tex_handles()

Rhys Perry pendingchaos02 at gmail.com
Fri Jun 22 20:47:43 UTC 2018


With this commit, things no longer break if NVC0_CB_AUX_TEX_INFO is
changed to anything other than 0x20.

Fixes: 902bbda81b31bacb2a8c60ca6a8ba8ca34ae73d3
    ("nvc0: avoid using magic numbers for the uniform_bo offsets")
Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
---
 src/gallium/drivers/nouveau/nvc0/nvc0_tex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c b/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c
index 0471fffe83..e7cd60169e 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c
@@ -755,7 +755,7 @@ nve4_set_tex_handles(struct nvc0_context *nvc0)
          dirty &= ~(1 << i);
 
          BEGIN_NVC0(push, NVC0_3D(CB_POS), 2);
-         PUSH_DATA (push, (8 + i) * 4);
+         PUSH_DATA (push, NVC0_CB_AUX_TEX_INFO(i));
          PUSH_DATA (push, nvc0->tex_handles[s][i]);
       } while (dirty);
 
-- 
2.14.4



More information about the mesa-dev mailing list