r600g: inline r600_translate_ds_func
authorMarek Olšák <maraeo@gmail.com>
Tue, 14 Feb 2012 14:14:58 +0000 (15:14 +0100)
committerMarek Olšák <maraeo@gmail.com>
Tue, 14 Feb 2012 14:49:24 +0000 (15:49 +0100)
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_state.c

index 1d13547f4de1a1f70fe45987952a4e31b6c365a1..5c28720ebc8e9751ad52ade8b9e640270222bc09 100644 (file)
@@ -173,12 +173,6 @@ static uint32_t r600_translate_blend_factor(int blend_fact)
        return 0;
 }
 
-/* translates straight */
-static uint32_t r600_translate_ds_func(int func)
-{
-       return func;
-}
-
 static unsigned r600_tex_wrap(unsigned wrap)
 {
        switch (wrap) {
@@ -834,14 +828,14 @@ static void *evergreen_create_dsa_state(struct pipe_context *ctx,
        /* stencil */
        if (state->stencil[0].enabled) {
                db_depth_control |= S_028800_STENCIL_ENABLE(1);
-               db_depth_control |= S_028800_STENCILFUNC(r600_translate_ds_func(state->stencil[0].func));
+               db_depth_control |= S_028800_STENCILFUNC(state->stencil[0].func); /* translates straight */
                db_depth_control |= S_028800_STENCILFAIL(r600_translate_stencil_op(state->stencil[0].fail_op));
                db_depth_control |= S_028800_STENCILZPASS(r600_translate_stencil_op(state->stencil[0].zpass_op));
                db_depth_control |= S_028800_STENCILZFAIL(r600_translate_stencil_op(state->stencil[0].zfail_op));
 
                if (state->stencil[1].enabled) {
                        db_depth_control |= S_028800_BACKFACE_ENABLE(1);
-                       db_depth_control |= S_028800_STENCILFUNC_BF(r600_translate_ds_func(state->stencil[1].func));
+                       db_depth_control |= S_028800_STENCILFUNC_BF(state->stencil[1].func); /* translates straight */
                        db_depth_control |= S_028800_STENCILFAIL_BF(r600_translate_stencil_op(state->stencil[1].fail_op));
                        db_depth_control |= S_028800_STENCILZPASS_BF(r600_translate_stencil_op(state->stencil[1].zpass_op));
                        db_depth_control |= S_028800_STENCILZFAIL_BF(r600_translate_stencil_op(state->stencil[1].zfail_op));
index 03cb780aa6501b558184d8e55c167fec7d4c6a1a..823eb9c25bbe808cfb2aee4b8bff12c5e3b5938a 100644 (file)
@@ -116,12 +116,6 @@ static uint32_t r600_translate_blend_factor(int blend_fact)
        return 0;
 }
 
-/* translates straight */
-static uint32_t r600_translate_ds_func(int func)
-{
-       return func;
-}
-
 static unsigned r600_tex_wrap(unsigned wrap)
 {
        switch (wrap) {
@@ -834,14 +828,14 @@ static void *r600_create_dsa_state(struct pipe_context *ctx,
        /* stencil */
        if (state->stencil[0].enabled) {
                db_depth_control |= S_028800_STENCIL_ENABLE(1);
-               db_depth_control |= S_028800_STENCILFUNC(r600_translate_ds_func(state->stencil[0].func));
+               db_depth_control |= S_028800_STENCILFUNC(state->stencil[0].func); /* translates straight */
                db_depth_control |= S_028800_STENCILFAIL(r600_translate_stencil_op(state->stencil[0].fail_op));
                db_depth_control |= S_028800_STENCILZPASS(r600_translate_stencil_op(state->stencil[0].zpass_op));
                db_depth_control |= S_028800_STENCILZFAIL(r600_translate_stencil_op(state->stencil[0].zfail_op));
 
                if (state->stencil[1].enabled) {
                        db_depth_control |= S_028800_BACKFACE_ENABLE(1);
-                       db_depth_control |= S_028800_STENCILFUNC_BF(r600_translate_ds_func(state->stencil[1].func));
+                       db_depth_control |= S_028800_STENCILFUNC_BF(state->stencil[1].func); /* translates straight */
                        db_depth_control |= S_028800_STENCILFAIL_BF(r600_translate_stencil_op(state->stencil[1].fail_op));
                        db_depth_control |= S_028800_STENCILZPASS_BF(r600_translate_stencil_op(state->stencil[1].zpass_op));
                        db_depth_control |= S_028800_STENCILZFAIL_BF(r600_translate_stencil_op(state->stencil[1].zfail_op));