i965: SF: Move outputs_written to a local variable for clarity.
authorPaul Berry <stereotype441@gmail.com>
Wed, 31 Aug 2011 16:33:57 +0000 (09:33 -0700)
committerPaul Berry <stereotype441@gmail.com>
Tue, 6 Sep 2011 18:04:59 +0000 (11:04 -0700)
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/gen6_sf_state.c
src/mesa/drivers/dri/i965/gen7_sf_state.c

index 886727987407c0682ee00d860523ff578f8c59f0..933686845a22282a93f93e2060605150193130d5 100644 (file)
@@ -105,7 +105,8 @@ upload_sf_state(struct brw_context *brw)
    struct gl_context *ctx = &intel->ctx;
    struct brw_vue_map vue_map;
    /* CACHE_NEW_VS_PROG */
-   uint32_t num_inputs = brw_count_bits(brw->vs.prog_data->outputs_written);
+   GLbitfield64 vs_outputs_written = brw->vs.prog_data->outputs_written;
+   uint32_t num_inputs = brw_count_bits(vs_outputs_written);
    /* BRW_NEW_FRAGMENT_PROGRAM */
    uint32_t num_outputs = brw_count_bits(brw->fragment_program->Base.InputsRead);
    uint32_t dw1, dw2, dw3, dw4, dw16, dw17;
@@ -255,7 +256,7 @@ upload_sf_state(struct brw_context *brw)
     * they source from.
     */
    brw_compute_vue_map(&vue_map, intel, nr_userclip, two_side_color,
-                       brw->vs.prog_data->outputs_written);
+                       vs_outputs_written);
    for (; attr < FRAG_ATTRIB_MAX; attr++) {
       if (!(brw->fragment_program->Base.InputsRead & BITFIELD64_BIT(attr)))
         continue;
index 4d1a2aa86848b05d16d5b38377a0c4f13caf0261..a1bd2abe4e9583c424ca526066e7ab0b5b464c81 100644 (file)
@@ -35,7 +35,8 @@ upload_sbe_state(struct brw_context *brw)
    struct gl_context *ctx = &intel->ctx;
    struct brw_vue_map vue_map;
    /* CACHE_NEW_VS_PROG */
-   uint32_t num_inputs = brw_count_bits(brw->vs.prog_data->outputs_written);
+   GLbitfield64 vs_outputs_written = brw->vs.prog_data->outputs_written;
+   uint32_t num_inputs = brw_count_bits(vs_outputs_written);
    /* BRW_NEW_FRAGMENT_PROGRAM */
    uint32_t num_outputs = brw_count_bits(brw->fragment_program->Base.InputsRead);
    uint32_t dw1, dw10, dw11;
@@ -73,7 +74,7 @@ upload_sbe_state(struct brw_context *brw)
     * they source from.
     */
    brw_compute_vue_map(&vue_map, intel, nr_userclip, two_side_color,
-                       brw->vs.prog_data->outputs_written);
+                       vs_outputs_written);
    for (; attr < FRAG_ATTRIB_MAX; attr++) {
       if (!(brw->fragment_program->Base.InputsRead & BITFIELD64_BIT(attr)))
         continue;