Re: [Mesa3d-dev] util_format cleanup leftover: Gallium BGRA vertex swizzles

2010-03-12 Thread José Fonseca
On Fri, 2010-03-12 at 08:17 -0800, Brian Paul wrote:
> Jose wrote:
> > On Thu, 2010-03-11 at 17:50 -0800, Marek Olšák wrote:
> > > Please see this commit:
> > > http://cgit.freedesktop.org/~mareko/mesa/commit/?id=177a4432aa88fc68d83895ae71b7ad2c86a1e7e3
> > >
> > > Subject: [PATCH] gallium: fix BGRA vertex color swizzles
> > >
> > > The mapping for vertex_array_bgra:
> > > (gl -> st -> translate)
> > > GL_RGBA -> PIPE_FORMAT_R8G8B8A8 (RGBA) -> no swizzle (XYZW)
> > > GL_BGRA -> PIPE_FORMAT_A8R8G8B8 (ARGB) -> ZYXW (BGRA again??)
> > >
> > > Iẗ́'s pretty clear that PIPE_FORMAT_A8R8G8B8 here is wrong. This
> > > commit
> > > fixes the pipe format and removes obvious workarounds in
> > > util/translate.
> > >
> > > Tested with: softpipe, llvmpipe, r300g.
> > >
> > > Please review.
> > 
> > Marek,
> > 
> > Well spotted.
> > 
> > These were cases where formats were being used inconsistently in respect
> > to their LSB->MSB vs MSB->LSB meanings and my automatic format rename
> > did no more than flipping the inconsistency the otherway around.
> > 
> > Looks good to me.
> > 
> > I've went ahead and commited since I needed to fix up other state
> > trackers.
> 
> Should this go into the 7.8 branch too, Jose?

It's a cleanup -- it doesn't actually change behavior --, but I think it
is better  to port to 7.8 since cherrypicking future related fixes could
end up having different effect on 7.8 branch.

Jose


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


Re: [Mesa3d-dev] util_format cleanup leftover: Gallium BGRA vertex swizzles

2010-03-12 Thread Brian Paul
Jose wrote:
> On Thu, 2010-03-11 at 17:50 -0800, Marek Olšák wrote:
> > Please see this commit:
> > http://cgit.freedesktop.org/~mareko/mesa/commit/?id=177a4432aa88fc68d83895ae71b7ad2c86a1e7e3
> >
> > Subject: [PATCH] gallium: fix BGRA vertex color swizzles
> >
> > The mapping for vertex_array_bgra:
> > (gl -> st -> translate)
> > GL_RGBA -> PIPE_FORMAT_R8G8B8A8 (RGBA) -> no swizzle (XYZW)
> > GL_BGRA -> PIPE_FORMAT_A8R8G8B8 (ARGB) -> ZYXW (BGRA again??)
> >
> > Iẗ́'s pretty clear that PIPE_FORMAT_A8R8G8B8 here is wrong. This
> > commit
> > fixes the pipe format and removes obvious workarounds in
> > util/translate.
> >
> > Tested with: softpipe, llvmpipe, r300g.
> >
> > Please review.
> 
> Marek,
> 
> Well spotted.
> 
> These were cases where formats were being used inconsistently in respect
> to their LSB->MSB vs MSB->LSB meanings and my automatic format rename
> did no more than flipping the inconsistency the otherway around.
> 
> Looks good to me.
> 
> I've went ahead and commited since I needed to fix up other state
> trackers.

Should this go into the 7.8 branch too, Jose?

-Brian

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


Re: [Mesa3d-dev] util_format cleanup leftover: Gallium BGRA vertex swizzles

2010-03-12 Thread José Fonseca
On Thu, 2010-03-11 at 17:50 -0800, Marek Olšák wrote:
> Please see this commit:
> http://cgit.freedesktop.org/~mareko/mesa/commit/?id=177a4432aa88fc68d83895ae71b7ad2c86a1e7e3
> 
> Subject: [PATCH] gallium: fix BGRA vertex color swizzles
> 
> The mapping for vertex_array_bgra:
> (gl -> st -> translate)
> GL_RGBA -> PIPE_FORMAT_R8G8B8A8 (RGBA) -> no swizzle (XYZW)
> GL_BGRA -> PIPE_FORMAT_A8R8G8B8 (ARGB) -> ZYXW (BGRA again??)
> 
> Iẗ́'s pretty clear that PIPE_FORMAT_A8R8G8B8 here is wrong. This
> commit
> fixes the pipe format and removes obvious workarounds in
> util/translate.
> 
> Tested with: softpipe, llvmpipe, r300g.
> 
> Please review.

Marek,

Well spotted.

These were cases where formats were being used inconsistently in respect
to their LSB->MSB vs MSB->LSB meanings and my automatic format rename
did no more than flipping the inconsistency the otherway around.

Looks good to me.

I've went ahead and commited since I needed to fix up other state
trackers.

Jose


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


[Mesa3d-dev] util_format cleanup leftover: Gallium BGRA vertex swizzles

2010-03-11 Thread Marek Olšák
Please see this commit:
http://cgit.freedesktop.org/~mareko/mesa/commit/?id=177a4432aa88fc68d83895ae71b7ad2c86a1e7e3

Subject: [PATCH] gallium: fix BGRA vertex color swizzles

The mapping for vertex_array_bgra:
(gl -> st -> translate)
GL_RGBA -> PIPE_FORMAT_R8G8B8A8 (RGBA) -> no swizzle (XYZW)
GL_BGRA -> PIPE_FORMAT_A8R8G8B8 (ARGB) -> ZYXW (BGRA again??)

Iẗ́'s pretty clear that PIPE_FORMAT_A8R8G8B8 here is wrong. This commit
fixes the pipe format and removes obvious workarounds in util/translate.

Tested with: softpipe, llvmpipe, r300g.

Please review.

-Marek
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev