Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • V virglrenderer
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 90
    • Issues 90
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 39
    • Merge requests 39
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • virgl
  • virglrenderer
  • Merge requests
  • !429

shader: refactor vrend_shader.c for clarity

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Ryan Neph requested to merge ryanneph/virglrenderer:refactor_shader into master Oct 03, 2020
  • Overview 38
  • Commits 12
  • Pipelines 18
  • Changes 2

struct dump_ctx is passed-by-pointer to nearly every function in vrend_shader.c as a monolithic data container, although none or only a few of its members are reassigned during each function call.

This patch refactors vrend_shader.c with a preference towards passing "const struct *dump_ctx" instead, and additionally passing affected members of dump_ctx by non-const pointer when reassignment of member values is required.

This makes it easier to understand the effects of each function call on the state of struct dump_ctx and should make it simpler to identify the causes of TGSI to GLSL conversion issues in the future.

Signed-off-by: Ryan Neph ryanneph@google.com

Issue #179 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: refactor_shader