No announcement yet.

Geometry Shader Support For RadeonSI's NIR Back-End

  • Filter
  • Time
  • Show
Clear All
new posts

  • #11


    • #12
      > That said, non-TGSI shaders have been feeding into Gallium3D drivers for at least 6 years (we passed LLVM IR into the r600 and radeonsi drivers to support CLover) and I expect other drivers also have done that in the past.

      I think I should refresh my knowledge. But "feeding into Gallium3D" it does not mean convert from TGSI to LLVM IR?


      • #13
        Originally posted by CrystalGamma View Post

        Do you? I'd certainly love a link some documentation. Last time I looked for that (3 years ago or something) I only ended up on some Chinese websites where those parts that were in English never went into any kind of detail …

        Very first link.

        It doesn't mention TGSI at all. What it does say, just for a start, is

        The Gallium3D Interface

        The public interface of a Gallium3D driver is described by the src/gallium/include/*.h header files.

        The pipe_context structure (in p_context.h) is an abstract base class with per-context methods for:
        • Setting rendering state (texture sampler state, blending state, rasterization state, vertex array info, drawing surfaces, etc.)
        • Setting shader state, using the TGSI binary shader representation.
        • Vertex array and indexed vertex array drawing.

        The p_state.h file defines data structures for things such as:
        • Graphics state (blending, texture sampling, rasterization)
        • Texture and surface resources
        • Vertex array layout

        The pipe_screen structure is an abstract base class with context-independent methods for:
        • Creating textures (and drawing surfaces)
        • Getting "views" into textures
        • Hardware queries (number of texture units, max texture size, etc).
        • Creating generic memory buffers
        • Mapping/unmapping buffers
        • Fencing

        By abstracting OS and window system services, pipe drivers are portable to other platforms (e.g. embedded devices).

        Additional Gallium3D interface information.


        • #14
          Originally posted by stalkerg View Post
          I think I should refresh my knowledge. But "feeding into Gallium3D" it does not mean convert from TGSI to LLVM IR?
          It only does for drivers which use an LLVM-based shader compiler, which is probably less than half of the actively maintained drivers.

          Other drivers either convert TGSI into the native IR of whatever they are using for a shader compiler (typically something written specifically for that GPU) or directly translate each TGSI operation into native hardware instructions.