mesa: replace _mesa_bzero() with memset()
[mesa.git] / src / mesa / drivers / dri / r300 / r300_fragprog_common.c
index 267ee81a7a6a1b04fe099794cb7a833c07827f02..acc66e0ae0231352425a14d1d028df402d70384d 100644 (file)
 
 #include "r300_fragprog_common.h"
 
-#include "shader/program.h"
 #include "shader/prog_parameter.h"
 #include "shader/prog_print.h"
 
 #include "compiler/radeon_compiler.h"
 
 #include "radeon_mesa_to_rc.h"
-#include "r300_state.h"
 
 
 static GLuint build_dtm(GLuint depthmode)
@@ -74,7 +72,7 @@ static void build_state(
 {
        int unit;
 
-       _mesa_bzero(state, sizeof(*state));
+       memset(state, 0, sizeof(*state));
 
        for(unit = 0; unit < 16; ++unit) {
                if (fp->Base.ShadowSamplers & (1 << unit)) {
@@ -120,7 +118,7 @@ static void insert_WPOS_trailer(struct r300_fragment_program_compiler *compiler,
                return;
        }
 
-       rc_transform_fragment_wpos(&compiler->Base, FRAG_ATTRIB_WPOS, fp->wpos_attr);
+       rc_transform_fragment_wpos(&compiler->Base, FRAG_ATTRIB_WPOS, fp->wpos_attr, GL_FALSE);
 }
 
 /**
@@ -223,7 +221,8 @@ static void translate_fragment_program(GLcontext *ctx, struct r300_fragment_prog
        compiler.state = fp->state;
        compiler.is_r500 = (r300->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV515) ? GL_TRUE : GL_FALSE;
        compiler.OutputDepth = FRAG_RESULT_DEPTH;
-       compiler.OutputColor = FRAG_RESULT_COLOR;
+       memset(compiler.OutputColor, 0, 4 * sizeof(unsigned));
+       compiler.OutputColor[0] = FRAG_RESULT_COLOR;
        compiler.AllocateHwInputs = &allocate_hw_inputs;
 
        if (compiler.Base.Debug) {
@@ -272,7 +271,7 @@ struct r300_fragment_program *r300SelectAndTranslateFragmentShader(GLcontext *ct
 
        fp = fp_list->progs;
        while (fp) {
-               if (_mesa_memcmp(&fp->state, &state, sizeof(state)) == 0) {
+               if (memcmp(&fp->state, &state, sizeof(state)) == 0) {
                        return r300->selected_fp = fp;
                }
                fp = fp->next;