Re: [Mesa-dev] [PATCH] st/mesa: handle SNORM formats in generic CopyPixels path

2013-06-24 Thread Jose Fonseca
Yes, that's a very good idea. The implementation would be fast, furthermore the implementation body would be small, so it could be an inline function in u_format.h, therefore allowing the compiler to coalesce multiple calls too. It implies that the u_format_table.py script needs to parse src/g

Re: [Mesa-dev] [PATCH] st/mesa: handle SNORM formats in generic CopyPixels path

2013-06-24 Thread Marek Olšák
Wouldn't it be easier to just make util_format_description table-based and inline instead of switch-based? Something like: return format < PIPE_FORMAT_COUNT ? table[format] : NULL; Marek On Mon, Jun 24, 2013 at 10:12 AM, Jose Fonseca wrote: > > > - Original Message - >> --- >> src/gall

Re: [Mesa-dev] [PATCH] st/mesa: handle SNORM formats in generic CopyPixels path

2013-06-24 Thread Jose Fonseca
- Original Message - > On Mon, Jun 24, 2013 at 6:12 PM, Jose Fonseca wrote: > > > > > > - Original Message - > >> --- > >>  src/gallium/auxiliary/util/u_format.c     | 14 ++ > >>  src/gallium/auxiliary/util/u_format.h     |  3 +++ > >>  src/mesa/state_tracker/st_cb_dr

Re: [Mesa-dev] [PATCH] st/mesa: handle SNORM formats in generic CopyPixels path

2013-06-24 Thread Dave Airlie
On Mon, Jun 24, 2013 at 6:12 PM, Jose Fonseca wrote: > > > - Original Message - >> --- >> src/gallium/auxiliary/util/u_format.c | 14 ++ >> src/gallium/auxiliary/util/u_format.h | 3 +++ >> src/mesa/state_tracker/st_cb_drawpixels.c | 6 ++ >> 3 files changed, 23

Re: [Mesa-dev] [PATCH] st/mesa: handle SNORM formats in generic CopyPixels path

2013-06-24 Thread Jose Fonseca
- Original Message - > --- > src/gallium/auxiliary/util/u_format.c | 14 ++ > src/gallium/auxiliary/util/u_format.h | 3 +++ > src/mesa/state_tracker/st_cb_drawpixels.c | 6 ++ > 3 files changed, 23 insertions(+) > > diff --git a/src/gallium/auxiliary/util/u_fo

[Mesa-dev] [PATCH] st/mesa: handle SNORM formats in generic CopyPixels path

2013-06-23 Thread Marek Olšák
--- src/gallium/auxiliary/util/u_format.c | 14 ++ src/gallium/auxiliary/util/u_format.h | 3 +++ src/mesa/state_tracker/st_cb_drawpixels.c | 6 ++ 3 files changed, 23 insertions(+) diff --git a/src/gallium/auxiliary/util/u_format.c b/src/gallium/auxiliary/util/u_format