Re: [Mesa-dev] [PATCH] mesa: replace GLenum with GLenum16 in common structures (v4)

2018-01-29 Thread Marek Olšák
Looks good to me. Marek On Mon, Jan 29, 2018 at 6:54 PM, Brian Paul wrote: > From: Marek Olšák > > v2: - fix glGet* > - also use GLenum16 for DrawBuffers > v3: - rebase to top of tree (BrianP) and incorporate Ian's suggestions > v4: - fix a GLenum16 bug in VBO/save code, add some STATIC_ASS

[Mesa-dev] [PATCH] mesa: replace GLenum with GLenum16 in common structures (v4)

2018-01-29 Thread Brian Paul
From: Marek Olšák v2: - fix glGet* - also use GLenum16 for DrawBuffers v3: - rebase to top of tree (BrianP) and incorporate Ian's suggestions v4: - fix a GLenum16 bug in VBO/save code, add some STATIC_ASSERT()s gl_context = 152432 -> 136840 bytes vbo_context = 22096 -> 20608 bytes Reviewed-

Re: [Mesa-dev] [PATCH] mesa: replace GLenum with GLenum16 in common structures

2017-11-14 Thread Gustaw Smolarczyk
2017-11-14 15:04 GMT+01:00 Marek Olšák : > On Mon, Nov 13, 2017 at 10:19 PM, Ian Romanick wrote: >> On 11/08/2017 07:16 PM, Marek Olšák wrote: >>> From: Marek Olšák >>> >>> For lower CPU cache usage. All enums fit within 2 bytes. >> >> Have you benchmarked this on anything? My recollection is th

Re: [Mesa-dev] [PATCH] mesa: replace GLenum with GLenum16 in common structures

2017-11-14 Thread Nicolai Hähnle
On 09.11.2017 04:16, Marek Olšák wrote: From: Marek Olšák For lower CPU cache usage. All enums fit within 2 bytes. gl_context = 152400 -> 136824 bytes vbo_context = 22696 -> 21520 bytes Reviewed-by: Nicolai Hähnle --- src/mesa/drivers/dri/nouveau/nv04_state_frag.c | 4 +- src/mesa/d

Re: [Mesa-dev] [PATCH] mesa: replace GLenum with GLenum16 in common structures

2017-11-14 Thread Marek Olšák
On Mon, Nov 13, 2017 at 10:19 PM, Ian Romanick wrote: > On 11/08/2017 07:16 PM, Marek Olšák wrote: >> From: Marek Olšák >> >> For lower CPU cache usage. All enums fit within 2 bytes. > > Have you benchmarked this on anything? My recollection is that for many > things loads and stores of 16-bit v

Re: [Mesa-dev] [PATCH] mesa: replace GLenum with GLenum16 in common structures

2017-11-13 Thread Ian Romanick
On 11/08/2017 07:16 PM, Marek Olšák wrote: > From: Marek Olšák > > For lower CPU cache usage. All enums fit within 2 bytes. Have you benchmarked this on anything? My recollection is that for many things loads and stores of 16-bit values is more expensive than 8- or 32-bit values on 64-bit archi

Re: [Mesa-dev] [PATCH] mesa: replace GLenum with GLenum16 in common structures

2017-11-09 Thread Marek Olšák
>> struct gl_colorbuffer_attrib >> { >> GLuint ClearIndex; /**< Index for glClear */ >> union gl_color_union ClearColor;/**< Color for glClear, >> unclamped */ >> GLuint IndexMask; /**< Color index write mask >> */ >> GLubyt

Re: [Mesa-dev] [PATCH] mesa: replace GLenum with GLenum16 in common structures

2017-11-08 Thread Brian Paul
On 11/08/2017 08:16 PM, Marek Olšák wrote: From: Marek Olšák For lower CPU cache usage. All enums fit within 2 bytes. gl_context = 152400 -> 136824 bytes Wow. vbo_context = 22696 -> 21520 bytes --- src/mesa/drivers/dri/nouveau/nv04_state_frag.c | 4 +- src/mesa/drivers/dri/nouveau/nv1

[Mesa-dev] [PATCH] mesa: replace GLenum with GLenum16 in common structures

2017-11-08 Thread Marek Olšák
From: Marek Olšák For lower CPU cache usage. All enums fit within 2 bytes. gl_context = 152400 -> 136824 bytes vbo_context = 22696 -> 21520 bytes --- src/mesa/drivers/dri/nouveau/nv04_state_frag.c | 4 +- src/mesa/drivers/dri/nouveau/nv10_state_frag.c | 4 +- src/mesa/main/glheader.h