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,882
    • Issues 2,882
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 924
    • Merge requests 924
  • 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
  • !14304

Open
Created Dec 26, 2021 by Thomas Andersen@phomesContributor
  • Report abuse
Report abuse

nvc0: avoid converting a too large value from int to uint8_t

  • Overview 2
  • Commits 1
  • Pipelines 4
  • Changes 1

I do not understand the code here well enough to tell what the correct behavior is. prog->num_gprs is a unit8_t, so my guess is that the MIN is there to make sure we stay within the limit of that. However the current logic is a bit strange. If info_out.bin.maxGPR + 5 is bellow 256 we use that. If not then we write 256 which converts to 0 in a uint8_t...

The patch changes the upper value to 255.

Fixes a warning with clang

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: nvc0-conversion