Commit 8393610
Greg Roth
Disallow structs, arrays, and overwide vectors from typed buffers (microsoft#7130)
These never reliably generated the right results, so they are being
disallowed. The check takes place in SemaHLSL and replaces a few places
that checked for such things in special cases. To facilitate the check,
the definition of the texture bit was expanded to include RW textures.
This is consistent with the description and since the bit was never
actually used before, has no other consequences.
Some code that executed after Sema that either produced errors or
processed resources with these now forbidden types was removed. Most of
this is from CodeGen and HLOperationLower where code was generated or
expanded for load/store operations on such resources.
Additionally moved the check for overlarge elements in typed resources
to enable keeping some tests around that tested these side by side as
well as adding a new one. I changed the nature of the check a bit to
limit the types to four elements and also that they be no larger than 4
32-bit elements. This means that 64-bit elements are limited to two.
While there wasn't an error that caught this before, there was an assert
that fired.
Incidentally fixes an issue with error reporting for modified types
after the first mismatch of that intrinsic is encountered. Because the
insertion code changed them in the temp array and the stored function
type, but printed from the temp array and the later encounters didn't
add the modifiers to the temp array, later errors would incorrectly
leave off the reference. By retrieving the type from the function type,
the reference is always preserved.
This required changing a fair number of tests that relied on this
behavior including removing test cases and entire test files that
existed solely for such tests.
Fixes microsoft#70801 parent b317f1b commit 8393610
File tree
45 files changed
+362
-806
lines changed- docs
- lib/HLSL
- tools/clang
- include/clang
- AST
- Basic
- lib
- AST
- CodeGen
- SPIRV
- Sema
- test
- CodeGenHLSL
- CodeGenSPIRV
- HLSLFileCheck
- d3dreflect
- hlsl
- intrinsics/atomic
- objects
- AppendStructuredBuffer
- Buffer
- RWTexture
- Texture
- infra
- validation
- HLSL
- SemaHLSL
- unittests/HLSL
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
45 files changed
+362
-806
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7829 | 7829 | | |
7830 | 7830 | | |
7831 | 7831 | | |
7832 | | - | |
7833 | | - | |
7834 | | - | |
7835 | | - | |
7836 | | - | |
7837 | | - | |
7838 | | - | |
7839 | | - | |
7840 | | - | |
7841 | | - | |
7842 | | - | |
7843 | | - | |
7844 | | - | |
7845 | | - | |
7846 | | - | |
7847 | | - | |
7848 | | - | |
7849 | | - | |
7850 | | - | |
7851 | | - | |
7852 | | - | |
7853 | | - | |
7854 | | - | |
7855 | | - | |
7856 | | - | |
7857 | | - | |
7858 | | - | |
7859 | | - | |
7860 | | - | |
7861 | | - | |
7862 | | - | |
7863 | | - | |
7864 | | - | |
7865 | | - | |
7866 | | - | |
7867 | | - | |
7868 | | - | |
7869 | | - | |
7870 | | - | |
7871 | | - | |
7872 | | - | |
7873 | | - | |
7874 | | - | |
7875 | | - | |
7876 | | - | |
7877 | | - | |
7878 | | - | |
7879 | | - | |
7880 | | - | |
7881 | | - | |
7882 | | - | |
7883 | | - | |
7884 | | - | |
7885 | | - | |
7886 | | - | |
7887 | | - | |
7888 | | - | |
7889 | | - | |
7890 | | - | |
7891 | | - | |
7892 | | - | |
7893 | | - | |
7894 | | - | |
7895 | | - | |
7896 | | - | |
7897 | | - | |
7898 | | - | |
7899 | | - | |
7900 | | - | |
7901 | | - | |
7902 | | - | |
7903 | | - | |
7904 | | - | |
7905 | | - | |
7906 | | - | |
7907 | | - | |
7908 | | - | |
7909 | | - | |
7910 | 7832 | | |
7911 | 7833 | | |
7912 | 7834 | | |
| |||
8378 | 8300 | | |
8379 | 8301 | | |
8380 | 8302 | | |
8381 | | - | |
8382 | 8303 | | |
8383 | 8304 | | |
8384 | 8305 | | |
8385 | 8306 | | |
8386 | | - | |
8387 | | - | |
8388 | | - | |
8389 | | - | |
8390 | | - | |
8391 | | - | |
8392 | | - | |
8393 | | - | |
8394 | | - | |
8395 | | - | |
8396 | | - | |
8397 | | - | |
8398 | | - | |
8399 | | - | |
8400 | | - | |
8401 | | - | |
| 8307 | + | |
| 8308 | + | |
| 8309 | + | |
| 8310 | + | |
| 8311 | + | |
| 8312 | + | |
8402 | 8313 | | |
8403 | 8314 | | |
8404 | 8315 | | |
| |||
8821 | 8732 | | |
8822 | 8733 | | |
8823 | 8734 | | |
8824 | | - | |
8825 | | - | |
8826 | | - | |
8827 | | - | |
8828 | | - | |
8829 | | - | |
| 8735 | + | |
8830 | 8736 | | |
8831 | 8737 | | |
8832 | | - | |
8833 | | - | |
8834 | | - | |
8835 | | - | |
8836 | | - | |
8837 | | - | |
8838 | | - | |
8839 | | - | |
8840 | | - | |
8841 | | - | |
8842 | | - | |
8843 | | - | |
8844 | | - | |
8845 | | - | |
8846 | | - | |
8847 | | - | |
8848 | | - | |
8849 | | - | |
8850 | | - | |
8851 | | - | |
8852 | | - | |
8853 | | - | |
8854 | | - | |
8855 | | - | |
8856 | | - | |
8857 | | - | |
8858 | | - | |
8859 | | - | |
8860 | | - | |
8861 | | - | |
8862 | | - | |
8863 | | - | |
8864 | | - | |
8865 | | - | |
8866 | | - | |
8867 | | - | |
8868 | | - | |
8869 | | - | |
8870 | | - | |
8871 | | - | |
8872 | | - | |
8873 | | - | |
8874 | | - | |
8875 | | - | |
8876 | | - | |
8877 | | - | |
8878 | | - | |
8879 | | - | |
8880 | | - | |
8881 | | - | |
| 8738 | + | |
8882 | 8739 | | |
8883 | | - | |
| 8740 | + | |
8884 | 8741 | | |
8885 | 8742 | | |
8886 | 8743 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
| 373 | + | |
| 374 | + | |
374 | 375 | | |
375 | 376 | | |
376 | 377 | | |
377 | 378 | | |
378 | | - | |
| 379 | + | |
| 380 | + | |
379 | 381 | | |
380 | 382 | | |
381 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
992 | 992 | | |
993 | 993 | | |
994 | 994 | | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
995 | 1002 | | |
996 | 1003 | | |
997 | 1004 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7596 | 7596 | | |
7597 | 7597 | | |
7598 | 7598 | | |
| 7599 | + | |
| 7600 | + | |
| 7601 | + | |
| 7602 | + | |
7599 | 7603 | | |
7600 | 7604 | | |
7601 | 7605 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
903 | 903 | | |
904 | 904 | | |
905 | 905 | | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
910 | 909 | | |
911 | 910 | | |
912 | | - | |
| 911 | + | |
913 | 912 | | |
914 | 913 | | |
915 | 914 | | |
916 | 915 | | |
917 | | - | |
| 916 | + | |
| 917 | + | |
918 | 918 | | |
919 | 919 | | |
920 | 920 | | |
| |||
968 | 968 | | |
969 | 969 | | |
970 | 970 | | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
971 | 974 | | |
972 | 975 | | |
973 | 976 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3375 | 3375 | | |
3376 | 3376 | | |
3377 | 3377 | | |
3378 | | - | |
3379 | | - | |
3380 | | - | |
3381 | | - | |
3382 | | - | |
3383 | | - | |
3384 | | - | |
3385 | | - | |
3386 | | - | |
3387 | | - | |
3388 | | - | |
3389 | | - | |
3390 | | - | |
3391 | | - | |
3392 | | - | |
3393 | | - | |
3394 | | - | |
3395 | | - | |
3396 | | - | |
3397 | | - | |
3398 | | - | |
3399 | | - | |
3400 | | - | |
3401 | | - | |
3402 | | - | |
3403 | | - | |
3404 | | - | |
3405 | | - | |
3406 | | - | |
3407 | | - | |
3408 | | - | |
3409 | | - | |
3410 | | - | |
3411 | | - | |
3412 | | - | |
3413 | | - | |
3414 | | - | |
3415 | | - | |
3416 | | - | |
3417 | | - | |
3418 | | - | |
3419 | | - | |
3420 | 3378 | | |
3421 | 3379 | | |
3422 | 3380 | | |
| |||
3443 | 3401 | | |
3444 | 3402 | | |
3445 | 3403 | | |
3446 | | - | |
3447 | | - | |
3448 | | - | |
3449 | | - | |
3450 | | - | |
3451 | | - | |
3452 | | - | |
3453 | | - | |
3454 | | - | |
3455 | | - | |
3456 | | - | |
3457 | | - | |
3458 | | - | |
3459 | | - | |
3460 | | - | |
3461 | | - | |
3462 | | - | |
3463 | 3404 | | |
3464 | 3405 | | |
3465 | 3406 | | |
3466 | 3407 | | |
3467 | 3408 | | |
3468 | | - | |
| 3409 | + | |
3469 | 3410 | | |
3470 | | - | |
3471 | | - | |
3472 | | - | |
3473 | | - | |
3474 | | - | |
3475 | | - | |
3476 | | - | |
3477 | | - | |
3478 | | - | |
3479 | | - | |
3480 | | - | |
3481 | | - | |
3482 | | - | |
3483 | | - | |
3484 | | - | |
3485 | | - | |
3486 | | - | |
3487 | | - | |
3488 | | - | |
3489 | | - | |
3490 | | - | |
3491 | | - | |
3492 | | - | |
3493 | | - | |
3494 | | - | |
3495 | | - | |
3496 | | - | |
3497 | | - | |
3498 | | - | |
3499 | | - | |
3500 | | - | |
3501 | | - | |
3502 | | - | |
3503 | | - | |
3504 | | - | |
3505 | | - | |
3506 | 3411 | | |
3507 | 3412 | | |
3508 | 3413 | | |
| |||
0 commit comments