spirv-cross 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d6331db8f6c8b94443ccd0bf40ebf7953ad3e2553b8bfcf5dc002e12bf0c385
4
- data.tar.gz: 8f53d46776d479e96182259c930cfd2b288f20ab2615869a41365f82a6d33e09
3
+ metadata.gz: fb194ce8b2a446d9a001e805612cda73fab6a8427fc2e5f26f28b6fcdcbd2ac8
4
+ data.tar.gz: d5026e933273619449fcac4b51813dc2ac1157ee2602057c790e753d963dc0ed
5
5
  SHA512:
6
- metadata.gz: 65b1627f27bf19d1bafa8d67867c89f938369e60d35843bf3f42393cd35a320cd8bb52915647595377ec4978fee68cd15c36cb3b9a15e0d0411ca90464d449ce
7
- data.tar.gz: d5f82285dcfae9b846ccb1b98ef1435d78e457f17b38dfeaa0a483df211f68c4836d5582af42c5d6670eca0940feeb0feb587f94af7ee4c98bf62c080a924b35
6
+ metadata.gz: 44bd431febeed0c878bebb574bbcd43626eec98021fe9b28332751347cecf9b76d557cd8277e7301d552b25dafa7ac9d3a8ab7029d7b4e057ef47ea2a5cde609
7
+ data.tar.gz: 896b277dfeaf2074a7904082c28f091285cecf52a5a0530a0bcd754fcb2de6555fb52db6d2fc4ab095fa23acff36f1bbc78952bbff513461b7943b66199c7bf3
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spirv-cross (0.1.0)
4
+ spirv-cross (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  Provides Ruby bindings for [SPIRV-Cross](https://github.com/KhronosGroup/SPIRV-Cross).
4
4
 
5
+ * **NOTE:** In addition to reflection,
6
+ [SPIRV-Cross](https://github.com/KhronosGroup/SPIRV-Cross) provides the ability
7
+ to compile a shader to other languages (GLSL, HLSL, C++, etc). However, that
8
+ functionality has not been exposed to Ruby by this gem as of this writing.
9
+ If this functionality is desired, [create an issue](https://github.com/sinisterchipmunk/spirv-cross-ruby/issues)
10
+ so that the need can be tracked. Or better yet, add it yourself and send a pull
11
+ request. (Unit tests, please.)
12
+
13
+
5
14
  ## Installation
6
15
 
7
16
  Add this line to your application's Gemfile:
@@ -18,17 +27,18 @@ Or install it yourself as:
18
27
 
19
28
  $ gem install spirv-cross
20
29
 
21
- ## Usage
30
+ ## CLI
22
31
 
23
- * **NOTE:** In addition to reflection,
24
- [SPIRV-Cross](https://github.com/KhronosGroup/SPIRV-Cross) provides the ability
25
- to compile a shader to other languages (GLSL, HLSL, C++, etc). However, that
26
- functionality has not been exposed to Ruby by this gem as of this writing.
27
- If this functionality is desired, [create an issue](https://github.com/sinisterchipmunk/spirv-cross-ruby/issues)
28
- so that the need can be tracked. Or better yet, add it yourself and send a pull
29
- request. (Unit tests, please.)
32
+ In addition to the Ruby API (see below), this gem bundles an executable called
33
+ `spirv-dump`. It takes in a single command line argument (filename) and prints
34
+ all information that can be reflected from it by this gem. This is useful for
35
+ quickly taking a look at a SPIR-V shader, for example for debugging purposes.
36
+
37
+ $ spirv-dump path/to/shader.spv
38
+
39
+ ## API
30
40
 
31
- compiler = SPIRV::Cross::Compiler(File.open('path/to/shader', 'rb').read)
41
+ compiler = SPIRV::Cross::Compiler(File.open('path/to/shader.spv', 'rb').read)
32
42
 
33
43
  pp compiler.specialization_constants
34
44
  #=> [{:constant_id=>20, :name=>"Const"}]
@@ -0,0 +1,9 @@
1
+ #!/bin/env ruby
2
+ require 'spirv-cross'
3
+ require 'pp'
4
+ compiler = SPIRV::Cross::Compiler.new(File.open(ARGV[0], 'rb').read)
5
+ pp({
6
+ shader_resources: compiler.shader_resources,
7
+ specialization_constants: compiler.specialization_constants,
8
+ entry_points: compiler.entry_points
9
+ })
@@ -1,5 +1,5 @@
1
1
  module SPIRV
2
2
  module Cross
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spirv-cross
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colin MacKenzie IV
@@ -69,7 +69,8 @@ dependencies:
69
69
  description:
70
70
  email:
71
71
  - sinisterchipmunk@gmail.com
72
- executables: []
72
+ executables:
73
+ - spirv-dump
73
74
  extensions:
74
75
  - ext/spirv_cross/extconf.rb
75
76
  extra_rdoc_files: []
@@ -83,6 +84,7 @@ files:
83
84
  - Rakefile
84
85
  - bin/console
85
86
  - bin/setup
87
+ - exe/spirv-dump
86
88
  - ext/spirv_cross/extconf.rb
87
89
  - ext/spirv_cross/rb_spirv_cross.h
88
90
  - ext/spirv_cross/rb_spvx_compiler.cpp