Mesa (master): ilo: correctly check for stencil ref change

Chia-I Wu olv at kemper.freedesktop.org
Wed Aug 7 15:57:49 UTC 2013


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

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Wed Aug  7 17:32:38 2013 +0800

ilo: correctly check for stencil ref change

I intended to do a memcmp(), not a memcpy()...

---

 src/gallium/drivers/ilo/ilo_state.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/ilo/ilo_state.c b/src/gallium/drivers/ilo/ilo_state.c
index 59cc8ff..fea530a 100644
--- a/src/gallium/drivers/ilo/ilo_state.c
+++ b/src/gallium/drivers/ilo/ilo_state.c
@@ -574,7 +574,7 @@ ilo_set_stencil_ref(struct pipe_context *pipe,
    struct ilo_context *ilo = ilo_context(pipe);
 
    /* util_blitter may set this unnecessarily */
-   if (!memcpy(&ilo->stencil_ref, state, sizeof(*state)))
+   if (!memcmp(&ilo->stencil_ref, state, sizeof(*state)))
       return;
 
    ilo->stencil_ref = *state;




More information about the mesa-commit mailing list