SPIR-V extension for Visual Studio

Overview

SPIR-V extension for Visual Studio (VSIX)

About

This VSIX extension adds SPIR-V related commands to the context menu of GLSL shader files (and folders containing shaders) for invoking the GLSL reference compiler from inside the IDE.

Requirements

GLSL standalone reference compiler

The extension requires a version of the glslang reference compiler to be in your path that supports SPIR-V:

The extension will search for the glslangvalidator.exe using the paths from the following environment variables: PATH, VK_SDK_PATH and VULKAN_SDK (set by the LunarG SDK)

Supported Visual Studio versions

The extension supports all editions of Visual Studio 2015, 2017 and 2019.

Installation

The extension is available at the Visual Studio Marketplace and can be installed directly from the IDE.

New context menu entries

The context menu entries will be displayed if the current file selection or folder includes at least one shader file with a file extension supported by the GLSL reference compiler:

  • .vert (Vertex shader)
  • .tesc (Tessellation control shader)
  • .tese (Tessellation evaluation shader)
  • .geom (Geometry shader)
  • .frag (Fragment shader)
  • .comp (Compute shader)
  • .mesh (Mesh shader)
  • .task (Task shader)
  • .rgen (Ray generation shader)
  • .rint (Ray intersection shader)
  • .rahit (Ray any hit shader)
  • .rchit (Ray closest hit shader)
  • .rmiss (Ray miss shader)
  • .rcall (Ray callable shader)

These are currently fixed, but future versions may add an options pane to adjust file extensions and how they are treated.

Features

SPIR-V functions

Compile to SPIR-V (Vulkan semantics)

Compile all selected shader files to SPIR-V binary using Vulkan semantics (-V) and output to "filename"."stage".spv.

Compile to SPIR-V (OpenGL semantics)

Compile all selected shader files to SPIR-V binary using OpenGL semantics (-G) and output to "filename"."stage".spv.

Note: SPIR-V for OpenGL is supported with the GL_ARB_gl_spirv extension and implemented as a binary shader format.

A C++ example for loading a binary SPIR-V shader with OpenGL can be found here.

Print human-readable SPIR-V

This will output human readable SPIR-V (-H) using Vulkan semantics and displays it in a new document window.

Error list

Compile errors are added to the error list of Visual Studio and work like regular compile errors. Double clicking on an error will open that shader and jump to the line that the error has occured.

Todo

This is a very early version of this extension, some of the planned features are:

  • Extension settings pane
    • Add file extension mappings
    • Custom binary SPIR-V output file name scheme (instead of a fixed output file scheme)
    • Option to disable dialog boxes after compile
    • Option to use a remapper (SPIR-V remap etc.)
  • Save to text as hexadecimal numbers (-x)
    • Generate include headers
  • Language features (as soon as their support by the reference compiler is finished)
    • Multiple main entry points
    • Compile from HLSL

Issues and pull request for additional features are welcome :)

Issues
  • Support for VS2019?

    Support for VS2019?

    Gotta say, I absolutely love this plugin. Is there any plan to publish on the VS2019 marketplace?

    Update: Compiling the VS2017 branch from source on VS2019 works fine, after updating dependencies, target version, and a new Prerequisites property in the manifest. However, the resulting VSIX file still won't be installable - I am not sure why yet.

    Update 2: I have managed to create an installable build for VS2019. SPIRVExtension.zip It has some tweaks that probably weren't necessary, such as library updates and an advance in version number, that might break behavior I haven't tested - I'm mostly putting it here to show that it's doable, and for anyone else who comes by looking for a copy.

    opened by emctague 2
  • Can you add away to remove the BOM

    Can you add away to remove the BOM

    I am using your extension to compile compute shaders easily, but it seems that Visual Studio saves all new files in UTF-8 with BOM. This encoding causes glslangValidator to throw a very interesting set of errors:

    ERROR: #version: compute shaders require es profile with version 310 or above, or non-es profile with version 420 or above ERROR: #version: statement must appear first in es-profile shader; before comments or newlines ERROR: .\dot.comp:1: 'Ç' : unexpected token ERROR: .\dot.comp:1: '' : compilation terminated

    Can you add a check for the BOM and rewrite the file without it?

    Thanks,

    Blair

    opened by blair0011 2
  • Support for CMake projects

    Support for CMake projects

    Does this extension only work in normal Visual Studio (MSBuild-based) projects? Because I tried it in a CMake-based project and couldn't get it to work.

    opened by NeatSketch 0
  • vs2019 no context menu options

    vs2019 no context menu options

    Extension says it is installed. vs2019 windows 10

    I've tried right clicking on a file called flow.frag, and the containing folder. Are there extra step necessary to recognizing the shader files? Thank you!

    opened by pajama 1
Releases(0.4)
Owner
Sascha Willems
Sascha Willems
Android studio native project template using cross platform raylib graphics library.

rayturbo Android studio native project template using cross platform raylib graphics library. https://www.raylib.com/ This project use Android Studio

Ciapas Linux 10 Mar 5, 2022
Implementation of Peter Shirley's Ray Tracing In One Weekend book using Vulkan and NVIDIA's RTX extension.

Ray Tracing In Vulkan My implementation of Peter Shirley's Ray Tracing in One Weekend books using Vulkan and NVIDIA's RTX extension (formerly VK_NV_ra

Tanguy Fautre 783 Aug 6, 2022
Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.

Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.

Bullet Physics SDK 9.6k Aug 10, 2022
appleseed is an open source, physically-based global illumination rendering engine primarily designed for animation and visual effects.

appleseed is an open source, physically-based global illumination rendering engine primarily designed for animation and visual effects.

appleseedhq 1.9k Aug 2, 2022
Visual Studio Extension for C++ struct memory layout visualization

Visual Studio Extension for C++ struct memory layout visualization

Ramon Viladomat 369 Aug 4, 2022
Visual Studio Extension that installs additional color themes

Using this Extension Download and install the extension Restart Visual Studio Navigate to Tools > Options > Environment > General and select your colo

Microsoft 327 Jul 16, 2022
A Visual Studio extension containing a collection of tools to help contributing code to the Chromium project.

VsChromium VsChromium is a Visual Studio Extension containing a collection of tools useful for editing, navigating and debugging code. VsChromium was

The Chromium Project 253 Jul 24, 2022
Visual Studio native debugger extension to help debug native applications using Mono.

Unity Mixed Callstack UnityMixedCallstack is a Visual Studio 2017/2019 extension to help debug native applications embedding Mono, like Unity. If you

Unity Technologies 73 Aug 5, 2022
Visual Studio extension for assembly syntax highlighting and code completion in assembly files and the disassembly window

Asm-Dude Assembly syntax highlighting and code assistance for assembly source files and the disassembly window for Visual Studio 2015, 2017 and 2019.

Henk-Jan Lebbink 4k Aug 6, 2022
A Visual Studio extension that provides enhanced support for editing High Level Shading Language (HLSL) files

HLSL Tools for Visual Studio This extension is for Visual Studio 2017 / 2019. Go here for the Visual Studio Code extension. HLSL Tools is a Visual Stu

Tim Jones 404 Aug 3, 2022
The SPIR-V Tools project provides an API and commands for processing SPIR-V modules.

SPIR-V Tools Overview The SPIR-V Tools project provides an API and commands for processing SPIR-V modules. The project includes an assembler, binary m

The Khronos Group 769 Aug 2, 2022
Bungie's Oni modified so it compiles with Microsoft Visual Studio 2019.

OniFoxed What's this? This is a modified variant of the recently leaked Oni source code so that it compiles under Microsoft Visual Studio 2019 with so

Mark Sowden 48 Jul 16, 2022
Using Visual Studio C++ to read IP addresses and comport number (Serial number) on Windows platform

Using Visual Studio C++ to read IP addresses on Windows platform

zhuhuijin 0 Feb 2, 2022
A D++ Discord Bot template for Visual Studio 2019 (x64 and x86)

D++ Windows Bot Template A D++ Discord Bot template for Visual Studio 2019 (x64 and x86, release and debug). The result of this tutorial. This templat

brainbox.cc 19 Jul 16, 2022
A Visual Studio template used to create Cobalt Strike BOFs

Introduction Cobalt Strike beacon object files (BOFs) is a feature that added to the beacon in order to allow rapid beacon extendibility in a more OPS

Securify 146 Jul 30, 2022
CMake scripts for painless usage of SuiteSparse+METIS from Visual Studio and the rest of Windows/Linux/OSX IDEs supported by CMake

CMake scripts for painless usage of Tim Davis' SuiteSparse (CHOLMOD,UMFPACK,AMD,LDL,SPQR,...) and METIS from Visual Studio and the rest of Windows/Lin

Jose Luis Blanco-Claraco 385 Aug 2, 2022
Visual Studio and GCC precompiled header macro for CMake

cmake-precompiled-header Precompiled header setup for CMake. Supported CMake generators: Visual Studio NMake Makefiles Unix Makefiles (GCC) MinGW Make

Lars Christensen 157 Jul 26, 2022
🍩 A XMake integration in Visual Studio Code

xmake-vscode A XMake integration in Visual Studio Code Introduction A XMake integration in Visual Studio Code. You need install xmake first and a proj

xmake-io 118 Aug 4, 2022
Sharpmake is an open-source C#-based solution for generating project definition files, such as Visual Studio projects and solutions, GNU makefiles, Xcode projects, etc.

Sharpmake Introduction Sharpmake is a generator for Visual Studio projects and solutions. It is similar to CMake and Premake, but it is designed for s

Ubisoft 750 Aug 1, 2022
Visual Studio Test Adapter for Catch2

Test Adapter for Catch2 Within Visual Studio, the Test Explorer is a convenient way to run and debug unit tests. This test adapter adds support for th

null 89 Aug 9, 2022
Useful UE4 Visual Studio extensions.

UE4 Smarter Macro Indenting This extension was designed to fix the unnecessary and annoying "smart" indenting that Visual Studio likes to do around va

Chris Pawlukowsky 241 Aug 10, 2022
Half-Life Singleplayer SDK 2.3, updated to compile with Visual Studio 2019. Provided as-is with no further support. See the README for more information.

Half Life 1 SDK LICENSE Half Life 1 SDK Copyright© Valve Corp. THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE CORPORATION (“Valve”). PLEASE

Sam Vanheer 5 Apr 9, 2022
ORB-SLAM3 is the first real-time SLAM library able to perform Visual, Visual-Inertial and Multi-Map SLAM with monocular, stereo and RGB-D cameras, using pin-hole and fisheye lens models.

Just to test for my research, and I add coordinate transformation to evaluate the ORB_SLAM3. Only applied in research, and respect the authors' all work.

B.X.W 5 Jul 11, 2022
RRxIO - Robust Radar Visual/Thermal Inertial Odometry: Robust and accurate state estimation even in challenging visual conditions.

RRxIO - Robust Radar Visual/Thermal Inertial Odometry RRxIO offers robust and accurate state estimation even in challenging visual conditions. RRxIO c

Christopher Doer 56 Jul 26, 2022
Visual Leak Detector for Visual C++ 2008-2015

Visual Leak Detector Introduction Visual C++ provides built-in memory leak detection, but its capabilities are minimal at best. This memory leak detec

Arkady Shapkin 870 Aug 5, 2022
SPIRV-Cross is a tool designed for parsing and converting SPIR-V to other shader languages.

SPIRV-Cross SPIRV-Cross is a tool designed for parsing and converting SPIR-V to other shader languages. Features Convert SPIR-V to readable, usable an

The Khronos Group 1.5k Aug 7, 2022
LLVM IR and optimizer for shaders, including front-end adapters for GLSL and SPIR-V and back-end adapter for GLSL

Licensing LunarGLASS is available via a three clause BSD-style open source license. Goals The primary goals of the LunarGLASS project are: Reduce the

LunarG, Inc. 151 Jun 18, 2022
This repository contains machine-readable files for the SPIR-V Registry

SPIR-V Headers This repository contains machine-readable files for the SPIR-V Registry. This includes: Header files for various languages. JSON files

The Khronos Group 191 Aug 8, 2022
Experimental OpenCL SPIR-V to OpenCL C translator

spirv2clc spirv2clc is an experimental OpenCL SPIR-V to OpenCL C translator currently targeting OpenCL 1.2 support. It can generate OpenCL C code equi

Kévin Petit 17 Jun 8, 2022