Skip to content

Instantly share code, notes, and snippets.

@paniq
Created August 17, 2017 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paniq/5cffef2fde0f5988260d7dec258f8cf7 to your computer and use it in GitHub Desktop.
Save paniq/5cffef2fde0f5988260d7dec258f8cf7 to your computer and use it in GitHub Desktop.
# scopes code
fn vertex-shader ()
let x = (unconst (vec2 1 2))
print
compile-glsl
typify vertex-shader
'dump-disassembly
// spirv disassembly
// Module Version 10000
// Generated by (magic number): 53434f50
// Id's are bound by 9
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "vertex-shader"
Name 4 "vertex-shader"
1: TypeFloat 32
2: TypeVector 1(float) 2
3: TypeFunction 2(fvec2)
6: 1(float) Constant 1065353216
7: 1(float) Constant 1073741824
8: 2(fvec2) ConstantComposite 6 7
4(vertex-shader): 2(fvec2) Function None 3
5: Label
ReturnValue 8
FunctionEnd
// GLSL output
#version 450
vec2 main()
{
return vec2(1.0, 2.0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment