Mesa (gallium-0.2): gallium: it's a reference value, not a reference number

Zack Rusin zack at kemper.freedesktop.org
Tue Jan 27 18:16:53 UTC 2009


Module: Mesa
Branch: gallium-0.2
Commit: d6888e811d24eaa7e8d9093be606394f00435c05
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d6888e811d24eaa7e8d9093be606394f00435c05

Author: Zack Rusin <zackr at vmware.com>
Date:   Mon Jan 26 15:07:08 2009 -0500

gallium: it's a reference value, not a reference number

---

 src/gallium/drivers/i915simple/i915_state.c       |    2 +-
 src/gallium/drivers/i965simple/brw_cc.c           |    2 +-
 src/gallium/drivers/nv04/nv04_state.c             |    2 +-
 src/gallium/drivers/nv10/nv10_state.c             |    2 +-
 src/gallium/drivers/nv20/nv20_state.c             |    2 +-
 src/gallium/drivers/nv30/nv30_state.c             |    2 +-
 src/gallium/drivers/nv40/nv40_state.c             |    2 +-
 src/gallium/drivers/nv50/nv50_state.c             |    2 +-
 src/gallium/drivers/softpipe/sp_quad_alpha_test.c |    2 +-
 src/gallium/drivers/trace/tr_state.c              |    2 +-
 src/gallium/include/pipe/p_state.h                |    2 +-
 src/mesa/state_tracker/st_atom_depth.c            |    2 +-
 12 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/gallium/drivers/i915simple/i915_state.c b/src/gallium/drivers/i915simple/i915_state.c
index 92365f6..f46e46e 100644
--- a/src/gallium/drivers/i915simple/i915_state.c
+++ b/src/gallium/drivers/i915simple/i915_state.c
@@ -394,7 +394,7 @@ i915_create_depth_stencil_state(struct pipe_context *pipe,
 
    if (depth_stencil->alpha.enabled) {
       int test = i915_translate_compare_func(depth_stencil->alpha.func);
-      ubyte refByte = float_to_ubyte(depth_stencil->alpha.ref);
+      ubyte refByte = float_to_ubyte(depth_stencil->alpha.ref_value);
 
       cso->depth_LIS6 |= (S6_ALPHA_TEST_ENABLE |
 			  (test << S6_ALPHA_TEST_FUNC_SHIFT) |
diff --git a/src/gallium/drivers/i965simple/brw_cc.c b/src/gallium/drivers/i965simple/brw_cc.c
index 6191e73..3668123 100644
--- a/src/gallium/drivers/i965simple/brw_cc.c
+++ b/src/gallium/drivers/i965simple/brw_cc.c
@@ -233,7 +233,7 @@ static void upload_cc_unit( struct brw_context *brw )
       cc.cc3.alpha_test_func = 
 	 brw_translate_compare_func(brw->attribs.DepthStencil->alpha.func);
 
-      cc.cc7.alpha_ref.ub[0] = float_to_ubyte(brw->attribs.DepthStencil->alpha.ref);
+      cc.cc7.alpha_ref.ub[0] = float_to_ubyte(brw->attribs.DepthStencil->alpha.ref_value);
 
       cc.cc3.alpha_test_format = BRW_ALPHATEST_FORMAT_UNORM8;
    }
diff --git a/src/gallium/drivers/nv04/nv04_state.c b/src/gallium/drivers/nv04/nv04_state.c
index ff1933b..c07a86d 100644
--- a/src/gallium/drivers/nv04/nv04_state.c
+++ b/src/gallium/drivers/nv04/nv04_state.c
@@ -227,7 +227,7 @@ nv04_depth_stencil_alpha_state_create(struct pipe_context *pipe,
 
 	hw = MALLOC(sizeof(struct nv04_depth_stencil_alpha_state));
 
-	hw->control = float_to_ubyte(cso->alpha.ref);
+	hw->control = float_to_ubyte(cso->alpha.ref_value);
 	hw->control |= ( nv04_compare_func(cso->alpha.func) << NV04_DX5_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_SHIFT );
 	hw->control |= cso->alpha.enabled ? NV04_DX5_TEXTURED_TRIANGLE_CONTROL_ALPHA_TEST_ENABLE : 0;
 	hw->control |= NV04_DX5_TEXTURED_TRIANGLE_CONTROL_ORIGIN;
diff --git a/src/gallium/drivers/nv10/nv10_state.c b/src/gallium/drivers/nv10/nv10_state.c
index e401b35..622bcdf 100644
--- a/src/gallium/drivers/nv10/nv10_state.c
+++ b/src/gallium/drivers/nv10/nv10_state.c
@@ -352,7 +352,7 @@ nv10_depth_stencil_alpha_state_create(struct pipe_context *pipe,
 
 	hw->alpha.enabled = cso->alpha.enabled ? 1 : 0;
 	hw->alpha.func = nvgl_comparison_op(cso->alpha.func);
-	hw->alpha.ref  = float_to_ubyte(cso->alpha.ref);
+	hw->alpha.ref  = float_to_ubyte(cso->alpha.ref_value);
 
 	return (void *)hw;
 }
diff --git a/src/gallium/drivers/nv20/nv20_state.c b/src/gallium/drivers/nv20/nv20_state.c
index 8eb2bee..e8dc966 100644
--- a/src/gallium/drivers/nv20/nv20_state.c
+++ b/src/gallium/drivers/nv20/nv20_state.c
@@ -345,7 +345,7 @@ nv20_depth_stencil_alpha_state_create(struct pipe_context *pipe,
 
 	hw->alpha.enabled = cso->alpha.enabled ? 1 : 0;
 	hw->alpha.func = nvgl_comparison_op(cso->alpha.func);
-	hw->alpha.ref  = float_to_ubyte(cso->alpha.ref);
+	hw->alpha.ref  = float_to_ubyte(cso->alpha.ref_value);
 
 	return (void *)hw;
 }
diff --git a/src/gallium/drivers/nv30/nv30_state.c b/src/gallium/drivers/nv30/nv30_state.c
index 2ae66e7..63f5303 100644
--- a/src/gallium/drivers/nv30/nv30_state.c
+++ b/src/gallium/drivers/nv30/nv30_state.c
@@ -444,7 +444,7 @@ nv30_depth_stencil_alpha_state_create(struct pipe_context *pipe,
 	so_method(so, rankine, NV34TCL_ALPHA_FUNC_ENABLE, 3);
 	so_data  (so, cso->alpha.enabled ? 1 : 0);
 	so_data  (so, nvgl_comparison_op(cso->alpha.func));
-	so_data  (so, float_to_ubyte(cso->alpha.ref));
+	so_data  (so, float_to_ubyte(cso->alpha.ref_value));
 
 	if (cso->stencil[0].enabled) {
 		so_method(so, rankine, NV34TCL_STENCIL_FRONT_ENABLE, 8);
diff --git a/src/gallium/drivers/nv40/nv40_state.c b/src/gallium/drivers/nv40/nv40_state.c
index 34d109f..d5d81b1 100644
--- a/src/gallium/drivers/nv40/nv40_state.c
+++ b/src/gallium/drivers/nv40/nv40_state.c
@@ -454,7 +454,7 @@ nv40_depth_stencil_alpha_state_create(struct pipe_context *pipe,
 	so_method(so, curie, NV40TCL_ALPHA_TEST_ENABLE, 3);
 	so_data  (so, cso->alpha.enabled ? 1 : 0);
 	so_data  (so, nvgl_comparison_op(cso->alpha.func));
-	so_data  (so, float_to_ubyte(cso->alpha.ref));
+	so_data  (so, float_to_ubyte(cso->alpha.ref_value));
 
 	if (cso->stencil[0].enabled) {
 		so_method(so, curie, NV40TCL_STENCIL_FRONT_ENABLE, 8);
diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c
index ac236db..787ff95 100644
--- a/src/gallium/drivers/nv50/nv50_state.c
+++ b/src/gallium/drivers/nv50/nv50_state.c
@@ -429,7 +429,7 @@ nv50_depth_stencil_alpha_state_create(struct pipe_context *pipe,
 		so_method(so, tesla, NV50TCL_ALPHA_TEST_ENABLE, 1);
 		so_data  (so, 1);
 		so_method(so, tesla, NV50TCL_ALPHA_TEST_REF, 2);
-		so_data  (so, fui(cso->alpha.ref));
+		so_data  (so, fui(cso->alpha.ref_value));
 		so_data  (so, nvgl_comparison_op(cso->alpha.func));
 	} else {
 		so_method(so, tesla, NV50TCL_ALPHA_TEST_ENABLE, 1);
diff --git a/src/gallium/drivers/softpipe/sp_quad_alpha_test.c b/src/gallium/drivers/softpipe/sp_quad_alpha_test.c
index 5bebd14..85c9f03 100644
--- a/src/gallium/drivers/softpipe/sp_quad_alpha_test.c
+++ b/src/gallium/drivers/softpipe/sp_quad_alpha_test.c
@@ -14,7 +14,7 @@ static void
 alpha_test_quad(struct quad_stage *qs, struct quad_header *quad)
 {
    struct softpipe_context *softpipe = qs->softpipe;
-   const float ref = softpipe->depth_stencil->alpha.ref;
+   const float ref = softpipe->depth_stencil->alpha.ref_value;
    unsigned passMask = 0x0, j;
    const uint cbuf = 0; /* only output[0].alpha is tested */
    const float *aaaa = quad->output.color[cbuf][3];
diff --git a/src/gallium/drivers/trace/tr_state.c b/src/gallium/drivers/trace/tr_state.c
index 155f1cb..095b054 100644
--- a/src/gallium/drivers/trace/tr_state.c
+++ b/src/gallium/drivers/trace/tr_state.c
@@ -293,7 +293,7 @@ void trace_dump_depth_stencil_alpha_state(const struct pipe_depth_stencil_alpha_
    trace_dump_struct_begin("pipe_alpha_state");
    trace_dump_member(bool, &state->alpha, enabled);
    trace_dump_member(uint, &state->alpha, func);
-   trace_dump_member(float, &state->alpha, ref);
+   trace_dump_member(float, &state->alpha, ref_value);
    trace_dump_struct_end();
    trace_dump_member_end();
 
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 1f4dc3f..866c8a8 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -198,7 +198,7 @@ struct pipe_alpha_state
 {
    unsigned enabled:1;
    unsigned func:3;     /**< PIPE_FUNC_x */
-   float ref;           /**< reference value */
+   float ref_value;     /**< reference value */
 };
 
 
diff --git a/src/mesa/state_tracker/st_atom_depth.c b/src/mesa/state_tracker/st_atom_depth.c
index 8b5f22d..2d617bd 100644
--- a/src/mesa/state_tracker/st_atom_depth.c
+++ b/src/mesa/state_tracker/st_atom_depth.c
@@ -134,7 +134,7 @@ update_depth_stencil_alpha(struct st_context *st)
    if (st->ctx->Color.AlphaEnabled) {
       dsa->alpha.enabled = 1;
       dsa->alpha.func = st_compare_func_to_pipe(st->ctx->Color.AlphaFunc);
-      dsa->alpha.ref = st->ctx->Color.AlphaRef;
+      dsa->alpha.ref_value = st->ctx->Color.AlphaRef;
    }
 
    cso_set_depth_stencil_alpha(st->cso_context, dsa);




More information about the mesa-commit mailing list