[Mesa-dev] Removing unused opcodes (TGSI, Mesa IR)
Jose Fonseca
jfonseca at vmware.com
Wed Nov 19 23:12:25 PST 2014
> Does anyone remember if there was a reason that the TGSI_OPCODE_ tokens are #defines instead of an enumeration?
I think it was because enums are not allowed in struct bit fields, furthermore C++ will complain about enum<->int conversion without cast. (IIRC this is the reason many things in src/gallium/include/pipe/p_defines.h were defines.)
That said, I think we should revisit this. At for TGSI opcodes, relatively few lines of code access packed tgsi tokens directly. And enums look nicer when debugging.
Jose
________________________________________
From: mesa-dev <mesa-dev-bounces at lists.freedesktop.org> on behalf of Brian Paul <brianp at vmware.com>
Sent: 13 November 2014 16:27
To: Eric Anholt; mesa-dev at lists.freedesktop.org
Subject: Re: [Mesa-dev] Removing unused opcodes (TGSI, Mesa IR)
On 11/12/2014 06:18 PM, Eric Anholt wrote:
> This series removes a bunch of unused opcodes, mostly from TGSI. It
> doesn't go as far as we could possibly go -- while I welcome discussion
> for future patch series deleting more, I hope that discussion doesn't
> derail the review process for these changes.
>
> I haven't messed with the subroutine stuff, since I don't know what people
> are planning with that. I also haven't messed with the pack/unpack
> opcodes in TGSI, since they might be useful for some of the GLSL packing
> stuff.
>
> Testing status: compile-tested ilo/r600/softpipe, touch-tested softpipe.
Except for what Jose said, this looks fine to me.
Does anyone remember if there was a reason that the TGSI_OPCODE_ tokens
are #defines instead of an enumeration?
-Brian
_______________________________________________
mesa-dev mailing list
mesa-dev at lists.freedesktop.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.freedesktop.org_mailman_listinfo_mesa-2Ddev&d=AAIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=zfmBZnnVGHeYde45pMKNnVyzeaZbdIqVLprmZCM2zzE&m=MUbS190yOjHL36ha_AaaQFM1__dfKUWsBqH34fL_9GU&s=c06VM0QMqrPh3u4ifx1opmH41ktcGp-6VAhIkN8gkz0&e=
More information about the mesa-dev
mailing list