Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2,760
    • Issues 2,760
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 914
    • Merge requests 914
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mesa
  • mesamesa
  • Merge requests
  • !16945

Add shared CONCAT and PASTE macros

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Matt Coster requested to merge MTCoster/mesa:concat-paste-macros into main Jun 09, 2022
  • Overview 9
  • Commits 9
  • Pipelines 8
  • Changes 6

This series unifies several disparate helper macros for concatenating tokens with macros. The chosen nomenclature (subject to feedback) is:

  • PASTE2(a, b) to directly paste tokens, and
  • CONCAT2(a, b) to paste tokens with an added layer of indirection to allow nested macros to be expanded before pasting.

Equivalents for three and four arguments are named PASTE3, PASTE4, CONCAT3 and CONCAT4.

The nine patches form three groups:

  • 1-4 unify the naming of existing macros without removing any definitions,
  • 5 adds new shared definitions to util/macros.h, and
  • 6-9 remove other definitions from around the codebase.

For the first and third groups, there is one patch each for amd, gallium and glx, intel.

I've deliberately not updated the CONCAT() and CONCAT3() macros defined and used in assyntax.h, since files that include it appear to be reasonably self-contained otherwise.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> [intel patches only]
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> [glx+util patches only]
Edited Jun 30, 2022 by Matt Coster
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: concat-paste-macros