gallium: it's a reference value, not a reference number
authorZack Rusin <zackr@vmware.com>
Mon, 26 Jan 2009 20:07:08 +0000 (15:07 -0500)
committerZack Rusin <zackr@vmware.com>
Tue, 27 Jan 2009 17:20:26 +0000 (12:20 -0500)
12 files changed:
src/gallium/drivers/i915simple/i915_state.c
src/gallium/drivers/i965simple/brw_cc.c
src/gallium/drivers/nv04/nv04_state.c
src/gallium/drivers/nv10/nv10_state.c
src/gallium/drivers/nv20/nv20_state.c
src/gallium/drivers/nv30/nv30_state.c
src/gallium/drivers/nv40/nv40_state.c
src/gallium/drivers/nv50/nv50_state.c
src/gallium/drivers/softpipe/sp_quad_alpha_test.c
src/gallium/drivers/trace/tr_state.c
src/gallium/include/pipe/p_state.h
src/mesa/state_tracker/st_atom_depth.c

index 92365f6a7a24b51234a7112ad4318cbf33427e3f..f46e46eb22ba197ce33b225354758e31af701839 100644 (file)
@@ -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) |
index 6191e73d12d5a8ff610c7f223ac0dd6bbb8087b1..3668123e2e1872f79184deb86cf8d282b2299ae5 100644 (file)
@@ -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;
    }
index ff1933b5508f19e565d2ed90558db82de4dad4f2..c07a86dd0e8798359037cb65c92ac5f918ba421c 100644 (file)
@@ -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;
index e401b3590e111a65b22f7c0585757d118afa7ea3..622bcdf22e764d489c30a5042eb4039780f80a39 100644 (file)
@@ -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;
 }
index 8eb2bee93d34580bda852ced24a29a1f9f41cf84..e8dc9665e8210c4e1ac9f81e3957e8c3164bc482 100644 (file)
@@ -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;
 }
index 2ae66e70859f4481a12fa821f7b16a54c3df1054..63f530316679cb91a514dd6c1bf1f52a2a8a5dd2 100644 (file)
@@ -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);
index 34d109f9af7f5aba58382a37e62e2f837ce04c16..d5d81b137178a1e900b7c6b5c6ad08eb325636d7 100644 (file)
@@ -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);
index ac236db29834cf3e26333f9b57a88469661ce075..787ff958ec7003c695f7923a87029e32a61f9c50 100644 (file)
@@ -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);
index 5bebd141e92ae74130b13beee26bdf121efc13f8..85c9f037a3ccd2d151ac265d4d4c793deea32409 100644 (file)
@@ -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];
index 155f1cb859e37213dc51445a292e9f18619793d0..095b054bb562033cb9752971a54daad882672036 100644 (file)
@@ -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();
 
index 1f4dc3f7dcb220731ae91f55fe92003323d9d8e8..866c8a82dcca737250fb0e5217f76fa0e24094f3 100644 (file)
@@ -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 */
 };
 
 
index 8b5f22d0efe02ee338282bee1d02010893aee7c8..2d617bd95dcae756cf82b2ed883af3fb8680ed69 100644 (file)
@@ -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);