Mesa (master): draw: (trivial) use information about gs being present from variant key

Roland Scheidegger sroland at kemper.freedesktop.org
Sat Aug 9 01:53:18 UTC 2014


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

Author: Roland Scheidegger <sroland at vmware.com>
Date:   Fri Aug  8 18:17:18 2014 +0200

draw: (trivial) use information about gs being present from variant key

This is a purely cosmetic change.

Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/gallium/auxiliary/draw/draw_llvm.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
index 967eb7e..2c6ca0d 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -1499,16 +1499,15 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
    LLVMValueRef fetch_max;
    struct lp_build_sampler_soa *sampler = 0;
    LLVMValueRef ret, clipmask_bool_ptr;
-   const struct draw_geometry_shader *gs = draw->gs.geometry_shader;
    struct draw_llvm_variant_key *key = &variant->key;
    /* If geometry shader is present we need to skip both the viewport
     * transformation and clipping otherwise the inputs to the geometry
     * shader will be incorrect.
     */
-   const boolean bypass_viewport = gs || key->bypass_viewport;
-   const boolean enable_cliptest = !gs && (key->clip_xy ||
-                                           key->clip_z  ||
-                                           key->clip_user);
+   const boolean bypass_viewport = key->has_gs || key->bypass_viewport;
+   const boolean enable_cliptest = !key->has_gs && (key->clip_xy ||
+                                                    key->clip_z  ||
+                                                    key->clip_user);
    LLVMValueRef variant_func;
    const unsigned pos = llvm->draw->vs.position_output;
    const unsigned cv = llvm->draw->vs.clipvertex_output;




More information about the mesa-commit mailing list