[Mesa-dev] [PATCH 01/20] mesa: replace GLenum with GLenum16 in common structures (v2)
Brian Paul
brianp at vmware.com
Mon Jan 29 16:22:32 UTC 2018
Just FYI, I've rebased this patch to ToT Mesa and incorporated Ian's
nit-picks. I checked with Marek and he's good with me pushing it.
I'll do so today if there's no other concerns.
-Brian
On 11/22/2017 02:00 PM, Ian Romanick wrote:
> There are a couple small nits below.
>
> I haven't reviewed this with the rigor that I would like because there
> are just so many enums changed all at once. I fear the day someone has
> a bug that bisects to this commit.
>
> The difficult part was matching the changes in get_hash_params.py to the
> changes in mtypes.h. It seems like modern C or C++ should have a way
> that we could let the compiler sort some of this out. GCC has typeof(),
> but it looks like the equivalent things in Visual Studio are all
> run-time checks (typeid()) or deprecated (__typeof()). Ugh.
>
> On 11/21/2017 10:01 AM, Marek Olšák wrote:
>> From: Marek Olšák <marek.olsak at amd.com>
>>
>> For lower CPU cache usage. All enums fit within 2 bytes.
>>
>> v2: - fix glGet*
>> - also use GLenum16 for DrawBuffers
>>
>> gl_context = 152488 -> 136896 bytes
>> vbo_context = 22696 -> 21520 bytes
>> ---
>> src/mesa/drivers/common/meta.h | 2 +-
>> src/mesa/drivers/dri/nouveau/nv04_state_frag.c | 4 +-
>> src/mesa/drivers/dri/nouveau/nv10_state_frag.c | 4 +-
>> src/mesa/main/attrib.c | 13 +-
>> src/mesa/main/buffers.c | 12 +-
>> src/mesa/main/buffers.h | 2 +-
>> src/mesa/main/context.c | 2 +-
>> src/mesa/main/get.c | 38 +++++
>> src/mesa/main/get_hash_params.py | 152 +++++++++---------
>> src/mesa/main/glheader.h | 1 +
>> src/mesa/main/mtypes.h | 210 ++++++++++++-------------
>> src/mesa/vbo/vbo_exec.h | 2 +-
>> src/mesa/vbo/vbo_save.h | 4 +-
>> src/mesa/vbo/vbo_save_draw.c | 2 +-
>> 14 files changed, 249 insertions(+), 199 deletions(-)
More information about the mesa-dev
mailing list