[Mesa-dev] [PATCH 2/2] i965/fs: verify uniforms are in the push constant buffer when assigning FIXED_GRF

Samuel Iglesias Gonsálvez siglesias at igalia.com
Thu Feb 16 11:16:20 UTC 2017


Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
---
 src/mesa/drivers/dri/i965/brw_fs.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 93ab84b5845..8f57069398a 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -1404,6 +1404,11 @@ fs_visitor::assign_curb_setup()
                constant_nr = 0;
             }
 
+            /* If constant_nr < 0, then it is not present in the push constant
+             * buffer.
+             */
+            assert(constant_nr >= 0);
+
 	    struct brw_reg brw_reg = brw_vec1_grf(payload.num_regs +
 						  constant_nr / 8,
 						  constant_nr % 8);
-- 
2.11.0



More information about the mesa-dev mailing list