llvmpipe: compare front_facing to NULL to improve readability
authorBrian Paul <brianp@vmware.com>
Sun, 23 Oct 2011 16:05:14 +0000 (10:05 -0600)
committerBrian Paul <brianp@vmware.com>
Sun, 23 Oct 2011 16:09:34 +0000 (10:09 -0600)
Compare 'front_facing' to NULL to make it more obvious that front_facing
is a pointer and not a simple boolean value.

src/gallium/drivers/llvmpipe/lp_bld_depth.c

index 5e0eb99c93703920f55515e5e28368a7aeb854f4..3e75e91fc095c07e0b49353b9e8688783770d3f2 100644 (file)
@@ -141,7 +141,7 @@ lp_build_stencil_test(struct lp_build_context *bld,
    res = lp_build_stencil_test_single(bld, &stencil[0],
                                       stencilRefs[0], stencilVals);
 
-   if (stencil[1].enabled && front_facing) {
+   if (stencil[1].enabled && front_facing != NULL) {
       /* do back face test */
       LLVMValueRef back_res;
 
@@ -253,7 +253,7 @@ lp_build_stencil_op(struct lp_build_context *bld,
    res = lp_build_stencil_op_single(bld, &stencil[0], op,
                                      stencilRefs[0], stencilVals);
 
-   if (stencil[1].enabled && front_facing) {
+   if (stencil[1].enabled && front_facing != NULL) {
       /* do back face op */
       LLVMValueRef back_res;