Ashley Hauck
15d96cde8c
Use the cute Function::all_inst_iter helper, because it's cute. ( #535 )
2021-03-25 10:20:34 +00:00
Erin Power
dea67c686c
Move min-const-generics features out of const-generics flag
2021-03-25 10:34:01 +02:00
Eduard-Mihai Burtescu
79200bb777
Produce TypeKind::Token
for {Image,Sampler,SampledImage} in type_kind
.
2021-03-24 14:51:50 +02:00
Johan Andersson
916f4798d3
Use Embark standard lints v0.3
2021-03-24 14:51:50 +02:00
Eduard-Mihai Burtescu
908487ae1d
entry: use T
instead of &T
for Input
s.
2021-03-23 09:30:24 +01:00
Eduard-Mihai Burtescu
8c1406ee39
entry: reorganize storage class handling, and move some checking to attr
.
2021-03-23 09:30:24 +01:00
Eduard-Mihai Burtescu
e04e1f53fc
Replace spirv_std::storage_class::X<T> with &T/&mut T and optionally #[spirv(x)].
2021-03-23 09:30:24 +01:00
XAMPPRocky
e7d68f7435
Add primitive set of arch instructions ( #520 )
2021-03-22 10:55:18 +00:00
Ashley Hauck
89dc8c65aa
Add cubemaps ( #521 )
2021-03-22 11:35:42 +01:00
XAMPPRocky
681e4f21ae
Update nightly ( #516 )
2021-03-22 10:20:05 +00:00
Eduard-Mihai Burtescu
94f46142a7
Use AggregatedSpirvAttributes
instead of iterating over SpirvAttribute
s.
2021-03-22 11:23:55 +02:00
Eduard-Mihai Burtescu
ffcddd4f4c
attr: disallow multiple attributes that are identical or in the same category.
2021-03-22 11:23:55 +02:00
Eduard-Mihai Burtescu
8688e8c25a
attr: group attributes by their targets.
2021-03-22 11:23:55 +02:00
Eduard-Mihai Burtescu
a2026376b7
attr: group {ImageType,Sampler,SampledImage} into an IntrinsicType
enum.
2021-03-22 11:23:55 +02:00
Eduard-Mihai Burtescu
fdbfdec6f5
symbols: move SpirvAttribute
to the attr module.
2021-03-22 11:23:55 +02:00
Eduard-Mihai Burtescu
7f94fea3b6
attr: target_from_impl_item
can just be private.
2021-03-22 11:23:55 +02:00
Eduard-Mihai Burtescu
b3b3fbec98
tests: add a test for where #[spirv(...)]
attributes can (not) be used.
2021-03-22 11:23:55 +02:00
XAMPPRocky
52ae430ec1
Update dependencies ( #506 )
2021-03-22 09:27:34 +01:00
Eduard-Mihai Burtescu
3274778d98
link: don't use {:?}
with paths because it turns \ into \\.
2021-03-22 08:01:22 +02:00
Ashley Hauck
3bc8a8076b
Fix recover_access_chain_from_offset on unsized fields ( #510 )
2021-03-19 15:23:55 +00:00
Jesse
9fb930b8f1
feat: add OpImageSampleExplicitLod to spirv-std ( #498 )
2021-03-19 07:24:20 +01:00
XAMPPRocky
27eb1d1413
Refactor validation tests to use compiletest ( #464 )
...
* Refactor validation tests to use compiletest
* Update tests/ui/lang/core/ptr/allocate_const_scalar.rs
2021-03-18 17:16:21 +00:00
Eduard-Mihai Burtescu
a0b4de4cf6
Bump rust-toolchain to nightly-2021-03-17, unlocking for i in 0..n
loops!
2021-03-17 03:31:11 +02:00
Eduard-Mihai Burtescu
17f4f37a64
Bump rust-toolchain to nightly-2021-03-11.
2021-03-17 03:31:11 +02:00
XAMPPRocky
6b33db07e6
Update to 0.4.0-alpha.0 ( #497 )
...
* Release 0.4.0-alpha.0
compute-shader@0.4.0-alpha.0
rustc_codegen_spirv@0.4.0-alpha.0
spirv-builder@0.4.0-alpha.0
spirv-std@0.4.0-alpha.0
spirv-std-macros@0.4.0-alpha.0
Generated by cargo-workspaces
* Update Cargo.lock, remove unused one
* Update lockfile
* update lockfile
2021-03-16 15:14:53 +01:00
Jake Shadle
44393affe5
Update spirv-tools to 0.5.0 ( #496 )
...
* Update spirv-tools to 0.5.0
* Use ubuntu-20.04 image rather than the ambiguous "latest"
* Update spirv-tools binaries to latest
2021-03-16 13:04:23 +01:00
XAMPPRocky
1d365490a5
Add arithmetic instructions to arch ( #446 )
2021-03-16 09:42:18 +00:00
XAMPPRocky
6e8453f386
Decouple glam from spirv-std ( #476 )
2021-03-16 09:59:08 +01:00
Henno
eebb2d3b32
Require local size x dimension and remove gl_ ( #495 )
...
* Require local size and remove gl_
Removes the gl_ prefix from the compute shader attribute, shortens the thread dimension declaration to threads(x, y, z), requires the x size dimensions be specified, trailing ones may be elided for the y or z dimensions.
* Implement review suggestions
2021-03-16 09:12:21 +01:00
Johan Andersson
a173208d80
Update to Embark lints v0.3 ( #482 )
...
Co-Authored-By: Johan Andersson <repi@repi.se>
Co-authored-by: Erin Power <erin.power@embark-studios.com>
2021-03-12 12:35:37 +00:00
XAMPPRocky
cb8477df15
Document gpu-only ( #489 )
2021-03-11 13:23:52 +00:00
Eduard-Mihai Burtescu
7348f3389d
builder: constant-fold bx.mul(a, b)
in order to support ptr::{read,write}
. ( #485 )
2021-03-11 09:53:49 +01:00
Jesse
556e12f4fc
refactor: Slight refactor of textures.rs asm functions for consistency ( #488 )
2021-03-11 07:37:22 +01:00
Eduard-Mihai Burtescu
c3cf9fe5f3
Clean up some of the cases of duplication found by clippy::match_same_arms
. ( #487 )
2021-03-11 07:31:48 +01:00
Jesse
c53c351987
feat: add image fetch ( #480 )
2021-03-10 08:17:07 +00:00
Daniel McNab
2d6a677563
Opt-in to rustc_private for rust-analyzer
( #481 )
...
https://github.com/rust-analyzer/rust-analyzer/pull/7891
2021-03-09 07:33:43 +01:00
Erin Power
93af32f107
Rm old submodules
2021-03-08 13:42:02 +01:00
Johan Andersson
a990ed5696
Use Embark standard lints v0.2 ( #475 )
2021-03-08 10:37:43 +01:00
Henrik Rydgård
d37b41c13e
Add description to spirv-std-macros
2021-03-05 09:27:07 +01:00
Erin Power
c38402a1e2
Use version for macros
2021-03-04 18:13:07 +01:00
Erin Power
499bf4cede
Version bump to 0.3.0
2021-03-04 17:50:40 +01:00
Eduard-Mihai Burtescu
f9946c0f52
attr: use only rustc's own Target, now that it has all the necessary variants. ( #471 )
2021-03-04 16:03:54 +00:00
Eduard-Mihai Burtescu
d574fa3737
Reenable clippy's use_self
lint (disabled during last rustup) and remove now-unneeded #[allow]
s for it. ( #470 )
...
* Reenable clippy's `use_self` lint (was disabled during last rustup).
* Remove now-unneeded `#[allow(clippy::use_self)]`.
2021-03-04 16:03:21 +00:00
Eduard-Mihai Burtescu
7723f5db6b
Access the original type's fields through a pointercast
, under the Logical addressing model. ( #469 )
...
* Defer pointer casts under the Logical addressing model.
* Access the original type's fields through a `pointercast`, under the Logical addressing model.
* Add a test using a `for` loop and a custom `Range`-like iterator.
2021-03-04 15:15:01 +01:00
XAMPPRocky
5cfaa0055b
Update to the latest nightly ( #467 )
...
* Update to the latest nightly
* Update to fix clippy lints
* ignore test for now
2021-03-04 14:12:00 +01:00
XAMPPRocky
5446ca3f9f
Revert const generics ( #465 )
2021-03-03 17:09:31 +02:00
XAMPPRocky
6678f9a49d
Add entry point attribute configuration. ( #458 )
...
* Add entrypoint attribute configuration.
* Update with feedback
* Add docs
* fmt
* rm usused_attributes
* other changes
* fmt
2021-03-02 15:30:08 +02:00
Jasper Bekkers
d8e8c75472
Use newly added iter
method in rspirv to speed up InstructionTable::new ( #460 )
...
* Use newly added `iter` method in rspirv to speed up debug builds of rustc_codegen_spirv by 6s in debug
* cargo update run
2021-03-02 08:51:37 +00:00
Eduard-Mihai Burtescu
6571f45a29
attr: mark #[spirv(...)]
attributes as used and remove #[allow(unused_attributes)]
.
2021-03-02 08:54:28 +02:00
Eduard-Mihai Burtescu
71254b48fa
attr: add a pre-codegen #[spirv(...)]
attribute checking pass.
2021-03-02 08:54:28 +02:00
Eduard-Mihai Burtescu
49509e3ccb
symbols: cache a Rc<Symbols>
per thread.
2021-03-02 08:54:28 +02:00
Eduard-Mihai Burtescu
ccdb9d5a21
symbols: rename #[spirv(image(...))]
to #[spirv(image_type(...))]
.
2021-03-02 08:54:28 +02:00
Eduard-Mihai Burtescu
9f97704d2e
symbols: use Result
s to keep track of attribute parsing errors.
2021-03-02 08:54:28 +02:00
Eduard-Mihai Burtescu
0253fbec15
parse_attrs: avoid unnecessary allocation.
2021-03-02 08:54:28 +02:00
Jasper Bekkers
2f4c67e8e0
Safeness bug in StorageImage2d::write ( #453 )
...
* Safeness bug in StorageImage2d::write
It's pretty easy to see why this is unsafe, if multiple threads write to the same coordinate race-conditions happen.
Ultimately this should be addressed through something like #216 and some higher level abstractions on top of our buffer types, but since we don't have those for now, marking this as unsafe seems to be the only thing we can do for now.
* Remove unsafe {} block for clippy
2021-03-01 15:20:07 +00:00
XAMPPRocky
20341418e4
Fix storage image method restrictions ( #455 )
...
* Fix storage image method restrictions
* Update textures.rs
* Update textures.rs
2021-03-01 09:14:54 +00:00
XAMPPRocky
2c02c59c1f
Fixes issues related to upgrading to the latest nightly ( #447 )
2021-02-26 08:19:35 +00:00
XAMPPRocky
57a9ebb797
Add any and all arch instructions ( #441 )
2021-02-25 17:09:44 +02:00
Ashley Hauck
dafbbd745e
Don't ICE on duplicate definition ( #445 )
...
Also give a nice error on using an undefined name
2021-02-23 11:04:55 +01:00
Eduard-Mihai Burtescu
420ca6ae1d
Remove accidentally-commited test = false
from rustc_codegen_spirv/Cargo.toml. ( #439 )
2021-02-22 11:45:07 +00:00
Eduard-Mihai Burtescu
2d948f757e
specializer: do not run a DCE pass just before.
2021-02-22 12:58:40 +02:00
Eduard-Mihai Burtescu
dcf23e2e60
specializer: renumber IDs in expanded functions.
2021-02-22 12:58:40 +02:00
Eduard-Mihai Burtescu
47cf841209
spirv_std: deprecate load/store/then methods on storage_class::* types.
2021-02-22 12:58:40 +02:00
Eduard-Mihai Burtescu
0087342992
spirv-std: implement Deref and DerefMut for storage_class wrappers.
2021-02-22 12:58:40 +02:00
Eduard-Mihai Burtescu
d435c26915
link: add DUMP_POST_LINK to allow dumping the module before spirv-opt runs.
2021-02-22 12:58:40 +02:00
Eduard-Mihai Burtescu
d4da7f912d
spirv_type_constraints: account for OpUCount{Leading,Trailing}ZerosINTEL
usage.
2021-02-22 12:58:40 +02:00
Eduard-Mihai Burtescu
71ef9a25cf
specializer: support IndexComposite
patterns (for e.g. OpAccessChain).
2021-02-22 12:58:40 +02:00
Eduard-Mihai Burtescu
72206042bb
specializer: show function names in SPECIALIZER_DEBUG output.
2021-02-22 12:58:40 +02:00
Eduard-Mihai Burtescu
6f89c8ec54
specializer: deduplicate between InferOperandList's two variants.
2021-02-22 12:58:40 +02:00
Eduard-Mihai Burtescu
f214587f41
specialize: remove double % after gfx-rs/rspirv#184 .
2021-02-22 12:58:40 +02:00
Eduard-Mihai Burtescu
72fb398232
Remove #[spirv(really_unsafe_ignore_bitcasts)]
.
2021-02-22 12:58:40 +02:00
Eduard-Mihai Burtescu
67746012f5
Infer storage classes using the specializer, replacing special pointer types.
2021-02-22 12:58:40 +02:00
Eduard-Mihai Burtescu
cb0bd4b04a
Introduce a "specializer" pass with "generic"s, inference and monomorphization-like expansion.
2021-02-22 12:58:40 +02:00
Eduard-Mihai Burtescu
d425409f65
spirv_type_constraints: support storage class equality constraints.
2021-02-22 12:58:40 +02:00
Eduard-Mihai Burtescu
0c8fe20476
spirv_type_constraints: make the pat! macro more flexible.
2021-02-22 12:58:40 +02:00
Eduard-Mihai Burtescu
de03fb3859
spirv_type_constraints: don't limit InstSig
inputs to value operands.
2021-02-22 12:58:40 +02:00
Eduard-Mihai Burtescu
7da5be3766
Work around linker error by isolating spirv_tools usage to rustc_codegen_spirv. ( #436 )
2021-02-19 14:46:50 +02:00
Jasper Bekkers
6d2d4a13e6
Inline asm types ( #418 )
...
* Add more types for inline asm
* Add basic OpDecorate support to inline asm
* Add khronos ticket link
* Add additional operands support to inline assembly
* Fix unused import warning
* Switch to rspirv git dependency
* Update Cargo.lock
* fmt
* Switch to while-let loop
* Address feedback around `additional_extensions`
* Remove debug code
* Remove un-needed special cases for OpCapability and OpExtension
* Switch back to iterating over all instructions only once, with this one cool trick
* Add test for OpDecorate / varargs
* Fix residual merge error
* Add test for a complex OpImageSample instruction that needs some BitEnums
2021-02-18 14:08:58 +01:00
XAMPPRocky
34261a8905
Add StorageImage with read/write ( #434 )
2021-02-17 10:15:42 +00:00
Erin Power
77fd6ee4a9
Release 0.3.0-alpha.0
...
compute-shader@0.3.0-alpha.0
rustc_codegen_spirv@0.3.0-alpha.0
spirv-builder@0.3.0-alpha.0
spirv-std@0.3.0-alpha.0
spirv-std-macros@0.3.0-alpha.0
Generated by cargo-workspaces
2021-02-16 16:19:46 +01:00
Ashley Hauck
0285edb860
simd_types_indirect: false ( #431 )
...
also fix bug in abi.rs - vectors are always memory, never immediate
2021-02-15 14:59:55 +00:00
Ashley Hauck
8fe8e88a06
Update docs for the Image storage class ( #426 )
2021-02-15 08:32:28 +00:00
Ashley Hauck
56067de909
Support const args in asm! ( #421 )
2021-02-12 14:05:31 +01:00
XAMPPRocky
c10a6c0747
Add vector_insert_dynamic ( #411 )
...
* Add vector_insert_dynamic and copy_object
* Update arch.rs
* Update basic.rs
* Update arch.rs
* Update spirv_type_constraints.rs
2021-02-11 15:18:52 +00:00
Eduard-Mihai Burtescu
2f9d4d8e0d
Add a missing err.emit();
for the "spirv-opt failed" error. ( #412 )
2021-02-10 13:42:43 +00:00
Ashley Hauck
8a68551a06
Fix #403 ( #407 )
2021-02-02 12:20:10 +00:00
Eduard-Mihai Burtescu
3a4d140328
Don't require 1:1 mapping between OpTypeStruct
s and their names. ( #406 )
2021-02-01 14:24:02 +00:00
Ashley Hauck
3f0900c89d
Enable optimizer ( #401 )
...
* Enable optimizer
* Fix tests
2021-01-29 11:30:56 +00:00
Ashley Hauck
9f6c91c278
Remove different OpNames that target the same ID ( #398 )
2021-01-28 13:16:06 +00:00
Eduard-Mihai Burtescu
810ba5d1e4
Use rspirv::dr::Function's def_id convenience method. ( #397 )
2021-01-28 09:52:41 +00:00
XAMPPRocky
69b94bb6f9
Add initial arch module ( #394 )
2021-01-27 15:54:17 +00:00
Ashley Hauck
d88379908a
deduplicate OpVariable ( #396 )
2021-01-26 16:03:14 +00:00
XAMPPRocky
353bb96bd3
Add gpu_only proc macro ( #392 )
2021-01-25 10:39:47 +00:00
Jesse
04ad2ad64f
fix: handle an ICE resulting from a dangling pointer ( #342 )
2021-01-20 12:52:06 +00:00
Eduard-Mihai Burtescu
5f0b380a39
inline asm!: support writing _ in lieu of return types, for basic inference. ( #376 )
...
* Basic type constraints for all non-reserved SPIR-V instructions.
* inline asm!: support writing _ in lieu of return types, for basic inference.
* Demonstrate using result type inference in inline asm!.
* inline asm!: allow inferring the result type of OpSampledImage.
2021-01-20 10:40:26 +00:00
Ashley Hauck
225d89d7de
discard(), update rspirv, better capability computation ( #380 )
2021-01-18 11:59:27 +00:00
Ashley Hauck
8eadd904f7
Add derivatives for vector functions ( #377 )
2021-01-18 10:28:46 +01:00
Adrian Herath
f7cdf1d6bd
Rename unclear local variables in parse_image() ( #379 )
...
The variable name `dim` is used to represent dim, image_format, and
access_qualifier in parse_image(). This might cause confusion for
someone trying to read and understand symbols.rs. This commit changes
names of variables to better reflect their purpose.
Co-authored-by: Adrian Herath <adrianisuru@manjaro.hsd1.il.comcast.net>
2021-01-18 06:52:43 +00:00
XAMPPRocky
d55bf60b02
Document Derivative ( #366 )
...
* Document Derivative
* Mention absolute
2021-01-15 12:13:43 +00:00
XAMPPRocky
38f2ec12c9
Update bimap->0.6, pipe->0.4, strum->0.20, websys->0.3.46 ( #365 )
2021-01-11 09:08:02 +00:00