draw: (trivial) use information about gs being present from variant key
authorRoland Scheidegger <sroland@vmware.com>
Fri, 8 Aug 2014 16:17:18 +0000 (18:17 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Sat, 9 Aug 2014 01:52:58 +0000 (03:52 +0200)
This is a purely cosmetic change.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/draw/draw_llvm.c

index 967eb7e017327e58025e0ad47007cc6c1a5989c1..2c6ca0d0a52231392e7c8aa778956700995f726e 100644 (file)
@@ -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;