Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
mesa
mesa
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2,427
    • Issues 2,427
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 671
    • Merge Requests 671
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mesa
  • mesamesa
  • Merge Requests
  • !1497

Merged
Created Jul 30, 2019 by Jonathan Marek@fltoDeveloper

etnaviv: add alternative NIR based compiler

  • Overview 30
  • Commits 5
  • Pipelines 18
  • Changes 22

Adds a NIR-based compiler alternative to the current TGSI compiler. It is only used with ETNA_MESA_DEBUG=nir

I have a GC2000, GC3000, GC7000Lite for testing. With this I can pass deqp GLES2 shader tests, with the following exceptions:

  • dynamic uniform load in fragment shader doesn't work on GC2000 (looks like LOAD instruction doesn't work in fragment shader, to be investigated more)
  • gl_FrontFacing is inverted if glFrontFace is GL_CW (just noticed this after updating deqp..)

I did a lot of work to reduce the number of emitted instructions in the shader, and it does much better than the TGSI compiler (and passes all tests as opposed to TGSI compiler which has many fails). However there are still some cases which aren't optimal (especially with loops involved), and I left out some WIP optimizations for now.

It is split into two files, the big header contains mostly code I think could be common between etnaviv/a2xx...

Kept this inside gallium for now since Vulkan is still a long way off (looking at GLES3 currently...)

Previous MR: !868 (closed)

Edited Aug 02, 2019 by Jonathan Marek
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: etna-nir