Commit Graph

60 Commits

Author SHA1 Message Date
Andrey Tuganov
dbc3a662c6 Image Operand Sample allows sparse image opcodes
@ehsannas had filed an issue against SPIR-V spec, concerning
Image Operands section (3.14):
Sample
A following operand is the sample number of the sample to use. Only
valid with OpImageFetch, OpImageRead, and OpImageWrite.

Relaxing the check to allow OpImageSparseRead and
OpImageSparseFetch to fix failing tests.
2017-12-18 11:21:38 -05:00
Andrey Tuganov
c520d43649 Add validator checks for sparse image opcodes 2017-12-12 12:04:23 -05:00
Andrey Tuganov
bf184310b2 Fix some of the known issues in image validation
Applied some of the spec clarifications made in conversation with
@johnkslang.
2017-12-04 18:57:34 -05:00
Lei Zhang
0dd4ee27b1 Fix Dref type check in validator
Dref should be of 32-bit scalar floating type.

Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/1012
2017-12-01 10:17:45 -05:00
Andrey Tuganov
e1ceff9f54 Validate OpTypeImage and OpTypeSampleImage
Added new validation rules to the validate image pass.
2017-11-29 13:21:04 -05:00
Diego Novillo
83228137e1 Re-format source tree - NFC.
Re-formatted the source tree with the command:

$ /usr/bin/clang-format -style=file -i \
    $(find include source tools test utils -name '*.cpp' -or -name '*.h')

This required a fix to source/val/decoration.h.  It was not including
spirv.h, which broke builds when the #include headers were re-ordered by
clang-format.
2017-11-27 14:31:49 -05:00
Andrey Tuganov
c170afd93b Relaxed OpImageWrite texel type check 2017-11-24 14:31:08 -05:00
Andrey Tuganov
f84f266977 Relaxed OpImageRead validation rules
Removed the check that result type of OpImageRead should be a vector4.
Will reenable/adapt once the spec is clarified on what the right
dimension should be.
2017-11-24 10:12:24 -05:00
Andrey Tuganov
3e08a3f718 Add validation checks for Execution Model
Currently checks that these instructions are called from entry points
with Fragment execution model.
OpImageImplicit*
OpImageQueryLod
OpKill
2017-11-23 23:38:03 -05:00
Andrey Tuganov
f407ae2b50 Validator pass for image instructions
Includes validation rules for OpImageXXX and ImageOperand.

Doesn't include OpTypeImage and OpImageSparseXXX.

Disabled an invalid test.
2017-11-22 14:34:15 -05:00