[Mesa-dev] [PATCH] r300g: use CS_OUT_TABLE better

Marek Olšák maraeo at gmail.com
Mon Apr 26 11:34:21 PDT 2010


I've went ahead and committed this patch.

-Marek

On Mon, Apr 26, 2010 at 7:25 PM, Matt Turner <mattst88 at gmail.com> wrote:

> On Mon, Apr 26, 2010 at 1:20 PM, Corbin Simpson
> <mostawesomedude at gmail.com> wrote:
> > I'll apply this when I get home. Looks good.
> >
> > ~ C.
> >
> > Reviewed-by: Corbin Simpson <MostAwesomeDude at gmail.com>
> >
> > On Mon, Apr 26, 2010 at 10:18 AM, Matt Turner <mattst88 at gmail.com>
> wrote:
> >> Signed-off-by: Matt Turner <mattst88 at gmail.com>
> >> ---
> >>  src/gallium/drivers/r300/r300_emit.c |   14 +++-----------
> >>  1 files changed, 3 insertions(+), 11 deletions(-)
> >>
> >> diff --git a/src/gallium/drivers/r300/r300_emit.c
> b/src/gallium/drivers/r300/r300_emit.c
> >> index 2816c35..13dc93f 100644
> >> --- a/src/gallium/drivers/r300/r300_emit.c
> >> +++ b/src/gallium/drivers/r300/r300_emit.c
> >> @@ -92,9 +92,7 @@ void r300_emit_clip_state(struct r300_context* r300,
> >>                 (r300->screen->caps.is_r500 ?
> >>                  R500_PVS_UCP_START : R300_PVS_UCP_START));
> >>         OUT_CS_ONE_REG(R300_VAP_PVS_UPLOAD_DATA, 6 * 4);
> >> -        for (i = 0; i < 6; i++) {
> >> -            OUT_CS_TABLE(clip->ucp[i], 4);
> >> -        }
> >> +        OUT_CS_TABLE(clip->ucp, 6 * 4);
> >>         OUT_CS_REG(R300_VAP_CLIP_CNTL, ((1 << clip->nr) - 1) |
> >>                 R300_PS_UCP_MODE_CLIP_AS_TRIFAN);
> >>         END_CS;
> >> @@ -416,12 +414,9 @@ void r500_emit_fs_constants(struct r300_context*
> r300, unsigned size, void *stat
> >>     OUT_CS_REG(R500_GA_US_VECTOR_INDEX,
> R500_GA_US_VECTOR_INDEX_TYPE_CONST);
> >>     OUT_CS_ONE_REG(R500_GA_US_VECTOR_DATA, count * 4);
> >>     for(i = 0; i < count; ++i) {
> >> -        const float *data;
> >>         assert(constants->Constants[i].Type == RC_CONSTANT_EXTERNAL);
> >> -        data = buf->constants[i];
> >> -
> >> -        OUT_CS_TABLE(data, 4);
> >>     }
> >> +    OUT_CS_TABLE(buf->constants, count * 4);
> >>     END_CS;
> >>  }
> >>
> >> @@ -1013,10 +1008,7 @@ void r300_emit_vs_constants(struct r300_context*
> r300,
> >>                (r300->screen->caps.is_r500 ?
> >>                R500_PVS_CONST_START : R300_PVS_CONST_START));
> >>     OUT_CS_ONE_REG(R300_VAP_PVS_UPLOAD_DATA, count * 4);
> >> -    for (i = 0; i < count; i++) {
> >> -        const float *data = buf->constants[i];
> >> -        OUT_CS_TABLE(data, 4);
> >> -    }
> >> +    OUT_CS_TABLE(buf->constants, count * 4);
> >>     END_CS;
> >>  }
> >>
> >> --
> >> 1.6.4.4
> >>
> >>
> >
> >
> >
> > --
> > When the facts change, I change my mind. What do you do, sir? ~ Keynes
> >
> > Corbin Simpson
> > <MostAwesomeDude at gmail.com>
> >
>
> Cool. Attached patch kills off the now unused i loop index variables too.
>
> Matt
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100426/871ea719/attachment.htm>


More information about the mesa-dev mailing list