Mesa (master): swr: fix assertion for max number of so targets

Ilia Mirkin imirkin at kemper.freedesktop.org
Thu Dec 1 01:39:53 UTC 2016


Module: Mesa
Branch: master
Commit: 3d837a8871e83e86da7e76ef855e8a877e8c971c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3d837a8871e83e86da7e76ef855e8a877e8c971c

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Sun Nov 27 00:46:33 2016 -0500

swr: fix assertion for max number of so targets

The number has to be less than or equal to the max, not just less than.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Tim Rowley <timothy.o.rowley at intel.com>

---

 src/gallium/drivers/swr/swr_state.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
index 9f6b5b0..fc835dc 100644
--- a/src/gallium/drivers/swr/swr_state.cpp
+++ b/src/gallium/drivers/swr/swr_state.cpp
@@ -1570,7 +1570,7 @@ swr_set_so_targets(struct pipe_context *pipe,
    struct swr_context *swr = swr_context(pipe);
    uint32_t i;
 
-   assert(num_targets < MAX_SO_STREAMS);
+   assert(num_targets <= MAX_SO_STREAMS);
 
    for (i = 0; i < num_targets; i++) {
       pipe_so_target_reference(




More information about the mesa-commit mailing list