Re: [Mesa-dev] [PATCH 1/2] st: fix st_choose_matching_format to ignore intensity

2014-03-30 Thread Marek Olšák
This patch: Reviewed-by: Marek Olšák Marek On Sat, Mar 29, 2014 at 12:02 AM, Chris Forbes wrote: > _mesa_format_matches_format_and_type() returns true for > GL_RED/GL_RED_INTEGER (with an appropriate type) into an intensity > mesa_format. > > We want the `red`-based format instead, regardless

Re: [Mesa-dev] [PATCH 1/2] st: fix st_choose_matching_format to ignore intensity

2014-03-30 Thread Chris Forbes
On Sun, Mar 30, 2014 at 12:36 AM, Brian Paul wrote: > Let's put that closing */ on the next line to match the format of other > comments. I keep doing that -- I guess I should fix my editor. :( > For both, Reviewed-by: Brian PaulHowever, have you > retested piglit with softpipe just to be sa

Re: [Mesa-dev] [PATCH 1/2] st: fix st_choose_matching_format to ignore intensity

2014-03-29 Thread Chris Forbes
This should provide reasonable behavior for those paths too -- the combination of these two patches preserves the current behavior for st_choose_matching_format. It's not quite ideal (I believe actual use of intensity formats in some situations will miss the fast path), but it's no worse. I'm not

Re: [Mesa-dev] [PATCH 1/2] st: fix st_choose_matching_format to ignore intensity

2014-03-29 Thread Marek Olšák
However st_choose_matching_format is also used by other clients such as TexImage, GetTexImage, and ReadPixels, so this should really be fixed in the problematic caller of st_choose_matching_format, that is DrawPixels. Marek On Sat, Mar 29, 2014 at 7:48 PM, Chris Forbes wrote: > On Sun, Mar 30, 2

Re: [Mesa-dev] [PATCH 1/2] st: fix st_choose_matching_format to ignore intensity

2014-03-29 Thread Chris Forbes
On Sun, Mar 30, 2014 at 12:50 AM, Marek Olšák wrote: > Why is this needed? The second patch fixes format/type to mesa_format matching for intensity formats, so that texture uploads / buffer object clears / etc can get the memcpy paths. (Previously, we were testing on pixel format = GL_INTENSITY,

Re: [Mesa-dev] [PATCH 1/2] st: fix st_choose_matching_format to ignore intensity

2014-03-29 Thread Marek Olšák
On Sat, Mar 29, 2014 at 12:02 AM, Chris Forbes wrote: > _mesa_format_matches_format_and_type() returns true for > GL_RED/GL_RED_INTEGER (with an appropriate type) into an intensity > mesa_format. > > We want the `red`-based format instead, regardless of the order we find > them in our walk of the

Re: [Mesa-dev] [PATCH 1/2] st: fix st_choose_matching_format to ignore intensity

2014-03-29 Thread Brian Paul
On 03/28/2014 05:02 PM, Chris Forbes wrote: _mesa_format_matches_format_and_type() returns true for GL_RED/GL_RED_INTEGER (with an appropriate type) into an intensity mesa_format. We want the `red`-based format instead, regardless of the order we find them in our walk of the mesa formats list.

[Mesa-dev] [PATCH 1/2] st: fix st_choose_matching_format to ignore intensity

2014-03-28 Thread Chris Forbes
_mesa_format_matches_format_and_type() returns true for GL_RED/GL_RED_INTEGER (with an appropriate type) into an intensity mesa_format. We want the `red`-based format instead, regardless of the order we find them in our walk of the mesa formats list. Signed-off-by: Chris Forbes --- src/mesa/sta