Philip Rebohle
31948cae8c
[spirv] Allow specifying the SPIR-V version explicitly
...
We're going to use some SPIR-V 1.4 features for D3D11 if supported,
but 1.4 is not supported by all implementations.
2019-12-18 17:36:46 +01:00
Joshua Ashton
f5dd509429
[spirv] Implement constbReplicant
2019-12-11 03:18:39 +01:00
Joshua Ashton
8b6dd0544e
[spirv] Implement constvec4b32
2019-12-11 03:18:39 +01:00
Joshua Ashton
028c6198e4
[spirv] Implement opReflect
2019-12-11 03:18:39 +01:00
Joshua Ashton
3ce678b17d
[spirv] Implement opExp
2019-12-11 03:18:39 +01:00
Joshua Ashton
fdbfb2c92d
[spirv] Implement opInverse, opNormalize and opLength
2019-12-11 03:18:39 +01:00
Joshua Ashton
edf0661994
[spirv] Implement opTranspose
2019-12-11 03:18:39 +01:00
Joshua Ashton
e144c17363
[spirv] Implement constfReplicant helper
2019-12-11 03:18:39 +01:00
Philip Rebohle
2e51e28849
[spirv] Implement opIsNan
2019-11-30 20:39:28 +01:00
Philip Rebohle
5a2fd7c71b
[spirv] Add method to retrieve literal string from instruction
2019-11-19 12:49:07 +01:00
Philip Rebohle
8252d1ccd5
[spirv] Add method to erase data from code buffer
2019-11-19 12:17:11 +01:00
Philip Rebohle
9f88249b91
[spirv] Add method to allocate new ID from code buffer.
2019-11-19 12:12:05 +01:00
Philip Rebohle
df61a479a2
[spirv] Add 'late' constants
...
Late constants can be used to reserve a placeholder ID for a constant
before the constant's value is known. The value can be changed later.
Only scalar 32-bit integer and floating point types are supported
as of right now.
2019-10-23 16:09:28 +02:00
Joshua Ashton
fac3ae9f83
[spirv] Implement opCross
2019-07-12 23:32:09 +02:00
Joshua Ashton
f280386aec
[spirv] Implement opFMix
2019-07-12 23:32:09 +02:00
Philip Rebohle
e901e1269d
[spirv] Add support for OpDemoteToHelperInvocationEXT
2019-07-11 19:33:17 +02:00
Joshua Ashton
194db57a4d
[spirv] Expose MatrixStride decoration for members
2019-06-27 10:49:49 +02:00
Joshua Ashton
80808d743b
[spirv] Add generic memberDecorate
2019-06-27 10:49:49 +02:00
Joshua Ashton
1b8c54eb84
[spirv] Expose opMatrixTimesMatrix, opMatrixTimesVector and opVectorTimesMatrix
2019-06-27 10:49:49 +02:00
Philip Rebohle
dfa3caa946
[spirv] Add OpUndef and more subgroup instructions
2019-05-15 19:31:43 +02:00
Joshua Ashton
7aecd46f93
[spirv] Implement proj sample variants
2019-05-03 08:34:16 +02:00
Philip Rebohle
8f5338b1d1
[spirv] Add constvec2f32 helper
...
We should probably replace this with a proper template at some point.
2019-04-29 13:47:15 +02:00
Joshua Ashton
0c34fae9c7
[spirv] Implement constvec3f32
2019-04-18 23:18:02 +02:00
Joshua Ashton
a770c73dbc
[spirv] Implement opVectorTimesScalar
2019-04-18 23:18:02 +02:00
Joshua Ashton
f1a8e02e0f
[spirv] Implement opPow
2019-04-18 23:18:02 +02:00
Philip Rebohle
da4baefdf0
[spirv] Fix initial allocation size for compressed buffer
...
The old initial size was still for uint8.
2019-04-04 13:15:59 +02:00
Philip Rebohle
f32200b668
[spirv] Implement in-memory compression for shader modules
2019-04-04 13:00:31 +02:00
Philip Rebohle
0d230eb447
[spirv] Add OpArrayLength instruction
2018-12-14 23:45:34 +01:00
Philip Rebohle
0113e8f360
[spirv] Add subgroup ballot instructions
2018-11-27 11:50:01 +01:00
Philip Rebohle
59d0ad4413
[spirv] Add non-uniform group instructions
2018-11-21 11:17:09 +01:00
Philip Rebohle
3e3c31f365
[spirv] Add support for Index decoration
...
Needed for dual-source blending
2018-11-19 16:57:08 +01:00
Philip Rebohle
bb780bbe10
[dxbc] Add Xfb decorations
2018-10-10 10:28:15 +02:00
Philip Rebohle
6a5fe2247a
[dxbc] Add support for multiple streams in geometry shaders
2018-10-10 10:28:15 +02:00
Philip Rebohle
70786aeee8
[spirv] Support OpVectorExtractDynamic instruction
2018-09-01 17:59:50 +02:00
Philip Rebohle
861165f32a
[meta] Fix formatting errors
...
Some filthy little tabs have somehow made
it into the world of spaces to wreak havoc.
2018-08-13 18:30:51 +02:00
Philip Rebohle
ff11fc2445
[spirv] Added OpFConvert instruction
2018-06-07 14:32:34 +02:00
Philip Rebohle
b7dff330f8
[spirv] Update SPIR-V headers
2018-06-01 13:43:19 +02:00
Philip Rebohle
27816b470a
[spirv] Add support for 32-bit specialization constants
2018-05-26 13:52:33 +02:00
Philip Rebohle
fb11acbc91
[dxbc] Implement geometry shader instancing
...
Required for Frostpunk (see #385 ).
2018-05-22 19:36:53 +02:00
Philip Rebohle
27d3a78d79
[dxbc] Omit empty source string in OpSource instruction
...
This parameter is optional and confuses RenderDoc if present.
2018-05-02 13:07:26 +02:00
Joshua Ashton
90e7fe6791
Make hashes use correct types and fix narrowing warnings in spirv module. ( #307 )
...
* Fix narrowing warnings in spirv_module relating to enum's default width on x64
* Make hashes of states use correct types without casting.
* Fix narrowing conversion in d3d11_sampler.cpp
2018-04-20 01:10:58 +02:00
Philip Rebohle
98b8d41016
[dxbc] Write shader name to the generated SPIR-V
...
Might help identifying shaders in debugging tools such as Renderdoc.
2018-04-15 21:00:08 +02:00
Philip Rebohle
5d1642af1f
[spirv] Track instruction offset in instruction iterator
2018-04-10 12:48:24 +02:00
Philip Rebohle
4b44d3ce39
[dxbc] Unify constants
...
Identical constants will now be reused. Considerably reduces code size.
2018-04-02 19:41:22 +02:00
Philip Rebohle
ba9e1f307d
[dxbc] Don't use rvalue references for file streams
2018-03-23 18:17:16 +01:00
Philip Rebohle
e6d93d6cfb
[spirv] Emit image types only once
...
Fixes SPIR-V validation errors.
2018-03-23 01:10:12 +01:00
Philip Rebohle
584ee6b6f0
[dxbc] Lift ShaderStorageImageReadWithoutFormat requirement
2018-03-21 12:47:53 +01:00
Philip Rebohle
fcff10aae7
[dxbc] Set image format for UAVs when atomic operations are used
...
Fixes a violation of the Vulkan specification where atomic operations
would be used on storage images with SpvImageFormatUnknown. Should fix
driver crashes on Nvidia.
TODO: Fix data types for atomic operation instructions.
2018-03-21 12:11:18 +01:00
Philip Rebohle
ba2c4782b0
[spirv] Removed SPIR-V Tools headers
2018-03-13 14:58:17 +01:00
Philip Rebohle
25cae39cdb
[spirv] Remove SPIR-V tools integration
...
SPIR-V tools did not turn out to be useful, but increased the
binary size by a significant amount and caused build problems.
- spirv-opt: Far too slow for the intended purpose, and Nvidia
specific shader issues have been reported and fixed.
- spirv-val: Not much value in practice since shaders can be
written to a directory and validated manually.
2018-03-13 14:32:03 +01:00