Announcement

Collapse
No announcement yet.

A Provisional Specification To SPIR-V

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • A Provisional Specification To SPIR-V

    Phoronix: A Provisional Specification To SPIR-V

    In continuation to the article this morning on Khronos announcing OpenCL 2.1, the Vulcan graphics API, and SPIR-V, a provisional specification on SPIR-V is now available for interested developers...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Spir + hsa?

    I wonder how the SPIR-V fits in with AMD et. al's plan for HSA. Will it be another target for HSA "compiler" or will it be a layer, similar to Vulkan? Are they mostly competitors?

    Regardless, I'm hoping more languages with functional syntax e.g. Lisp, Clojure, Javascript, etc. can target SPIR directly and give interesting and performant options for graphics programming in non-C languages.

    Comment


    • #3
      This is going to be so amazing. We don't have to ship source anymore and we can do crazy things like accept remote IR for GPGPU processing for cloud computing without obtaining the source.

      Comment


      • #4
        Originally posted by vadix View Post
        This is going to be so amazing. We don't have to ship source anymore and we can do crazy things like accept remote IR for GPGPU processing for cloud computing without obtaining the source.
        Now I wonder, wouldn't that be detrimental in some sorts? I mean, less bugs will be detected because there is no source code to look at, just IR.

        Comment


        • #5
          Not Really

          Originally posted by BSDude View Post
          Now I wonder, wouldn't that be detrimental in some sorts? I mean, less bugs will be detected because there is no source code to look at, just IR.
          However, since everyone has a standard to compile to, you can now use one tool to debug ALL programs, regardless of where they came from. Now, we need someone to write that tool, and it would be nice if it could have a standardized representation that is useful for all those different languages, but this has been solved before.

          And the compile programs could do what javascript compilers do, create a map so if an error is detected in the SPIR-V representation, the native tools can go back to the original source.

          Also, since they all use the same IL target, you can presumably fix the target IL without having access to the original code. There are programers that do this with assembly code now, and this should be no different. Or, simply have a tool that compiles out to your language of choice, and you can debug the logic yourself. This is why LLVM i so popular, its use as a transpiler is the genius behind emscripten.

          Now, another benefit, is with a spec available, we don't have to wait for driver implementors to finish before these tools could be written.

          Comment


          • #6
            The glslang reference compiler can now put out experimental SPIRV-V binaries from GLSL.


            me@archbox ..slang-svn/src/glslang/build/StandAlone % ./glslangValidator
            Usage: glslangValidator [option]... [file]...

            Where: each 'file' ends in .<stage>, where <stage> is one of
            .conf to provide an optional config file that replaces the default configuration
            (see -c option below for generating a template)
            .vert for a vertex shader
            .tesc for a tessellation control shader
            .tese for a tessellation evaluation shader
            .geom for a geometry shader
            .frag for a fragment shader
            .comp for a compute shader

            Compilation warnings and errors will be printed to stdout.

            To get other information, use one of the following options:
            (Each option must be specified separately, but can go anywhere in the command line.)
            -V create SPIR-V in file <stage>.spv
            -c configuration dump; use to create default configuration file (redirect to a .conf file)
            -d default to desktop (#version 110) when there is no version in the shader (default is ES version 100)
            -i intermediate tree (glslang AST) is printed out
            -l link validation of all input files
            -m memory leak mode
            -q dump reflection query database
            -r relaxed semantic error-checking mode
            -s silent mode
            -t multi-threaded mode
            -v print version strings
            -w suppress warnings (except as required by #extension : warn)
            When I tried to install the glslang-svn PKGBUILD from the AUR it couldn't find the reference glslang::GlslangToSpv and glslang::OutputSpv when linking the glslangValidator binary. I managed to build it manually, though.

            Comment

            Working...
            X